|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Spectrum
| Field Summary | |
|---|---|
static java.lang.String |
REST_SUFFIX
|
| Method Summary | |
|---|---|
void |
addMetaParameter(java.lang.String utype,
MetaParameter parameter)
Adds a meta parameter. |
void |
addMetaParameter(java.lang.String utype,
java.lang.String value)
Adds a meta parameter. |
void |
addMetaParameter(java.lang.String utype,
java.lang.String value,
java.lang.String units)
Adds a meta parameter. |
void |
addObserver(java.util.Observer ob)
Adds and observer to an observable. |
void |
addRadialVelocity(RadialVelocity rv)
Add a radial velocity object. |
void |
addSpectrum(java.lang.Object spid,
Spectrum sp)
Adds a Spectrum instance to this object. |
java.lang.Object |
clone()
Creates a clone copy of this object. |
void |
deleteObserver(java.util.Observer ob)
Deletes an observer from an observable. |
void |
enableNotifications(boolean notify)
Enables/disables notifications to listeners. |
java.util.List |
explodeSpectrum()
Returns a list with all internal Spectrum |
DQBits[] |
getArrayDQBits()
Returns the list of supported DQ bits in each element of the composite. |
int[] |
getArrayDQMask()
Gets the current DQ mask value in each element of the composite. |
double |
getAverageDispersion()
Returns the average dispersion. |
double |
getAverageValue()
Gets the average value obtained in the last integration operation. |
Spectrum |
getChild()
Gets the child spectrum. |
int[] |
getDQ()
Returns an array with all DQ flags stored in the currently selected array. |
DQBits |
getDQBits()
Returns the list of supported DQ bits in this object. |
java.util.Enumeration |
getDQList()
Returns an Enumeration with the String
objects that identify the data quality arrays stored in this object. |
int |
getDQMask()
Gets the current DQ mask value. |
double[] |
getErrors()
Returns an array with all errors stored in the currently selected array. |
double |
getExtremumPosition()
Gets the extremum position obtained in the last integration operation. |
double |
getFluxWeightedPosition()
Gets the flux weighted position obtained in the last integration operation. |
double |
getFluxWeightedPositionError()
Gets the error associated with the flux weighted position obtained in the last integration operation. |
SpectrumHeader |
getHeader()
Returns the SpectrumHeader associated with this spectrum. |
double |
getIntegralError()
Gets the error of the integral obtained in the last integration operation. |
int |
getIntegrationBins()
Gets the number of bins used in the last integration operation. |
java.util.Enumeration |
getIntensityList()
Returns an Enumeration with the String
objects that identify the intensity arrays stored in this object. |
double |
getMaxWavelength()
Returns the maximum wavelength. |
java.util.Map |
getMetaParameters()
Gets the meta parameters. |
double |
getMinWavelength()
Returns the minimum wavelength. |
java.lang.String |
getName()
Returns the spectrum's name. |
int |
getNBins()
Returns the total number of bins in this spectrum. |
DataTableModel |
getNewTableModel()
Returns a new table model that represents the spectrum contents. |
int |
getNumberOfSpectra()
Returns the number of spectra (leaves) in the composite. |
Units |
getOriginalUnits()
Returns the original Units associated with the
selected intensity array in this spectrum. |
Units |
getOriginalWavelengthUnits()
Returns the original Units associated with the
wavelength array in this spectrum. |
java.util.List |
getRadialVelocities()
Gets a list of all available radial velocity objects. |
double[] |
getRestWavelengths()
Returns an array with rest wavelength values. |
java.lang.String |
getSelectedDQID()
Gets the current DQ array ID. |
java.lang.String |
getSelectedIntensityID()
Gets the current intensity array ID. |
RadialVelocity |
getSelectedRadialVelocity()
Gets the currently selected radial velocity object. |
double |
getSigma()
Gets the standard deviation obtained in the last integration operation. |
Spectrum |
getSpectrum(java.lang.Object spid)
Returns the specified Spectrum object. |
java.util.Enumeration |
getSpectrumList()
Returns an Enumeration with the id objetcs
of the Spectrum instances stored in this object. |
java.util.List |
getSpectrumListAsList()
Returns a List with the id objetcs
of the Spectrum instances stored in this object. |
DataTableModel |
getTableModel()
Returns a table model that represents the spectrum contents. |
java.lang.String |
getTag()
Returns the tag associated with this spectrum. |
java.lang.String |
getTargetName()
Returns the target name. |
Units |
getUnits()
Returns the Units associated with the selected
intensity array in this spectrum. |
double[] |
getValues()
Returns an array with all values stored in the currently selected array. |
java.lang.String |
getWavelengthID()
Gets the wavelength ID. |
double[] |
getWavelengths()
Returns an array with all raw wavelength values stored in this spectrum. |
Units |
getWavelengthUnits()
Returns the Units associated with the wavelength
array in this spectrum. |
double |
getX(double wavelength)
Returns the (fractional) bin number corresponding to the wavelength. |
void |
initializeParametersFromMap(java.util.Map map)
Initializes spectrum parameters from map. |
double |
integrate(double w1,
double w2)
Integrate the selected array between given wavelengths. |
boolean |
isEquallySpaced()
Is the wavelength array equally spaced ? |
boolean |
isEvenlySampled()
Is the wavelength array evenly sampled ? |
boolean |
isMultiSegment()
Is spectrum multi-segment? |
boolean |
isNormalizable()
Checks if the spectrum instance is bormalizable. |
boolean |
isRestWavelengths()
Gets the rest wavelengths flag. |
boolean |
isSpectrogram()
Is spectrum a spectrogram? |
void |
maskAll()
Sets all DQ masks. |
void |
normalize(double wave,
double flux,
Units ounits)
Normalize the selected flux array to the given value. |
void |
process(Command command)
Executes a process encapsulated inside a Command
object. |
void |
removeMetaParameter(java.lang.String utype)
Removes a meta parameter. |
void |
removeRadialVelocity(RadialVelocity rv)
Remove a radial velocity object. |
void |
removeSpectrum(java.lang.Object spid)
Removes a Spectrum instance from this object. |
void |
renormalize(double wave,
double flux,
java.lang.Object spid)
Renormalize the selected flux array to the new (wave,flux) point. |
void |
reorderWavelengths()
If wavelength array is arranged in decreasing wavelength order, reorder it and all other arrays in increasing wavelength order. |
void |
resetArraySelection()
Resets array selection. |
void |
saveAsSED(java.lang.String filename)
Saves spectrum as a SED document. |
void |
saveSpectrumParameters(com.sun.xml.tree.XmlDocument document,
com.sun.xml.tree.ElementNode parent)
Saves spectrum parameters in a XML file. |
void |
selectDQ(java.lang.String arrayid)
Selects DQ array. |
void |
selectIntensity(java.lang.String arrayid)
Selects intensity array. |
void |
selectRadialVelocity(RadialVelocity rv)
Selects a radial velocity object. |
void |
setChild(Spectrum child)
Sets a reference to a child spectrum, that is, a different instance of Spectrum that was derived from this
instance. |
void |
setDQBits(DQBits dqbits)
Stores a copy of the DQBits/code> object. |
void |
setDQMask(int mask)
Sets the DQ mask value used in subsequent data retrieval operations. |
void |
setDQMasks(int[] masks)
Sets the DQ masks into each element of the composite. |
void |
setHeader(SpectrumHeader header)
Stores a copy of the SpectrumHeader object. |
void |
setMultiSegment(boolean multi_segment)
Sets the multi-segment flag. |
void |
setName(java.lang.String name)
Sets the spectrum's name. |
void |
setNormalizable(boolean normalizable)
Sets the normalizable state of the spectrum. |
void |
setRestWavelengthsFlag(boolean flag)
Sets a flag that tells that rest wavelengths are to be gotten from this spectrum. |
void |
setSpectrogram(boolean spectrogram)
Sets the spectrogram mode. |
void |
setTargetName(java.lang.String targetName)
Sets the target name. |
void |
setUnits(Units units)
Stores physical units in the currently selected intensity array. |
void |
setWavelengthID(java.lang.String waveid)
Sets the wavelength ID. |
void |
setWavelengths(double[] wavelengths)
Sets a new wavelength array. |
void |
setWavelengthUnits(Units units)
Stores wavelength current physical units. |
boolean |
supportsRadialVelocity()
Returns true for spectral data that can be
represented in a rest wavelength frame. |
| Methods inherited from interface java.util.Observer |
|---|
update |
| Field Detail |
|---|
static final java.lang.String REST_SUFFIX
| Method Detail |
|---|
java.lang.String getName()
java.lang.String getTag()
A tag is an auxiliary string used for internal identification purposes.
boolean isSpectrogram()
true if spectrum is a spectrogramvoid setSpectrogram(boolean spectrogram)
spectrogram - the spectrogram modejava.lang.String getTargetName()
void setTargetName(java.lang.String targetName)
targetName - the target nameSpectrumHeader getHeader()
SpectrumHeader associated with this spectrum.
DQBits getDQBits()
DQBits[] getArrayDQBits()
int getDQMask()
int[] getArrayDQMask()
int getNBins()
RadialVelocity getSelectedRadialVelocity()
java.util.List getRadialVelocities()
void selectRadialVelocity(RadialVelocity rv)
rv - the radial velocity to be selectedDataTableModel getTableModel()
DataTableModel getNewTableModel()
This method should be used when changes in the internal spectrum contents took place.
double integrate(double w1,
double w2)
w1 - wavelength limit for integration, in standard unitsw2 - wavelength limit for integration, in standard units
void normalize(double wave,
double flux,
Units ounits)
wave - the wavelength were to normalizeflux - the resulting flux density at that wavelengthounits - the original units to be associated with the new flux,
or null if none.
void renormalize(double wave,
double flux,
java.lang.Object spid)
wave - the reference wavelengthflux - the new flux at the reference wavelengthspid - the spectrum identification object. If non-null,
the method should act on the specified element only.double getIntegralError()
double getAverageValue()
double getSigma()
double getFluxWeightedPosition()
double getFluxWeightedPositionError()
double getExtremumPosition()
int getIntegrationBins()
java.util.Enumeration getIntensityList()
Enumeration with the String
objects that identify the intensity arrays stored in this object.
String instancesjava.util.Enumeration getDQList()
Enumeration with the String
objects that identify the data quality arrays stored in this object.
String instancesUnits getUnits()
Units associated with the selected
intensity array in this spectrum.
Units instanceUnits getWavelengthUnits()
Units associated with the wavelength
array in this spectrum.
Units instanceUnits getOriginalUnits()
Units associated with the
selected intensity array in this spectrum.
Units instanceUnits getOriginalWavelengthUnits()
Units associated with the
wavelength array in this spectrum.
Units instancejava.util.Enumeration getSpectrumList()
Enumeration with the id objetcs
of the Spectrum instances stored in this object.
Spectrum instancesjava.util.List getSpectrumListAsList()
List with the id objetcs
of the Spectrum instances stored in this object.
This method was introduced for efficiency purposes.
Spectrum instancesint getNumberOfSpectra()
java.util.List explodeSpectrum()
Spectrum
instances in this.
- Returns:
- a list with all internal
Spectrum
instances in this
Spectrum getSpectrum(java.lang.Object spid)
Spectrum object.
spid - the spectrum identification object
Spectrum instancedouble[] getWavelengths()
double[] getRestWavelengths()
void setRestWavelengthsFlag(boolean flag)
flag - a flag that tells that rest wavelengths are to be
gotten from this spectrumboolean isRestWavelengths()
boolean isNormalizable()
true if the spectrum is normalizablevoid setNormalizable(boolean normalizable)
normalizable - the normalizable state of the spectrumdouble getX(double wavelength)
Note that the concept only applies if the wavelengths are monotonically sorted. If not, this method may deliver bogus results.
double getMinWavelength()
double getMaxWavelength()
double getAverageDispersion()
double[] getValues()
double[] getErrors()
int[] getDQ()
boolean isMultiSegment()
This flag does *NOT* overlap with spectrum types that have internal structure. It is designed to tell to external software (such as a graphics library) taht the spectrum must be depicted explictly with a multi-segment glyph.
true if the spectrum must be depicted has a
multi-segment entity.void setMultiSegment(boolean multi_segment)
multi_segment - the multi-segment flagboolean isEvenlySampled()
true if the wavelength array returned
by this object is more or less evenly sampled.boolean isEquallySpaced()
true if the wavelength array returned
by this object is sampled with a uniform step.java.lang.String getWavelengthID()
void setWavelengthID(java.lang.String waveid)
waveid - the wavelength ID
void setWavelengths(double[] wavelengths)
throws SpectrumException
This method causes the entire spectrum to be resanpled at the new wavelength values.
wavelengths - the new wavelength array
SpectrumException - if the provided array is not
compatible with the existing wavelength arrayvoid setName(java.lang.String name)
name - the spectrum's namevoid setHeader(SpectrumHeader header)
SpectrumHeader object.
header - the object to be storedvoid setDQBits(DQBits dqbits)
DQBits/code> object.
- Parameters:
dqbits - the object to be stored
void setDQMask(int mask)
mask - the DQ mask valuevoid setDQMasks(int[] masks)
masks - array with the DQ masksvoid maskAll()
java.lang.String getSelectedIntensityID()
java.lang.String getSelectedDQID()
void selectIntensity(java.lang.String arrayid)
arrayid - the array identificationvoid selectDQ(java.lang.String arrayid)
arrayid - the array identificationvoid resetArraySelection()
void setUnits(Units units)
units - the physical units to be stored as currentvoid setWavelengthUnits(Units units)
units - the physical units to be stored as currentvoid enableNotifications(boolean notify)
notify - true if notifications are to be
enabled, false otherwise.void process(Command command)
Command
object.
command - the command object that encapsulates the
processor algorithmvoid reorderWavelengths()
void addRadialVelocity(RadialVelocity rv)
rv - a radial velocity objectvoid removeRadialVelocity(RadialVelocity rv)
rv - a radial velocity objectvoid initializeParametersFromMap(java.util.Map map)
map - the map
void saveSpectrumParameters(com.sun.xml.tree.XmlDocument document,
com.sun.xml.tree.ElementNode parent)
document - the DOM documentparent - the parent nodevoid saveAsSED(java.lang.String filename)
filename - the SED file namejava.util.Map getMetaParameters()
void addMetaParameter(java.lang.String utype,
java.lang.String value)
utype - the utypevalue - the value
void addMetaParameter(java.lang.String utype,
java.lang.String value,
java.lang.String units)
utype - the utypevalue - the valueunits - the units
void addMetaParameter(java.lang.String utype,
MetaParameter parameter)
utype - the utypeparameter - the parametervoid removeMetaParameter(java.lang.String utype)
utype - the utypeboolean supportsRadialVelocity()
true for spectral data that can be
represented in a rest wavelength frame.
true for spectral data that can be
represented in a rest wavelength framevoid setChild(Spectrum child)
Spectrum that was derived from this
instance.
child - the child spectrumSpectrum getChild()
void addSpectrum(java.lang.Object spid,
Spectrum sp)
Spectrum instance to this object.
spid - the identificationsp - the Spectrum instance to be addedvoid removeSpectrum(java.lang.Object spid)
Spectrum instance from this object.
spid - the identification
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionvoid addObserver(java.util.Observer ob)
void deleteObserver(java.util.Observer ob)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||