jsky.science
Class Flux

java.lang.Object
  extended by jsky.science.AbstractScienceObject
      extended by jsky.science.Quantity
          extended by jsky.science.Flux
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, ScienceObjectModel, ReplaceablePropertyChangeListener

public class Flux
extends Quantity

Various flux units. Supported currently fully supported are: fnu, flam, abmag, stmag, jy, mjy.

Units of Counts, obmag, vegamag are coming, but will require conversion to be done on a whole wavelength vector at a time.

This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).

Version:
8.9.01
Author:
Sandy Grosvenor
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jsky.science.AbstractScienceObject
AbstractScienceObject.EventMonitor
 
Field Summary
static java.lang.String ABMAG
           
static java.lang.String ABMAGABBREV
           
static java.lang.String COUNTS
           
static java.lang.String COUNTSABBREV
           
static java.lang.String DEFAULTUNITS_PROPERTY
           
static java.lang.String FLAM
           
static java.lang.String FLAMABBREV
           
static java.lang.String FNU
           
static java.lang.String FNUABBREV
           
static java.lang.String JY
           
static java.lang.String JYABBREV
           
static java.lang.String MJY
           
static java.lang.String MJYABBREV
           
static java.lang.String OBMAG
           
static java.lang.String OBMAGABBREV
           
static java.lang.String PHOTLAM
           
static java.lang.String PHOTLAMABBREV
           
static java.lang.String PHOTNU
           
static java.lang.String PHOTNUABBREV
           
static java.lang.String STMAG
           
static java.lang.String STMAGABBREV
           
static java.lang.String VEGAMAG
           
static java.lang.String VEGAMAGABBREV
           
 
Fields inherited from class jsky.science.Quantity
fValue
 
Fields inherited from interface jsky.science.ScienceObjectModel
NAME_PROPERTY, PENDING_PROPERTY, VALID_PROPERTY
 
Constructor Summary
Flux()
          creates a default Redshift of length 0 with no name
Flux(double inValue)
          creates a new Flux of specified value in the default units
Flux(double inValue, java.lang.String inUnits)
          primary constructor
 
Method Summary
static void addDefaultUnitsChangeListener(java.beans.PropertyChangeListener listener)
           
static Wavelength1DArray convertWavelength1DModel(Wavelength1DModel inArray, java.lang.String fromUnits, java.lang.String toUnits)
          This is the workhorse of the Flux class - returns a new wavelength1Darray that converts an input Wavelength1DModel to the target units.
static Wavelength1DArray convertWavelength1DModel(Wavelength1DModel inArray, java.lang.String fromUnits, java.lang.String toUnits, double mirrorArea)
          This is the workhorse of the Flux class - returns a new wavelength1Darray that converts an input Wavelength1DModel to the target units.
static java.lang.String getDefaultUnitsAbbrev()
           
 double getValue(java.lang.String unitsName)
          Returns a doublecontaining current value in the specified units.
 Quantity newInstance(double inValue)
          returns a new Flux (as a Quantity) with value as specified in default units.
static void removeDefaultUnitsChangeListener(java.beans.PropertyChangeListener listener)
           
protected  void setValue(double inValue, java.lang.String unitsName)
          Sets the double value of a Flux with the specified units
 
Methods inherited from class jsky.science.Quantity
add, addDefaultUnitsChangeListener, equals, fireDefaultUnitsChange, fireDefaultUnitsChange, getAllUnits, getAllUnits, getAllUnitsAbbrev, getAllUnitsAbbrev, getDefaultUnits, getDefaultUnits, getDefaultUnitsAbbrev, getDefaultUnitsProperty, getUnitsAbbrev, getUnitsIgnoreCase, getValue, hashCode, initializeSubClass, isInitialized, removeDefaultUnitsChangeListener, setDefaultUnits, toString, toString
 
Methods inherited from class jsky.science.AbstractScienceObject
addEventMonitor, addPropertyChangeListener, areNamesEqual, clearAllListeners, clone, compareTo, createDefaultName, firePropertyChange, firePropertyChange, fireReplaceObject, fireReplaceObject, fireReplaceObject, fireVetoableChange, fireVetoableChange, getException, getLabel, getName, getObjectIdString, getObjectIdString, getParent, isHolding, isPending, isTracing, isValid, notifyEventMonitors, propertyChange, removeEventMonitor, removePropertyChangeListener, replaceObject, replaceObjectNYI, setException, setHolding, setName, setParent, setTraceAll, setTracing, writeDebug, writeError
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULTUNITS_PROPERTY

public static final java.lang.String DEFAULTUNITS_PROPERTY

FNU

public static final java.lang.String FNU
See Also:
Constant Field Values

FNUABBREV

public static final java.lang.String FNUABBREV
See Also:
Constant Field Values

FLAM

public static final java.lang.String FLAM

FLAMABBREV

public static final java.lang.String FLAMABBREV
See Also:
Constant Field Values

PHOTNU

public static final java.lang.String PHOTNU
See Also:
Constant Field Values

PHOTNUABBREV

public static final java.lang.String PHOTNUABBREV
See Also:
Constant Field Values

PHOTLAM

public static final java.lang.String PHOTLAM

PHOTLAMABBREV

public static final java.lang.String PHOTLAMABBREV
See Also:
Constant Field Values

ABMAG

public static final java.lang.String ABMAG
See Also:
Constant Field Values

ABMAGABBREV

public static final java.lang.String ABMAGABBREV
See Also:
Constant Field Values

STMAG

public static final java.lang.String STMAG
See Also:
Constant Field Values

STMAGABBREV

public static final java.lang.String STMAGABBREV
See Also:
Constant Field Values

JY

public static final java.lang.String JY
See Also:
Constant Field Values

JYABBREV

public static final java.lang.String JYABBREV
See Also:
Constant Field Values

MJY

public static final java.lang.String MJY
See Also:
Constant Field Values

MJYABBREV

public static final java.lang.String MJYABBREV
See Also:
Constant Field Values

COUNTS

public static final java.lang.String COUNTS
See Also:
Constant Field Values

COUNTSABBREV

public static final java.lang.String COUNTSABBREV
See Also:
Constant Field Values

OBMAG

public static final java.lang.String OBMAG
See Also:
Constant Field Values

OBMAGABBREV

public static final java.lang.String OBMAGABBREV
See Also:
Constant Field Values

VEGAMAG

public static final java.lang.String VEGAMAG
See Also:
Constant Field Values

VEGAMAGABBREV

public static final java.lang.String VEGAMAGABBREV
See Also:
Constant Field Values
Constructor Detail

Flux

public Flux()
creates a default Redshift of length 0 with no name


Flux

public Flux(double inValue)
creates a new Flux of specified value in the default units


Flux

public Flux(double inValue,
            java.lang.String inUnits)
primary constructor

Parameters:
inValue - double of the actual Flux
inUnits - string containing the units in which the value is given
Method Detail

newInstance

public Quantity newInstance(double inValue)
returns a new Flux (as a Quantity) with value as specified in default units.

Specified by:
newInstance in class Quantity

getValue

public double getValue(java.lang.String unitsName)
Returns a doublecontaining current value in the specified units.

Specified by:
getValue in class Quantity

setValue

protected void setValue(double inValue,
                        java.lang.String unitsName)
Sets the double value of a Flux with the specified units

Specified by:
setValue in class Quantity

convertWavelength1DModel

public static Wavelength1DArray convertWavelength1DModel(Wavelength1DModel inArray,
                                                         java.lang.String fromUnits,
                                                         java.lang.String toUnits)
                                                  throws UnitsNotSupportedException
This is the workhorse of the Flux class - returns a new wavelength1Darray that converts an input Wavelength1DModel to the target units.

Code for this routine was taken directly from the STSDAS Synphot source code, which is commented inline the source for reference

Throws:
UnitsNotSupportedException

convertWavelength1DModel

public static Wavelength1DArray convertWavelength1DModel(Wavelength1DModel inArray,
                                                         java.lang.String fromUnits,
                                                         java.lang.String toUnits,
                                                         double mirrorArea)
                                                  throws UnitsNotSupportedException
This is the workhorse of the Flux class - returns a new wavelength1Darray that converts an input Wavelength1DModel to the target units.

Code for this routine was taken directly from the STSDAS Synphot source code, which is commented inline the source for reference

Throws:
UnitsNotSupportedException

addDefaultUnitsChangeListener

public static void addDefaultUnitsChangeListener(java.beans.PropertyChangeListener listener)

removeDefaultUnitsChangeListener

public static void removeDefaultUnitsChangeListener(java.beans.PropertyChangeListener listener)

getDefaultUnitsAbbrev

public static java.lang.String getDefaultUnitsAbbrev()