|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.science.AbstractScienceObject
jsky.science.AbstractScienceObjectNode
jsky.science.AbstractWavelength1D
jsky.science.Wavelength1DFormula
public abstract class Wavelength1DFormula
Implements a Wavelength1Dmodel as a formula value=f(wavelength) with a minimum and maximum wavelength, and a number of expected points.
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).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jsky.science.AbstractScienceObject |
---|
AbstractScienceObject.EventMonitor |
Field Summary | |
---|---|
protected Wavelength |
fMaxWavelength
|
protected Wavelength |
fMinWavelength
|
protected int |
fNumPoints
|
Fields inherited from class jsky.science.AbstractWavelength1D |
---|
fFluxUnits, MAXWAVELENGTH_PROPERTY, MINWAVELENGTH_PROPERTY, NUMPOINTS_PROPERTY |
Fields inherited from class jsky.science.AbstractScienceObjectNode |
---|
cloneIndent |
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 |
Constructor Summary | |
---|---|
Wavelength1DFormula()
Creates a new Wavelength1DFormula, with default number of points (100 points), and default wavelength range (100 to 1100 nanometers). |
|
Wavelength1DFormula(int inPoints)
Creates a new Wavelength1DFormula of specified number of points, no name, and default wavelength range |
|
Wavelength1DFormula(java.lang.String inName)
Creates a new Wavelength1DFormula with specified name and default number of points and range. |
|
Wavelength1DFormula(java.lang.String inProp,
Wavelength inMin,
Wavelength inMax,
int inPts)
Creates a new Wavelength1DFormula of with specified name, number of points and wavelength range. |
|
Wavelength1DFormula(Wavelength inMin,
Wavelength inMax,
int inPts)
Creates a new Wavelength1DFormula of with no name and specified number of points and wavelength range. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones this object, and does a DEEP clone on the fChildren. |
boolean |
equals(java.lang.Object obj)
After check with superclass, returns true if objects are same Class and have same min/max and number of points. |
Wavelength |
getMaxWavelength()
|
Wavelength |
getMinWavelength()
|
int |
getNumPoints()
returns the length of the array that would be returned by toArrayWavelengths() and toArrayData(). |
double |
getValueAtIndex(int i)
This is a trivial implementation that returns the formula value for a specified index. |
Wavelength |
getWavelengthAtIndex(int index)
Returns the wavelength data value for specified index as a Wavelength |
double |
getWavelengthAtIndexAsDouble(int index)
Returns the wavelength data value for specified index as a double value in the current default wavelength units |
void |
setMaxWavelength(Wavelength newWL)
|
void |
setMinWavelength(Wavelength newWL)
|
void |
setNumPoints(int newP)
Changes the length of the array that would be returned by toArrayWavelengths() and toArrayData(). |
void |
setPending(boolean b)
overriding to public access |
double[] |
toArrayData()
Returns an array of doubles containing containing the formula's value for each wavelength returned by toArrayWavelengths(). |
double[] |
toArrayWavelengths()
Creates an array of doubles containing wavelength values at even intervals across the min/max wavelength of the object and of size getNumPoints() |
Methods inherited from class jsky.science.AbstractWavelength1D |
---|
calcArea, calculateArea, getArea, getArea, getArea, getArea, getFluxUnits, getIndexOf, getIndexOf, getIndexOf, getIndexOf, isEditable, setFluxUnits, setValue, toArrayData, toArrayWavelengths |
Methods inherited from class jsky.science.AbstractScienceObjectNode |
---|
addChild, getChildren, getDataSource, indexOfChild, initializeTransients, isHolding, isMoreDataAvailable, isPending, isUpToDate, isValid, namedClone, processUpdates, removeAllChildren, removeChild, repeat, replaceChild, replaceObject, requestMoreData, retrieveMoreData, saveAsText, saveAsText, setDataSource, setHolding, setMoreDataAvailable, setTracing, setUpdatesPending, update |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jsky.science.Wavelength1DModel |
---|
addPropertyChangeListener, getValue, removePropertyChangeListener, toArrayData, toArrayWavelengths |
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, 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 |
Field Detail |
---|
protected Wavelength fMinWavelength
protected Wavelength fMaxWavelength
protected int fNumPoints
Constructor Detail |
---|
public Wavelength1DFormula()
public Wavelength1DFormula(int inPoints)
public Wavelength1DFormula(java.lang.String inName)
public Wavelength1DFormula(Wavelength inMin, Wavelength inMax, int inPts)
inMin
- Minimum Wavelength for the datasetinMax
- Maximum Wavelength for the datasetinPts
- number of points in the datasetpublic Wavelength1DFormula(java.lang.String inProp, Wavelength inMin, Wavelength inMax, int inPts)
inProp
- Name of the datasetinMin
- Minimum Wavelength for the datasetinMax
- Maximum Wavelength for the datasetinPts
- number of points in the datasetMethod Detail |
---|
public java.lang.Object clone()
AbstractScienceObjectNode
NOTE: for subclasses! If a subclass has a separate variable or list that points at fChildren, remember that after this clone() method is completed all fChildren will have also been cloned.
So subclasses may need to "repoint" variables or elemenets of lists that reference child objects, but should NOT re-clone those children.
See ExposureGroup.clone() and Exposure.clone() as examples of classes that need to re-proint existing pointers to correctly point at the correct elements.
clone
in interface ScienceObjectModel
clone
in class AbstractScienceObjectNode
public boolean equals(java.lang.Object obj)
equals
in class AbstractScienceObjectNode
public Wavelength getMinWavelength()
public Wavelength getMaxWavelength()
public void setMinWavelength(Wavelength newWL)
public void setMaxWavelength(Wavelength newWL)
public void setPending(boolean b)
setPending
in class AbstractScienceObjectNode
public double[] toArrayData()
public double[] toArrayWavelengths()
public Wavelength getWavelengthAtIndex(int index)
public double getWavelengthAtIndexAsDouble(int index)
public double getValueAtIndex(int i)
However, if you have an array of wavelength values that you are "sharing" across several different Wavelength1DFormula, then overriding this method to define the formula's functionality, and then writing getValue to reference this method may be computationally much faster. See SEA's ExpCalcSpectroscopy for an example.
public void setNumPoints(int newP)
public int getNumPoints()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |