public class SkyFrame extends Frame
For each of the supported celestial coordinate systems, a SkyFrame can apply an optional shift of origin to create a coordinate system representing offsets within the celestial coordinate system from some specified reference point. This offset coordinate system can also be rotated to define new longitude and latitude axes. See attributes SkyRef, SkyRefIs, SkyRefP and AlignOffset.
All the coordinate values used by a SkyFrame are in radians. These may be formatted in more conventional ways for display by using astFormat.
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 |
---|
SkyFrame()
Create a SkyFrame.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAlignOffset()
Get
align SkyFrames using the offset coordinate system.
|
boolean |
getAsTime(int axis)
Get
format celestal coordinates as times by axis.
|
double |
getEquinox()
Get
epoch of the mean equinox.
|
int |
getLatAxis()
Get
index of the latitude axis.
|
int |
getLonAxis()
Get
index of the longitude axis.
|
boolean |
getNegLon()
Get
display negative longitude values.
|
String |
getProjection()
Get
sky projection description.
|
String |
getSkyRef()
Get
position defining the offset coordinate system.
|
double |
getSkyRef(int axis)
Get
position defining the offset coordinate system by axis.
|
String |
getSkyRefIs()
Get
selects the nature of the offset coordinate system.
|
String |
getSkyRefP()
Get
position on primary meridian of offset coordinate system.
|
double |
getSkyRefP(int axis)
Get
position on primary meridian of offset coordinate system by axis.
|
void |
setAlignOffset(boolean alignOffset)
Set
align SkyFrames using the offset coordinate system.
|
void |
setAsTime(int axis,
boolean asTime)
Set
format celestal coordinates as times by axis.
|
void |
setEquinox(double equinox)
Set
epoch of the mean equinox.
|
void |
setNegLon(boolean negLon)
Set
display negative longitude values.
|
void |
setProjection(String projection)
Set
sky projection description.
|
void |
setSkyRef(int axis,
double skyRef)
Set
position defining the offset coordinate system by axis.
|
void |
setSkyRef(String skyRef)
Set
position defining the offset coordinate system.
|
void |
setSkyRefIs(String skyRefIs)
Set
selects the nature of the offset coordinate system.
|
void |
setSkyRefP(int axis,
double skyRefP)
Set
position on primary meridian of offset coordinate system by axis.
|
void |
setSkyRefP(String skyRefP)
Set
position on primary meridian of offset coordinate system.
|
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 SkyFrame()
AstException
- if an error occurred in the AST librarypublic boolean getAsTime(int axis)
If the AsTime attribute for a SkyFrame axis is zero, then coordinates on that axis will be formatted as angles by default (using degrees, minutes and seconds), otherwise they will be formatted as times (using hours, minutes and seconds).
The default value of AsTime is chosen according to the sky coordinate system being represented, as determined by the SkyFrame's System attribute. This ensures, for example, that right ascension values will be formatted as times by default, following normal conventions.
axis
- index of the axis for which the attribute is to be got.
Must be >= 1 and <= the value of the Naxes
attribute.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public void setAsTime(int axis, boolean asTime)
If the AsTime attribute for a SkyFrame axis is zero, then coordinates on that axis will be formatted as angles by default (using degrees, minutes and seconds), otherwise they will be formatted as times (using hours, minutes and seconds).
The default value of AsTime is chosen according to the sky coordinate system being represented, as determined by the SkyFrame's System attribute. This ensures, for example, that right ascension values will be formatted as times by default, following normal conventions.
axis
- index of the axis for which the attribute is to be set.
Must be >= 1 and <= the value of the Naxes
attribute.asTime
- the AsTime attribute for the indicated axis
of this object.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public double getEquinox()
Both of these planes are in motion and their positions are difficult to specify precisely. In practice, therefore, a model ecliptic and/or equator are used instead. These, together with the point on the sky that defines the coordinate origin (the intersection of the two planes termed the "mean equinox") move with time according to some model which removes the more rapid fluctuations. The SkyFrame class supports both the FK4 and FK5 models.
The position of a fixed source expressed in any of these coordinate systems will appear to change with time due to movement of the coordinate system itself (rather than motion of the source). Such coordinate systems must therefore be qualified by a moment in time (the "epoch of the mean equinox" or "equinox" for short) which allows the position of the model coordinate system on the sky to be determined. This is the role of the Equinox attribute.
The Equinox attribute is stored as a Modified Julian Date, but when setting or getting its value you may use the same formats as for the Epoch attribute (q.v.).
The default Equinox value is B1950.0 (Besselian) for the old FK4-based coordinate systems (see the System attribute) and J2000.0 (Julian) for all others.
public void setEquinox(double equinox)
Both of these planes are in motion and their positions are difficult to specify precisely. In practice, therefore, a model ecliptic and/or equator are used instead. These, together with the point on the sky that defines the coordinate origin (the intersection of the two planes termed the "mean equinox") move with time according to some model which removes the more rapid fluctuations. The SkyFrame class supports both the FK4 and FK5 models.
The position of a fixed source expressed in any of these coordinate systems will appear to change with time due to movement of the coordinate system itself (rather than motion of the source). Such coordinate systems must therefore be qualified by a moment in time (the "epoch of the mean equinox" or "equinox" for short) which allows the position of the model coordinate system on the sky to be determined. This is the role of the Equinox attribute.
The Equinox attribute is stored as a Modified Julian Date, but when setting or getting its value you may use the same formats as for the Epoch attribute (q.v.).
The default Equinox value is B1950.0 (Besselian) for the old FK4-based coordinate systems (see the System attribute) and J2000.0 (Julian) for all others.
equinox
- the Equinox attribute of this objectpublic int getLatAxis()
public int getLonAxis()
public boolean getNegLon()
If the NegLon attribute is zero, then normalized longitude values will be in the range zero to 2.pi. If NegLon is non-zero, then normalized longitude values will be in the range -pi to pi.
The default value depends on the current value of the SkyRefIs attribute, If SkyRefIs has a value of "Origin", then the default for NegLon is one, otherwise the default is zero.
public void setNegLon(boolean negLon)
If the NegLon attribute is zero, then normalized longitude values will be in the range zero to 2.pi. If NegLon is non-zero, then normalized longitude values will be in the range -pi to pi.
The default value depends on the current value of the SkyRefIs attribute, If SkyRefIs has a value of "Origin", then the default for NegLon is one, otherwise the default is zero.
negLon
- the NegLon attribute of this objectpublic String getProjection()
The Projection value is purely descriptive and does not affect the celestial coordinate system represented by the SkyFrame in any way. If it is set to a non-blank string, the description provided may be used when forming the default value for the SkyFrame's Title attribute (so that typically it will appear in graphical output, for instance). The default value is an empty string.
public void setProjection(String projection)
The Projection value is purely descriptive and does not affect the celestial coordinate system represented by the SkyFrame in any way. If it is set to a non-blank string, the description provided may be used when forming the default value for the SkyFrame's Title attribute (so that typically it will appear in graphical output, for instance). The default value is an empty string.
projection
- the Projection attribute of this objectpublic boolean getAlignOffset()
If the template and target SkyFrames both have defined offset coordinate systems (i.e. the SkyRefIs attribute is set to either "Origin" or " Pole"), and they both have a non-zero value for AlignOffset, then alignment occurs within the offset coordinate systems (that is, a UnitMap will always be used to align the two SkyFrames). If either the template or target SkyFrame has zero (the default value) for AlignOffset, or if either SkyFrame has SkyRefIs set to "Ignored", then alignment occurring within the coordinate system specified by the AlignSystem attribute.
public void setAlignOffset(boolean alignOffset)
If the template and target SkyFrames both have defined offset coordinate systems (i.e. the SkyRefIs attribute is set to either "Origin" or " Pole"), and they both have a non-zero value for AlignOffset, then alignment occurs within the offset coordinate systems (that is, a UnitMap will always be used to align the two SkyFrames). If either the template or target SkyFrame has zero (the default value) for AlignOffset, or if either SkyFrame has SkyRefIs set to "Ignored", then alignment occurring within the coordinate system specified by the AlignSystem attribute.
alignOffset
- the AlignOffset attribute of this objectpublic String getSkyRefIs()
If SkyRefIs is set to "Origin", then the coordinate system represented by the SkyFrame is modified to put the origin of longitude and latitude at the position specified by the SkyRef attribute.
If SkyRefIs is set to "Pole", then the coordinate system represented by the SkyFrame is modified to put the north pole at the position specified by the SkyRef attribute.
If SkyRefIs is set to "Ignored" (the default), then any value set for the SkyRef attribute is ignored, and the SkyFrame represents the coordinate system specified by the System attribute directly without any rotation.
public void setSkyRefIs(String skyRefIs)
If SkyRefIs is set to "Origin", then the coordinate system represented by the SkyFrame is modified to put the origin of longitude and latitude at the position specified by the SkyRef attribute.
If SkyRefIs is set to "Pole", then the coordinate system represented by the SkyFrame is modified to put the north pole at the position specified by the SkyRef attribute.
If SkyRefIs is set to "Ignored" (the default), then any value set for the SkyRef attribute is ignored, and the SkyFrame represents the coordinate system specified by the System attribute directly without any rotation.
skyRefIs
- the SkyRefIs attribute of this objectpublic double getSkyRef(int axis)
If an integer axis index is included in the attribute name (e.g. "SkyRef(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRef") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
The default values for SkyRef are zero longitude and zero latitude.
axis
- index of the axis for which the attribute is to be got.
Must be >= 1 and <= the value of the Naxes
attribute.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public void setSkyRef(int axis, double skyRef)
If an integer axis index is included in the attribute name (e.g. "SkyRef(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRef") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
The default values for SkyRef are zero longitude and zero latitude.
axis
- index of the axis for which the attribute is to be set.
Must be >= 1 and <= the value of the Naxes
attribute.skyRef
- the SkyRef attribute for the indicated axis
of this object.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public String getSkyRef()
If an integer axis index is included in the attribute name (e.g. "SkyRef(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRef") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
The default values for SkyRef are zero longitude and zero latitude.
public void setSkyRef(String skyRef)
If an integer axis index is included in the attribute name (e.g. "SkyRef(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRef") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
The default values for SkyRef are zero longitude and zero latitude.
skyRef
- the SkyRef attribute of this objectpublic double getSkyRefP(int axis)
If an integer axis index is included in the attribute name (e.g. "SkyRefP(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRefP") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
axis
- index of the axis for which the attribute is to be got.
Must be >= 1 and <= the value of the Naxes
attribute.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public void setSkyRefP(int axis, double skyRefP)
If an integer axis index is included in the attribute name (e.g. "SkyRefP(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRefP") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
axis
- index of the axis for which the attribute is to be set.
Must be >= 1 and <= the value of the Naxes
attribute.skyRefP
- the SkyRefP attribute for the indicated axis
of this object.IndexOutOfBoundsException
- if axis
is not in the
range 1..Naxes
public String getSkyRefP()
If an integer axis index is included in the attribute name (e.g. "SkyRefP(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRefP") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
public void setSkyRefP(String skyRefP)
If an integer axis index is included in the attribute name (e.g. "SkyRefP(1)") then the attribute value should be supplied as a single floating point axis value, in radians, when setting a value for the attribute, and will be returned in the same form when getting the value of the attribute. In this case the integer axis index should be "1" or "2" (the values to use for longitude and latitude axes are given by the LonAxis and LatAxis attributes).
If no axis index is included in the attribute name (e.g. "SkyRefP") then the attribute value should be supplied as a character string containing two formatted axis values (an axis 1 value followed by a comma, followed by an axis 2 value). The same form will be used when getting the value of the attribute.
skyRefP
- the SkyRefP attribute of this objectCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.