jsky.plot
Class ElevationPlotUtil

java.lang.Object
  extended by jsky.plot.ElevationPlotUtil

public class ElevationPlotUtil
extends java.lang.Object

A utility class for calculating elevation vs time for a given list of target positions.

Version:
$Revision: 1.5 $
Author:
Allan Brighton

Field Summary
static SiteDesc[] AVAILABLE_SITES
          Convenience definition, defines some observatory sites
static SiteDesc CERRO_PANCHON
           
static SiteDesc MAUNA_KEA
           
static java.util.TimeZone UT
          UT TimeZone
 
Constructor Summary
ElevationPlotUtil(java.util.Date date, SiteDesc site, TargetDesc[] targets)
          Calculates the positions of the given target objects in the sky as a function of time (UT), given the date and location on Earth.
 
Method Summary
static double getAirmass(double elevation)
          Return the airmass for the given elevation angle in degrees
 java.util.Date getLst(java.util.Date date)
          Return the LST time for the given UT time at the current site.
 int getNumSteps()
          Return the number of steps to calculate for the plot.
static SiteDesc getSite(java.lang.String siteName)
          Return the site for the given name, if known, otherwise the default site.
static SiteDesc getSite(java.lang.String siteName, SiteDesc defaultSite)
          Return the site for the given name, if known, otherwise the given default.
 java.util.Date[][] getXData()
          Return an array with the UT time for each target index and elevation The first index is the target index (corresponding to the array of targets passed to the constructor).
 double[][] getYData()
          Return an array with the elevation in degrees for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor).
 double[][] getYDataAirmass()
          Return an array with the airmass for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor).
 double[][] getYDataPa()
          Return an array with the parallactic angles for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor).
static double normalizeHours(double h)
          Return an hour value between 0 and 24
static void setDefaultNumSteps(int numSteps)
          Set the default number of steps to calculate for the plot.
 void setNumSteps(int numSteps)
          Set the number of steps to calculate for the plot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAUNA_KEA

public static final SiteDesc MAUNA_KEA

CERRO_PANCHON

public static final SiteDesc CERRO_PANCHON

AVAILABLE_SITES

public static final SiteDesc[] AVAILABLE_SITES
Convenience definition, defines some observatory sites


UT

public static final java.util.TimeZone UT
UT TimeZone

Constructor Detail

ElevationPlotUtil

public ElevationPlotUtil(java.util.Date date,
                         SiteDesc site,
                         TargetDesc[] targets)
Calculates the positions of the given target objects in the sky as a function of time (UT), given the date and location on Earth. The result is to set the values of the xData and yData arrays, to correspond to the time (in UT) and elevation (in degrees). Arrays with airmass and parallactic angle are also created.

Parameters:
date - (in) the date of interest
site - (in) describes the observatory location
targets - (in) an array describing the target objects
Method Detail

getNumSteps

public int getNumSteps()
Return the number of steps to calculate for the plot.


setNumSteps

public void setNumSteps(int numSteps)
Set the number of steps to calculate for the plot.


setDefaultNumSteps

public static void setDefaultNumSteps(int numSteps)
Set the default number of steps to calculate for the plot. This is the value that will be used for future objects of this class.


getAirmass

public static double getAirmass(double elevation)
Return the airmass for the given elevation angle in degrees


getXData

public java.util.Date[][] getXData()
Return an array with the UT time for each target index and elevation The first index is the target index (corresponding to the array of targets passed to the constructor). The second index is 0 to NUM_STEPS-1.


getYData

public double[][] getYData()
Return an array with the elevation in degrees for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor). The second index is 0 to NUM_STEPS-1.


getYDataAirmass

public double[][] getYDataAirmass()
Return an array with the airmass for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor). The second index is 0 to NUM_STEPS-1.


getYDataPa

public double[][] getYDataPa()
Return an array with the parallactic angles for each target index and time The first index is the target index (corresponding to the array of targets passed to the constructor). The second index is 0 to NUM_STEPS-1.


normalizeHours

public static double normalizeHours(double h)
Return an hour value between 0 and 24


getSite

public static SiteDesc getSite(java.lang.String siteName,
                               SiteDesc defaultSite)
Return the site for the given name, if known, otherwise the given default.


getSite

public static SiteDesc getSite(java.lang.String siteName)
Return the site for the given name, if known, otherwise the default site.


getLst

public java.util.Date getLst(java.util.Date date)
Return the LST time for the given UT time at the current site.