public class Passband extends AbstractScienceObject
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).
AbstractScienceObject.EventMonitor
Modifier and Type | Field and Description |
---|---|
static String |
HIGH_PROPERTY
bound property change name for change in the HighWavelength
|
static String |
LOW_PROPERTY
bound property change name for change in the LowWavelength
|
static String |
MIDDLE_PROPERTY
bound property change name for change in the MiddleWavelength
|
NAME_PROPERTY, PENDING_PROPERTY, VALID_PROPERTY
Constructor and Description |
---|
Passband() |
Passband(String val)
Creates a new Passband from a string specifying the range in nanometers.
|
Passband(String inName,
Wavelength inLowWL,
Wavelength inHighWL,
Wavelength inMiddleWL)
Creates a new Passband with low, high and middle values specified in Wavelengths.
|
Passband(Wavelength inLowWL,
Wavelength inHighWL)
Creates a new Passband with low and high values specified in Wavelengths.
|
Passband(Wavelength inLowWL,
Wavelength inHighWL,
Wavelength inMiddleWL)
Creates a new Passband with low, high and middle values specified in Wavelengths.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Wavelength inWL)
Returns true if passband contains specified wavelength
|
boolean |
equals(Object inO)
Default implementation: checks for same name only
|
static Passband |
findStandardContaining(Wavelength inWL)
Returns the first standard passband that contains the
specified wavelength.
|
Wavelength |
getHighWavelength()
Returns high end of the passband as a Wavelength
|
Wavelength |
getLowWavelength()
Returns low end of the passband as a Wavelength
|
Wavelength |
getMiddleWavelength()
Returns middle or central Wavelength.
|
static String[] |
getStandardBroadBands()
Returns array of Strings containing (arbitrarily) only the names of
Passbands where the length of the name is a single character
|
static Passband |
getStandardPassband(String pName)
Returns the Passband in the standard list by name.
|
static String[] |
getStdBands()
Returns String array containing the names of the defined standard passbands
|
void |
setHighWavelength(Wavelength inWL)
Sets the Wavelength marking the high end of the Passband.
|
void |
setLowWavelength(Wavelength inWL)
Sets the Wavelength marking the low end of the Passband.
|
void |
setMiddleWavelength(Wavelength inWL)
Sets the Wavelength marking the middle of the Passband.
|
static void |
setStdBands(String[] bands)
Replaces the standard pass band list with elements parsed from the
specified array of strings.
|
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, toString, writeDebug, writeError
public static final String LOW_PROPERTY
public static final String MIDDLE_PROPERTY
public static final String HIGH_PROPERTY
public Passband()
public Passband(Wavelength inLowWL, Wavelength inHighWL)
public Passband(Wavelength inLowWL, Wavelength inHighWL, Wavelength inMiddleWL)
public Passband(String inName, Wavelength inLowWL, Wavelength inHighWL, Wavelength inMiddleWL)
public Passband(String val) throws NumberFormatException
val
- String containing the range in the form "low-high" or "low"NumberFormatException
- if it finds invalid numberspublic boolean equals(Object inO)
AbstractScienceObject
equals
in class AbstractScienceObject
public static String[] getStdBands()
public static String[] getStandardBroadBands()
public static void setStdBands(String[] bands)
public static Passband getStandardPassband(String pName)
public static Passband findStandardContaining(Wavelength inWL)
public boolean contains(Wavelength inWL)
public Wavelength getHighWavelength()
public void setHighWavelength(Wavelength inWL)
inWL
- middle value as a Wavelengthpublic Wavelength getLowWavelength()
public void setLowWavelength(Wavelength inWL)
inWL
- middle value as a Wavelengthpublic Wavelength getMiddleWavelength()
public void setMiddleWavelength(Wavelength inWL)
inWL
- middle value as a WavelengthCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.