astro
Class LightCurveSimulator

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by astro.LightCurveSimulator
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class LightCurveSimulator
extends PropertyBundles

Very simple program to simulate light curves.


Nested Class Summary
static class LightCurveSimulator.Series
          Parses the command line and prints out a simluated light curve.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  double alpha
          Photon constant.
private  double beta
          Scintillation constant.
private static double DEFALTITUDE
          Default value.
private static double DEFDIAMETER
          Default diameter.
private static double DEFEXPOSURETIME
          Default value.
private static double DEFKPRIME
          Default kprime.
private static double DEFLATITUDE
          Default value.
private static double DEFLIGHTLOSS
          Default value.
private static double DEFLONGITUDE
          Default value.
private static double DEFMINHEIGHT
          Default value.
private static double DEFREADOUT
          Default value.
private static boolean DEFRECTANGLE
          Default use plain sine wave.
private static double DEFSCINTILLATION
          Default value.
private static double DEFSKYAPERTURE
          Default aperture diameter in arcsec.
private static double DEFSKYBRIGHT
          Default sky brightness.
private static double DEFSOLHEIGHT
          Default allowed maximum solar height.
private  AltTarget h
          The height of the target at the stated time.
private static double H0
          Validity elevation above sea level for scintillation formular.
static String KEY_ALTITUDE
          The observatory height.
static String KEY_AMPLITUDE
          The peak-to-valley amplitude of the light curve in mag.
static String KEY_BRIGHTNESS
          The magnitude of the primary star, V.
static String KEY_DETARGET
          The declination of the object.
static String KEY_DIAMETER
          The telescope diameter for photon gathering.
static String KEY_EXPOSURETIME
          The exposure time in seconds.
static String KEY_KPRIME
          The airmass konstant.
static String KEY_LATITUDE
          The latitude of the observatory.
static String KEY_LIGHTLOSS
          The light-loss factor, ioncluding telescope and CCD.
static String KEY_LONGITUDE
          The longitude of the observatory.
static String KEY_MINHEIGHT
          The minimum height.
static String KEY_PERIOD
          The period of the light-curve in days.
static String KEY_RATARGET
          The right ascension of the object.
static String KEY_READOUT
          The read-out/acquire delay.
static String KEY_RECTANGLE
          If true, use a rectangluar wave instead of sine.
static String KEY_SCINTILLATION
          The scintillation constant.
static String KEY_SKYAPERTURE
          The aperture of measure.
static String KEY_SKYBRIGHT
          The mag/arcsec^2 of photon sky noise.
static String KEY_SOLHEIGHT
          Observing only, when sun is lower than that.
static String KEY_SPAN
          The observing time span in days.
static String KEY_START
          The starting time of the simulation.
private  Distance moondist
          Distance from object to moon on sky.
private  MoonHeight moonh
          The moon height.
private  MoonAngle moonphi
          Moon phase.
private static PoissonRandom RANDOM
          The random generator.
private  SolHeight solh
          The solar height.
private  SettableTime t
          Our time variable.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
LightCurveSimulator(Map<String,String> prop)
          Constructs a new light curve simulator, defaulting some values.
 
Method Summary
 void init()
          We create all necessary parameters out of our properties here.
 int printCurve(PrintWriter out)
          Simulates values of the light curve at regular intervals composed of exposure time plus readout time.
 double simulate(double m0)
          Simulates a light-curve value at a given point in time stored in the global time variable for a given outside-of-atmosphere V magnitude.
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_DIAMETER

public static final String KEY_DIAMETER
The telescope diameter for photon gathering.

See Also:
Constant Field Values

KEY_EXPOSURETIME

public static final String KEY_EXPOSURETIME
The exposure time in seconds.

See Also:
Constant Field Values

KEY_LIGHTLOSS

public static final String KEY_LIGHTLOSS
The light-loss factor, ioncluding telescope and CCD.

See Also:
Constant Field Values

KEY_LONGITUDE

public static final String KEY_LONGITUDE
The longitude of the observatory.

See Also:
Constant Field Values

KEY_LATITUDE

public static final String KEY_LATITUDE
The latitude of the observatory.

See Also:
Constant Field Values

KEY_ALTITUDE

public static final String KEY_ALTITUDE
The observatory height.

See Also:
Constant Field Values

KEY_RATARGET

public static final String KEY_RATARGET
The right ascension of the object.

See Also:
Constant Field Values

KEY_DETARGET

public static final String KEY_DETARGET
The declination of the object.

See Also:
Constant Field Values

KEY_BRIGHTNESS

public static final String KEY_BRIGHTNESS
The magnitude of the primary star, V.

See Also:
Constant Field Values

KEY_READOUT

public static final String KEY_READOUT
The read-out/acquire delay.

See Also:
Constant Field Values

KEY_MINHEIGHT

public static final String KEY_MINHEIGHT
The minimum height.

See Also:
Constant Field Values

KEY_KPRIME

public static final String KEY_KPRIME
The airmass konstant.

See Also:
Constant Field Values

KEY_SKYBRIGHT

public static final String KEY_SKYBRIGHT
The mag/arcsec^2 of photon sky noise.

See Also:
Constant Field Values

KEY_SKYAPERTURE

public static final String KEY_SKYAPERTURE
The aperture of measure.

See Also:
Constant Field Values

KEY_SCINTILLATION

public static final String KEY_SCINTILLATION
The scintillation constant.

See Also:
Constant Field Values

KEY_RECTANGLE

public static final String KEY_RECTANGLE
If true, use a rectangluar wave instead of sine.

See Also:
Constant Field Values

KEY_AMPLITUDE

public static final String KEY_AMPLITUDE
The peak-to-valley amplitude of the light curve in mag.

See Also:
Constant Field Values

KEY_PERIOD

public static final String KEY_PERIOD
The period of the light-curve in days.

See Also:
Constant Field Values

KEY_START

public static final String KEY_START
The starting time of the simulation.

See Also:
Constant Field Values

KEY_SPAN

public static final String KEY_SPAN
The observing time span in days.

See Also:
Constant Field Values

KEY_SOLHEIGHT

public static final String KEY_SOLHEIGHT
Observing only, when sun is lower than that.

See Also:
Constant Field Values

DEFDIAMETER

private static final double DEFDIAMETER
Default diameter.

See Also:
Constant Field Values

DEFEXPOSURETIME

private static final double DEFEXPOSURETIME
Default value.

See Also:
Constant Field Values

DEFLIGHTLOSS

private static final double DEFLIGHTLOSS
Default value.

See Also:
Constant Field Values

DEFLONGITUDE

private static final double DEFLONGITUDE
Default value.


DEFLATITUDE

private static final double DEFLATITUDE
Default value.


DEFALTITUDE

private static final double DEFALTITUDE
Default value.


DEFREADOUT

private static final double DEFREADOUT
Default value.

See Also:
Constant Field Values

DEFMINHEIGHT

private static final double DEFMINHEIGHT
Default value.

See Also:
Constant Field Values

DEFKPRIME

private static final double DEFKPRIME
Default kprime.

See Also:
Constant Field Values

DEFSKYBRIGHT

private static final double DEFSKYBRIGHT
Default sky brightness.

See Also:
Constant Field Values

DEFSKYAPERTURE

private static final double DEFSKYAPERTURE
Default aperture diameter in arcsec.

See Also:
Constant Field Values

DEFSCINTILLATION

private static final double DEFSCINTILLATION
Default value.

See Also:
Constant Field Values

DEFSOLHEIGHT

private static final double DEFSOLHEIGHT
Default allowed maximum solar height.

See Also:
Constant Field Values

DEFRECTANGLE

private static final boolean DEFRECTANGLE
Default use plain sine wave.

See Also:
Constant Field Values

H0

private static final double H0
Validity elevation above sea level for scintillation formular.

See Also:
Constant Field Values

RANDOM

private static final PoissonRandom RANDOM
The random generator.


t

private SettableTime t
Our time variable.


h

private AltTarget h
The height of the target at the stated time.


solh

private SolHeight solh
The solar height.


moonh

private MoonHeight moonh
The moon height.


moonphi

private MoonAngle moonphi
Moon phase.


moondist

private Distance moondist
Distance from object to moon on sky.


alpha

private double alpha
Photon constant.


beta

private double beta
Scintillation constant.

Constructor Detail

LightCurveSimulator

public LightCurveSimulator(Map<String,String> prop)
Constructs a new light curve simulator, defaulting some values.

Method Detail

init

public void init()
We create all necessary parameters out of our properties here.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

printCurve

public int printCurve(PrintWriter out)
Simulates values of the light curve at regular intervals composed of exposure time plus readout time. We print out JD vs. instrumental magnitude.

Returns:
Number of data points writtn.

simulate

public double simulate(double m0)
Simulates a light-curve value at a given point in time stored in the global time variable for a given outside-of-atmosphere V magnitude.