jsky.science
Interface Wavelength1DModel

All Superinterfaces:
java.util.EventListener, java.beans.PropertyChangeListener, ReplaceablePropertyChangeListener, ScienceObjectModel, ScienceObjectNodeModel
All Known Subinterfaces:
Spectrum
All Known Implementing Classes:
AbstractWavelength1D, Spectrum1DArray, Wavelength1DArray, Wavelength1DFormula

public interface Wavelength1DModel
extends ScienceObjectNodeModel

This interface provides a top-level interface for lists that are indexed by wavelengths. Works with the Wavlength class in the Quantity hierarchy to provide structure for containing, querying, and access information such as detector throughputs, spectra, and other data where the datapoints are organized by wavelengths

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:
11.27.2000
Author:
Sandy Grosvenor

Field Summary
 
Fields inherited from interface jsky.science.ScienceObjectNodeModel
DATA_SOURCE_PROPERTY, MORE_DATA_PROPERTY
 
Fields inherited from interface jsky.science.ScienceObjectModel
NAME_PROPERTY, PENDING_PROPERTY, VALID_PROPERTY
 
Method Summary
 void addPropertyChangeListener(ReplaceablePropertyChangeListener listener)
          Register to be notified of change events on this model.
 double getArea()
          Return the total area "under the curve" for all wavelengths
 double getArea(boolean interpolate)
          Return the total area "under the curve" for all wavelengths
 double getArea(Wavelength minWL, Wavelength maxWL)
          Return the area "under the curve" of the model from the specified minimum to maximum Wavelengths.
 double getArea(Wavelength minWL, Wavelength maxWL, boolean interpolate)
          Return the area "under the curve" of the model from the specified minimum to maximum Wavelengths.
 java.lang.String getFluxUnits()
          returns the units string for the data values in the model.
 int getNumPoints()
          Returns the number of data points in the model.
 double getValue(Wavelength inWL)
          Return the value of the model at the specified Wavelength.
 boolean isEditable()
          Return true if model is editable after instantiation, false otherwise
 void removePropertyChangeListener(ReplaceablePropertyChangeListener listener)
          Un-register to be notified of change events on this model.
 void setFluxUnits(java.lang.String newUnits)
          sets the units string for the data values in the model, may be null
 void setValue(Wavelength inWl, double newVal)
          Sets the data value for specified wavelength.
 double[] toArrayData(double[] wavelengths)
          Return an array of doubles containing values from the model at the specfied array of wavelengths values.
 double[] toArrayData(Wavelength minWL, Wavelength maxWL, int nPts)
          Return an array of doubles containing the data in the model.
 double[] toArrayWavelengths(Wavelength minWL, Wavelength maxWL, int nPts)
          Return an array of doubles containing a list of wavelengths points in the model.
 double[] toArrayWavelengths(Wavelength minWL, Wavelength maxWL, int nPts, java.lang.String units)
          Return an array of doubles containing a list of wavelengths points in the model.
 
Methods inherited from interface jsky.science.ScienceObjectNodeModel
addChild, getChildren, getDataSource, isMoreDataAvailable, isPending, removeAllChildren, removeChild, replaceChild, requestMoreData, retrieveMoreData, setDataSource, setMoreDataAvailable
 
Methods inherited from interface jsky.science.ScienceObjectModel
clearAllListeners, clone, firePropertyChange, getException, getLabel, getName, getParent, isHolding, isTracing, isValid, setException, setHolding, setName, setParent, setTracing
 
Methods inherited from interface jsky.util.ReplaceablePropertyChangeListener
replaceObject
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Method Detail

getValue

double getValue(Wavelength inWL)
Return the value of the model at the specified Wavelength.


getArea

double getArea(Wavelength minWL,
               Wavelength maxWL)
Return the area "under the curve" of the model from the specified minimum to maximum Wavelengths.


getArea

double getArea(Wavelength minWL,
               Wavelength maxWL,
               boolean interpolate)
Return the area "under the curve" of the model from the specified minimum to maximum Wavelengths.


getArea

double getArea()
Return the total area "under the curve" for all wavelengths


getArea

double getArea(boolean interpolate)
Return the total area "under the curve" for all wavelengths


isEditable

boolean isEditable()
Return true if model is editable after instantiation, false otherwise


setValue

void setValue(Wavelength inWl,
              double newVal)
Sets the data value for specified wavelength. (Should be ignored in implementations where isEditable() is false


addPropertyChangeListener

void addPropertyChangeListener(ReplaceablePropertyChangeListener listener)
Register to be notified of change events on this model.

Specified by:
addPropertyChangeListener in interface ScienceObjectModel

removePropertyChangeListener

void removePropertyChangeListener(ReplaceablePropertyChangeListener listener)
Un-register to be notified of change events on this model.

Specified by:
removePropertyChangeListener in interface ScienceObjectModel

toArrayData

double[] toArrayData(Wavelength minWL,
                     Wavelength maxWL,
                     int nPts)
Return an array of doubles containing the data in the model. This data points in the returned array should match the wavelength data generated by toArrayWavelength. If either wavelength is null, the model should provide a default minimum or maximum. Similarly, if the nPts is 0, then the model should provide a default number of points. These defaults should be consistent between the toArrayData() method and toArrayWavelengths()


toArrayData

double[] toArrayData(double[] wavelengths)
Return an array of doubles containing values from the model at the specfied array of wavelengths values. The units of the wavelength values should specified in the current default units of the Wavelength class


toArrayWavelengths

double[] toArrayWavelengths(Wavelength minWL,
                            Wavelength maxWL,
                            int nPts)
Return an array of doubles containing a list of wavelengths points in the model. The units of the return values should be the current default units of the Wavelength class. If either wavelength is null, the model should provide a default minimum or maximum. Similarly, if the nPts is 0, then the model should provide a default number of points. These defaults should be consistent between the toArrayData( minWl, maxWl, nPts) method


toArrayWavelengths

double[] toArrayWavelengths(Wavelength minWL,
                            Wavelength maxWL,
                            int nPts,
                            java.lang.String units)
Return an array of doubles containing a list of wavelengths points in the model. The units of the return values should be the current default units of the Wavelength class. If either wavelength is null, the model should provide a default minimum or maximum. Similarly, if the nPts is 0, then the model should provide a default number of points. These defaults should be consistent between the toArrayData( minWl, maxWl, nPts) method


getNumPoints

int getNumPoints()
Returns the number of data points in the model. If the subclass contains a formula instead of a list, this method should return a default number of point compatible with calls to toArrayData and toArrayWavelengths


getFluxUnits

java.lang.String getFluxUnits()
returns the units string for the data values in the model. May be null


setFluxUnits

void setFluxUnits(java.lang.String newUnits)
                  throws UnitsNotSupportedException
sets the units string for the data values in the model, may be null

Throws:
UnitsNotSupportedException