Documentation of 'com.mhuss.AstroLib.VisLimit' Java class
VisLimit
com.mhuss.AstroLib

Class VisLimit



  • public class VisLimit
    extends java.lang.Object
    Calculates sky brightness and limiting magnitude.
    Based on C code by Bill Gray (www.projectpluto.com), which was in turn based on Brad Schaefer's article and code on pages 57-60, May 1998 _Sky & Telescope_, "To the Visual Limits".

    [Bill Gray's Comments:]
    The computations for sky brightness and limiting magnitude can be logically broken up into several pieces. Some computations depend on things that are constant for a given observing site and time: the lunar and solar zenith distances, the air masses to those objects, the temperature and relative humidity, and so forth. For use in Guide, I expect to compute brightness at many points in the sky, while all these other values hold constant. So my first step (after putting lat/lon and these other data into an instance of VisLimitAngularBrightnessData) is to call the setBrightnessParams() function. This function does a lot of "setup work", figuring out the absorption per unit air mass at various wavelengths from various causes (gas, aerosol, ozone), the number of air masses to the sun and moon, and so forth.

    Once you've done all this, you can call computeSkyBrightness() for any point in the sky. You do need to provide the zenith angle, and the angular distance of that point from the moon and sun. The brightnesses are available via the brightness() functions. The 'mask' value can be used to specify which of the five bands is to be computed. (For example, if I use this to make a realistic sky background, I may just concern myself with the V band... maybe with B and R if I want to attempt a colored sky. In either case, computing all five bands would be excessive.)

    Next, you can call computeExtinction() to set any or all of the five extinction values. Normally, I wouldn't see much use for this data. But you do need to have that data if you intend to call the computeLimitingMag() function.

    If you use the explicit (all values) constructor, all of the above functions are called for you automatically.

    Notice that we modified his test conditions. He had the moon and sun well below the horizon; I found that this didn't make testing contributions from those objects any easier, so we put them where they could contribute more brightness.

    • Constructor Detail

      • VisLimit

        public VisLimit()
        Default constructor.
      • VisLimit

        public VisLimit(int bandMask,
                        VisLimitFixedBrightnessData fbd,
                        VisLimitAngularBrightnessData abd)
        Explicit (all values) constructor.

        Note that the BrightnessData parameters are expected to contain valid data.

        Parameters:
        bandMask - A logical mask which represents one or more of the five possible bands to calculate.
        fbd - The fixed brightness data
        abd - The angular brightness data
    • Method Detail

      • setBrightnessParams

        public void setBrightnessParams(VisLimitFixedBrightnessData fbd)
        Set the fixed brightness parameters.
        Parameters:
        fbd - The fixed brightness data
      • computeSkyBrightness

        public void computeSkyBrightness(VisLimitAngularBrightnessData abd)
        Compute the sky brightness.
        Parameters:
        abd - The angular brightness data
      • limitingMagnitude

        public double limitingMagnitude()
        Calculate the limiting magnitude.
        Returns:
        The limiting magnitude
      • setMask

        public void setMask(int m)
        Set the mask value.
      • getK

        public double getK(int i)
                    throws ValueException
        Get the K band value.
        Parameters:
        i - Index into the band data
        Throws:
        ValueException
      • getBrightness

        public double getBrightness(int i)
                             throws ValueException
        Get the brightess value.
        Parameters:
        i - Index into the band data
        Throws:
        ValueException
      • getExtinction

        public double getExtinction(int i)
                             throws ValueException
        Get the extinction value.
        Parameters:
        i - Index into the band data
        Throws:
        ValueException
      • main

        public static void main(java.lang.String[] args)
        (for unit testing only)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.