A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.
A base class that defines default representation info for frames that
represent longitude and latitude as Right Ascension and Declination
following typical “equatorial” conventions.
It stores anything that should be computed from the coordinate data (not from
the frame attributes). This can be used in functions to store anything that
might be expensive to compute but might be re-used by some other function.
E.g.:
The coordinate data for this object. If this frame has no data, an
ValueError will be raised. Use has_data to
check if data is present on this frame object.
This will be a subclass from ~astropy.coordinates.BaseDifferential.
For simultaneous setting of representation and differentials, see the
set_representation_cls method.
Shorthand for a spherical representation of the positional data and a
~astropy.coordinates.SphericalCosLatDifferential for the velocity
data in this object.
Shorthand for the two-dimensional proper motion as a
~astropy.units.Quantity object with angular velocity units. In the
returned ~astropy.units.Quantity, axis=0 is the longitude/latitude
dimension so that .proper_motion[0] is the longitudinal proper
motion and .proper_motion[1] is latitudinal. The longitudinal proper
motion already includes the cos(latitude) term.
which ((‘base’, ‘s’, None)) – The class of which part to return. ‘base’ means the class used to
represent the coordinates; ‘s’ the first derivative to time, i.e.,
the class representing the proper motion and/or radial velocity.
If None, return a dict with both.
Returns:
representation
Return type:
~astropy.coordinates.BaseRepresentation or ~astropy.coordinates.BaseDifferential.
Set representation and/or differential class for this frame’s data.
Parameters:
base (str, ~astropy.coordinates.BaseRepresentation subclass, optional) – The name or subclass to use to represent the coordinate data.
s (~astropy.coordinates.BaseDifferential subclass, optional) – The differential subclass to use to represent any velocities,
such as proper motion and radial velocity. If equal to ‘base’,
which is the default, it will be inferred from the representation.
If None, the representation will drop any differentials.
Return a replica of the frame, optionally with new frame attributes.
The replica is a new frame object that has the same data as this frame
object and with frame attributes overridden if they are provided as extra
keyword arguments to this method. If copy is set to True then a
copy of the internal arrays will be made. Otherwise the replica will
use a reference to the original arrays when possible to save memory. The
internal arrays are normally not changeable by the user so in most cases
it should not be necessary to set copy to True.
Parameters:
copy (bool, optional) – If True, the resulting object is a copy of the data. When False,
references are used where possible. This rule also applies to the
frame attributes.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but possibly with new frame attributes.
Return a replica without data, optionally with new frame attributes.
The replica is a new frame object without data but with the same frame
attributes as this object, except where overridden by extra keyword
arguments to this method. The copy keyword determines if the frame
attributes are truly copied vs being references (which saves memory for
cases where frame attributes are large).
This method is essentially the converse of realize_frame.
Parameters:
copy (bool, optional) – If True, the resulting object has copies of the frame attributes.
When False, references are used where possible.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object.
Returns:
frameobj – Replica of this object, but without data and possibly with new frame
attributes.
Generates a new frame with new data from another frame (which may or
may not have data). Roughly speaking, the converse of
replicate_without_data.
Parameters:
data (~astropy.coordinates.BaseRepresentation) – The representation to use as the data for the new frame.
**kwargs – Any additional keywords are treated as frame attributes to be set on the
new frame object. In particular, representation_type can be specified.
Returns:
frameobj – A new object in this frame, with the same frame attributes as
this one, but with the data as the coordinate data.
Generate and return a new representation of this frame’s data
as a Representation object.
Note: In order to make an in-place change of the representation
of a Frame or SkyCoord object, set the representation
attribute of that object to the desired new representation, or
use the set_representation_cls method to also set the differential.
Parameters:
base (subclass of BaseRepresentation or string) – The type of representation to generate. Must be a class
(not an instance), or the string name of the representation
class.
s (subclass of ~astropy.coordinates.BaseDifferential, str, optional) – Class in which any velocities should be represented. Must be
a class (not an instance), or the string name of the
differential class. If equal to ‘base’ (default), inferred from
the base class. If None, all velocity information is dropped.
in_frame_units (bool, keyword-only) – Force the representation units to match the specified units
particular to this frame
Returns:
newrep – A new representation object of this frame’s data.
Determines if this coordinate frame can be transformed to another
given frame.
Parameters:
new_frame (~astropy.coordinates.BaseCoordinateFrame subclass or instance) – The proposed frame to transform into.
Returns:
transformable – True if this can be transformed to new_frame, False if
not, or the string ‘same’ if new_frame is the same system as
this object but no transformation is defined.
This will work even if some_unknown_frame turns out to be the same
frame class as coord. This is intended for cases where the frame
is the same regardless of the frame attributes (e.g. ICRS), but be
aware that it might also indicate that someone forgot to define the
transformation between two objects of the same frame class but with
different attributes.
Determine whether or not a frame attribute has its value because it’s
the default value, or because this frame was created with that value
explicitly requested.
Parameters:
attrnm (str) – The name of the attribute to check.
Returns:
isdefault – True if the attribute attrnm has its value by default, False if
it was specified at creation of this frame.
Checks if this object is the same frame as the other object.
To be the same frame, two objects must be the same frame class and have
the same frame attributes. Note that it does not matter what, if any,
data either object has.
Computes on-sky separation between this coordinate and another.
Note
If the other coordinate object is in a different frame, it is
first transformed to the frame of this object. This can lead to
unintuitive behavior if not accounted for. Particularly of note is
that self.separation(other) and other.separation(self) may
not give the same answer in this case.
Parameters:
other (~astropy.coordinates.BaseCoordinateFrame) – The coordinate to get the separation to.
Returns:
sep – The on-sky separation between this and the other coordinate.
Return type:
~astropy.coordinates.Angle
Notes
The separation is calculated using the Vincenty formula, which
is stable at all locations, including poles and antipodes [1]_.
Returns an instance containing the same data with a new shape.
Parameters are as for reshape(). Note that it is
not always possible to change the shape of an array without copying the
data (see reshape() documentation). If you want an error
to be raise if the data is copied, you should assign the new shape to
the shape attribute (note: this may not be implemented for all classes
using NDArrayShapeMethods).
Return an instance with the array collapsed into one dimension.
Parameters are as for ravel(). Note that it is
not always possible to unravel an array without copying the data.
If you want an error to be raise if the data is copied, you should
should assign shape (-1,) to the shape attribute.