public class SpecFrame extends Frame
By setting a value for thr SpecOrigin attribute, a SpecFrame can be made to represent offsets from a given spectral position, rather than absolute spectral values.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details.
You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,Fifth Floor, Boston, MA 02110-1301, USA
Mapping.Interpolator, Mapping.Spreader
LINEAR_INTERPOLATOR, LINEAR_SPREADER, NEAREST_INTERPOLATOR, NEAREST_SPREADER
AST__BAD, AST__TUNULL, pointer
Constructor and Description |
---|
SpecFrame()
Creates a SpecFrame.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlignStdOfRest()
Get
standard of rest to use when aligning SpecFrames.
|
String |
getGeoLat()
Synonym for
Frame.getObsLat() . |
String |
getGeoLon()
Synonym for
Frame.getObsLon() . |
String |
getRefDec()
Get
the declination of the reference point.
|
double[] |
getRefPos(SkyFrame frm)
Return the reference position in a specified celestial coordinate system.
|
String |
getRefRA()
Get
the right ascension of the reference point.
|
double |
getRestFreq()
Get
the rest frequency.
|
String |
getSourceSys()
Get
spectral system in which the source velocity is stored.
|
double |
getSourceVel()
Get
the source velocity.
|
double |
getSourceVRF()
Get
rest frame in which the source velocity is stored.
|
String |
getStdOfRest()
Get
standard of rest.
|
void |
setAlignStdOfRest(String alignStdOfRest)
Set
standard of rest to use when aligning SpecFrames.
|
void |
setGeoLat(String geoLat)
Synonym for
Frame.setObsLat(java.lang.String) . |
void |
setGeoLon(String geoLon)
Synonym for
Frame.setObsLon(java.lang.String) . |
void |
setRefDec(String refDec)
Set
the declination of the reference point.
|
void |
setRefPos(SkyFrame frm,
double lon,
double lat)
Set the reference position in a specified celestial coordinate system.
|
void |
setRefRA(String refRA)
Set
the right ascension of the reference point.
|
void |
setRestFreq(double restFreq)
Set
the rest frequency.
|
void |
setRestFreq(String restFreq)
Sets the value of the restFreq attribute optionally
with a unit string.
|
void |
setSourceSys(String sourceSys)
Set
spectral system in which the source velocity is stored.
|
void |
setSourceVel(double sourceVel)
Set
the source velocity.
|
void |
setSourceVRF(double sourceVRF)
Set
rest frame in which the source velocity is stored.
|
void |
setStdOfRest(String stdOfRest)
Set
standard of rest.
|
angle, axAngle, axDistance, axOffset, convert, distance, findFrame, format, getActiveUnit, getAlignSystem, getBottom, getDigits, getDigits, getDirection, getDomain, getDut1, getEpoch, getFormat, getLabel, getMatchEnd, getMaxAxes, getMinAxes, getNaxes, getNormUnit, getObsLat, getObsLon, getPermute, getPreserveAxes, getSymbol, getSystem, getTitle, getTop, getUnit, intersect, norm, offset, offset2, permAxes, pickAxes, resolve, setActiveUnit, setAlignSystem, setBottom, setDigits, setDigits, setDirection, setDomain, setDut1, setEpoch, setEpoch, setFormat, setLabel, setMatchEnd, setMaxAxes, setMinAxes, setObsLat, setObsLon, setPermute, setPreserveAxes, setSymbol, setSystem, setTitle, setTop, setUnit, unformat
decompose, getInvert, getNin, getNout, getReport, getTranForward, getTranInverse, invert, linearApprox, mapBox, mapSplit, rate, rebin, rebinD, rebinF, rebinI, resample, resampleB, resampleD, resampleF, resampleI, resampleL, resampleS, setInvert, setReport, simplify, tran1, tran2, tranGrid, tranN, tranP
annul, clear, copy, delete, equals, finalize, getAstConstantI, getB, getC, getD, getF, getI, getID, getIdent, getL, getNobject, getObjSize, getRefCount, hashCode, isThreaded, reportVersions, sameObject, set, setB, setC, setD, setF, setI, setID, setIdent, setL, show, test, tune
public SpecFrame()
AstException
- if an error occurred in the AST librarypublic double[] getRefPos(SkyFrame frm)
frm
- Pointer to the SkyFrame which defines the required celestial
coordinate system.
If NULL
is supplied, then the longitude and latitude values are returned
as FK5 J2000 RA and Dec values.AstException
- if an error occurred in the AST librarypublic void setRefPos(SkyFrame frm, double lon, double lat)
frm
- Pointer to the SkyFrame which defines the celestial coordinate
system in which the longitude and latitude values are supplied.
If NULL
is supplied, then the supplied longitude and latitude values are
assumed to be FK5 J2000 RA and Dec values.lon
- The longitude of the reference point, in the coordinate system
represented by the supplied SkyFrame (radians).lat
- The latitude of the reference point, in the coordinate system
represented by the supplied SkyFrame (radians).AstException
- if an error occurred in the AST librarypublic String getAlignStdOfRest()
When astFindFrame or astConvert is used on two SpecFrames (potentially describing different spectral coordinate systems), it returns a Mapping which can be used to transform a position in one SpecFrame into the corresponding position in the other. The Mapping is made up of the following steps in the indicated order:
- Map values from the system used by the target (wavelength,
apparent radial velocity, etc) to the system specified by the
AlignSystem attribute, using the target's rest frequency if necessary.
- Map these values from the target's standard of rest to the standard of
rest specified by the AlignStdOfRest attribute, using the Epoch, ObsLat,
ObsLon, ObsAlt, RefDec and RefRA attributes of the target to define the
two standards of rest.
- Map these values from the standard of rest specified by the
AlignStdOfRest attribute, to the template's standard of rest, using the
Epoch, ObsLat, ObsLon, ObsAlt, RefDec and RefRA attributes of the
template to define the two standards of rest.
- Map these values from the system specified by the AlignSystem
attribute, to the system used by the template, using the template's
rest frequency if necessary.
public void setAlignStdOfRest(String alignStdOfRest)
When astFindFrame or astConvert is used on two SpecFrames (potentially describing different spectral coordinate systems), it returns a Mapping which can be used to transform a position in one SpecFrame into the corresponding position in the other. The Mapping is made up of the following steps in the indicated order:
- Map values from the system used by the target (wavelength,
apparent radial velocity, etc) to the system specified by the
AlignSystem attribute, using the target's rest frequency if necessary.
- Map these values from the target's standard of rest to the standard of
rest specified by the AlignStdOfRest attribute, using the Epoch, ObsLat,
ObsLon, ObsAlt, RefDec and RefRA attributes of the target to define the
two standards of rest.
- Map these values from the standard of rest specified by the
AlignStdOfRest attribute, to the template's standard of rest, using the
Epoch, ObsLat, ObsLon, ObsAlt, RefDec and RefRA attributes of the
template to define the two standards of rest.
- Map these values from the system specified by the AlignSystem
attribute, to the system used by the template, using the template's
rest frequency if necessary.
alignStdOfRest
- the AlignStdOfRest attribute of this objectpublic String getRefDec()
public void setRefDec(String refDec)
refDec
- the RefDec attribute of this objectpublic String getRefRA()
The SpecFrame class assumes this velocity correction is spatially invariant. If a single SpecFrame is used (for instance, as a component of a CmpFrame) to describe spectral values at different points on the sky, then it is assumes that the doppler shift at any spatial position is the same as at the reference position. The maximum velocity error introduced by this assumption is of the order of V*SIN(FOV), where FOV is the angular field of view, and V is the relative velocity of the two standards of rest. As an example, when correcting from the observers rest frame (i.e. the topocentric rest frame) to the kinematic local standard of rest the maximum value of V is about 20 km/s, so for 5 arc-minute field of view the maximum velocity error introduced by the correction will be about 0.03 km/s. As another example, the maximum error when correcting from the observers rest frame to the local group is about 5 km/s over a 1 degree field of view.
The RefRA and RefDec attributes are stored internally in radians, but are converted to and from a string for access. The format "hh:mm:ss.ss" is used for RefRA, and "dd:mm:ss.s" is used for RefDec. The methods astSetRefPos and astGetRefPos may be used to access the values of these attributes directly as unformatted values in radians.
The default for RefRA is "0:0:0".
public void setRefRA(String refRA)
The SpecFrame class assumes this velocity correction is spatially invariant. If a single SpecFrame is used (for instance, as a component of a CmpFrame) to describe spectral values at different points on the sky, then it is assumes that the doppler shift at any spatial position is the same as at the reference position. The maximum velocity error introduced by this assumption is of the order of V*SIN(FOV), where FOV is the angular field of view, and V is the relative velocity of the two standards of rest. As an example, when correcting from the observers rest frame (i.e. the topocentric rest frame) to the kinematic local standard of rest the maximum value of V is about 20 km/s, so for 5 arc-minute field of view the maximum velocity error introduced by the correction will be about 0.03 km/s. As another example, the maximum error when correcting from the observers rest frame to the local group is about 5 km/s over a 1 degree field of view.
The RefRA and RefDec attributes are stored internally in radians, but are converted to and from a string for access. The format "hh:mm:ss.ss" is used for RefRA, and "dd:mm:ss.s" is used for RefDec. The methods astSetRefPos and astGetRefPos may be used to access the values of these attributes directly as unformatted values in radians.
The default for RefRA is "0:0:0".
refRA
- the RefRA attribute of this objectpublic double getRestFreq()
This attribute specifies the frequency corresponding to zero velocity. It is used when converting between velocity-based coordinate systems and other coordinate systems (such as frequency, wavelength, energy). The units are GHz. The default value is 1.0E5 GHz.
public void setRestFreq(double restFreq)
This attribute specifies the frequency corresponding to zero velocity. It is used when converting between velocity-based coordinate systems and other coordinate systems (such as frequency, wavelength, energy). The units are GHz. The default value is 1.0E5 GHz.
restFreq
- the RestFreq attribute of this objectpublic void setRestFreq(String restFreq)
When setting a new value for this attribute, the new value can be supplied either directly as a frequency, or indirectly as a wavelength or energy, in which case the supplied value is converted to a frequency before being stored. The nature of the supplied value is indicated by appending text to the end of the numerical value indicating the units in which the value is supplied. If the units are not specified, then the supplied value is assumed to be a frequency in units of GHz. If the supplied unit is a unit of frequency, the supplied value is assumed to be a frequency in the given units. If the supplied unit is a unit of length, the supplied value is assumed to be a (vacuum) wavelength. If the supplied unit is a unit of energy, the supplied value is assumed to be an energy. For instance, the following strings all result in a rest frequency of around 1.4E14 Hz being used: "1.4E5", "1.4E14 Hz", "1.4E14 s**-1", "1.4E5 GHz", "2.14E-6 m", "21400 Angstrom", "9.28E-20 J", "9.28E-13 erg", "0.58 eV", etc.
When getting the value of this attribute, the returned value is always a frequency in units of GHz.
restFreq
- a string representing the new restFreq valuepublic void setGeoLat(String geoLat)
Frame.setObsLat(java.lang.String)
.public String getGeoLat()
Frame.getObsLat()
.public void setGeoLon(String geoLon)
Frame.setObsLon(java.lang.String)
.public String getGeoLon()
Frame.getObsLon()
.public String getSourceSys()
- "VRAD" or "VRADIO": Radio velocity (km/s) - "VOPT" or "VOPTICAL": Optical velocity (km/s) - "ZOPT" or "REDSHIFT": Redshift (dimensionless) - "BETA": Beta factor (dimensionless) - "VELO" or "VREL": Apparent radial ("relativistic") velocity (km/s)
When setting a new value for the SourceVel attribute, the source velocity should be supplied in the spectral system indicated by this attribute. Likewise, when getting the value of the SourceVel attribute, the velocity will be returned in this spectral system.
If the value of SourceSys is changed, the value stored for SourceVel will be converted from the old to the new spectral systems.
The default value is "VELO" (apparent radial velocity).
public void setSourceSys(String sourceSys)
- "VRAD" or "VRADIO": Radio velocity (km/s) - "VOPT" or "VOPTICAL": Optical velocity (km/s) - "ZOPT" or "REDSHIFT": Redshift (dimensionless) - "BETA": Beta factor (dimensionless) - "VELO" or "VREL": Apparent radial ("relativistic") velocity (km/s)
When setting a new value for the SourceVel attribute, the source velocity should be supplied in the spectral system indicated by this attribute. Likewise, when getting the value of the SourceVel attribute, the velocity will be returned in this spectral system.
If the value of SourceSys is changed, the value stored for SourceVel will be converted from the old to the new spectral systems.
The default value is "VELO" (apparent radial velocity).
sourceSys
- the SourceSys attribute of this objectpublic double getSourceVel()
When setting a value for SourceVel, the value should be supplied in the rest frame specified by the SourceVRF attribute. Likewise, when getting the value of SourceVel, it will be returned in the rest frame specified by the SourceVRF attribute.
The default SourceVel value is zero.
public void setSourceVel(double sourceVel)
When setting a value for SourceVel, the value should be supplied in the rest frame specified by the SourceVRF attribute. Likewise, when getting the value of SourceVel, it will be returned in the rest frame specified by the SourceVRF attribute.
The default SourceVel value is zero.
sourceVel
- the SourceVel attribute of this objectpublic double getSourceVRF()
If the value of SourceVRF is changed, the value stored for SourceVel will be converted from the old to the new rest frame.
The values which can be supplied are the same as for the StdOfRest attribute (except that SourceVRF cannot be set to "Source"). The default value is "Helio".
public void setSourceVRF(double sourceVRF)
If the value of SourceVRF is changed, the value stored for SourceVel will be converted from the old to the new rest frame.
The values which can be supplied are the same as for the StdOfRest attribute (except that SourceVRF cannot be set to "Source"). The default value is "Helio".
sourceVRF
- the SourceVRF attribute of this objectpublic String getStdOfRest()
The default StdOfRest value is "Helio".
- "Topocentric", "Topocent" or "Topo": The observers rest-frame (assumed
to be on the surface of the earth). Spectra recorded in this standard of
rest suffer a Doppler shift which varies over the course of a day
because of the rotation of the observer around the axis of the earth.
This standard of rest must be qualified using the ObsLat, ObsLon,
ObsAlt, Epoch, RefRA and RefDec attributes.
- "Geocentric", "Geocentr" or "Geo": The rest-frame of the earth centre.
Spectra recorded in this standard of rest suffer a Doppler shift which
varies over the course of a year because of the rotation of the earth
around the Sun. This standard of rest must be qualified using the Epoch,
RefRA and RefDec attributes.
- "Barycentric", "Barycent" or "Bary": The rest-frame of the solar-system
barycentre. Spectra recorded in this standard of rest suffer a Doppler
shift which depends both on the velocity of the Sun through the Local
Standard of Rest, and on the movement of the planets through the solar
system. This standard of rest must be qualified using the Epoch, RefRA
and RefDec attributes.
- "Heliocentric", "Heliocen" or "Helio": The rest-frame of the Sun.
Spectra recorded in this standard of rest suffer a Doppler shift which
depends on the velocity of the Sun through the Local Standard of Rest.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "LSRK", "LSR": The rest-frame of the kinematical Local Standard of
Rest. Spectra recorded in this standard of rest suffer a Doppler shift
which depends on the velocity of the kinematical Local Standard of Rest
through the galaxy. This standard of rest must be qualified using the
RefRA and RefDec attributes.
- "LSRD": The rest-frame of the dynamical Local Standard of Rest. Spectra
recorded in this standard of rest suffer a Doppler shift which depends
on the velocity of the dynamical Local Standard of Rest through the
galaxy. This standard of rest must be qualified using the RefRA and
RefDec attributes.
- "Galactic", "Galactoc" or "Gal": The rest-frame of the galactic centre.
Spectra recorded in this standard of rest suffer a Doppler shift which
depends on the velocity of the galactic centre through the local group.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "Local_group", "Localgrp" or "LG": The rest-frame of the local group.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "Source", or "src": The rest-frame of the source. This standard of
rest must be qualified using the RefRA, RefDec and SourceVel attributes.
Where more than one alternative System value is shown above, the first of these will be returned when an enquiry is made.
public void setStdOfRest(String stdOfRest)
The default StdOfRest value is "Helio".
- "Topocentric", "Topocent" or "Topo": The observers rest-frame (assumed
to be on the surface of the earth). Spectra recorded in this standard of
rest suffer a Doppler shift which varies over the course of a day
because of the rotation of the observer around the axis of the earth.
This standard of rest must be qualified using the ObsLat, ObsLon,
ObsAlt, Epoch, RefRA and RefDec attributes.
- "Geocentric", "Geocentr" or "Geo": The rest-frame of the earth centre.
Spectra recorded in this standard of rest suffer a Doppler shift which
varies over the course of a year because of the rotation of the earth
around the Sun. This standard of rest must be qualified using the Epoch,
RefRA and RefDec attributes.
- "Barycentric", "Barycent" or "Bary": The rest-frame of the solar-system
barycentre. Spectra recorded in this standard of rest suffer a Doppler
shift which depends both on the velocity of the Sun through the Local
Standard of Rest, and on the movement of the planets through the solar
system. This standard of rest must be qualified using the Epoch, RefRA
and RefDec attributes.
- "Heliocentric", "Heliocen" or "Helio": The rest-frame of the Sun.
Spectra recorded in this standard of rest suffer a Doppler shift which
depends on the velocity of the Sun through the Local Standard of Rest.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "LSRK", "LSR": The rest-frame of the kinematical Local Standard of
Rest. Spectra recorded in this standard of rest suffer a Doppler shift
which depends on the velocity of the kinematical Local Standard of Rest
through the galaxy. This standard of rest must be qualified using the
RefRA and RefDec attributes.
- "LSRD": The rest-frame of the dynamical Local Standard of Rest. Spectra
recorded in this standard of rest suffer a Doppler shift which depends
on the velocity of the dynamical Local Standard of Rest through the
galaxy. This standard of rest must be qualified using the RefRA and
RefDec attributes.
- "Galactic", "Galactoc" or "Gal": The rest-frame of the galactic centre.
Spectra recorded in this standard of rest suffer a Doppler shift which
depends on the velocity of the galactic centre through the local group.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "Local_group", "Localgrp" or "LG": The rest-frame of the local group.
This standard of rest must be qualified using the RefRA and RefDec
attributes.
- "Source", or "src": The rest-frame of the source. This standard of
rest must be qualified using the RefRA, RefDec and SourceVel attributes.
Where more than one alternative System value is shown above, the first of these will be returned when an enquiry is made.
stdOfRest
- the StdOfRest attribute of this objectCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.