Comet
Comet data is retrieved from the IAU Minor Planet Center.
starplot.Comet
dataclass
Comets can be created in three ways:
constellation_id
class-attribute
instance-attribute
Three-letter IAU id of the constellation that contains this object
healpix_index
class-attribute
instance-attribute
HEALPix pixel index of this object's RA/DEC
name
class-attribute
instance-attribute
Name of the comet (as designated by IAU Minor Planet Center)
observer
class-attribute
instance-attribute
observer: Observer = None
Observer of this comet instance
distance
class-attribute
instance-attribute
Distance to comet, in Astronomical units (the Earth-Sun distance of 149,597,870,700 m)
ephemeris
class-attribute
instance-attribute
Ephemeris used when retrieving this instance
geometry
class-attribute
instance-attribute
Shapely Point of the comet's position. Right ascension coordinates are in degrees (0...360).
create_optic
Creates an optic plot with this object at the center
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*args
|
args passed through to |
()
|
|
**kwargs
|
kwargs passed through to |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
OpticPlot |
new instance of a |
create_map
Creates a map plot with this object at the center
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height_degrees
|
float
|
Height of the map (degrees) |
required |
width_degrees
|
float
|
Width of the map (degrees) |
required |
*args
|
args passed through to |
()
|
|
**kwargs
|
kwargs passed through to |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
MapPlot |
new instance of a |
constellation
Returns an instance of the Constellation that contains this object, or None if no constellation is found.
populate_constellation_id
Populates the constellation_id field based on the location of this object
from_json
classmethod
Get a comet for a specific date/time/location from an IAU MPC JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
Dictionary of the IAU MPC JSON |
required |
observer
|
Observer
|
Observer instance that specifies a time and location |
None
|
ephemeris
|
str
|
Ephemeris to use for calculating comet positions (see Skyfield's documentation for details) |
'de440s.bsp'
|
all
classmethod
all(
observer: Observer = None,
ephemeris: str = "de440s.bsp",
reload: bool = False,
) -> Iterator[Comet]
Iterator for getting all comets at a specific date/time and observing location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observer
|
Observer
|
Observer instance that specifies a time and location |
None
|
ephemeris
|
str
|
Ephemeris to use for calculating comet positions (see Skyfield's documentation for details) |
'de440s.bsp'
|
reload
|
bool
|
If True, then the comet data file will be re-downloaded. Otherwise, it'll use the existing file if available. |
False
|
get
classmethod
get(
name: str,
observer: Observer = None,
ephemeris: str = "de440s.bsp",
reload: bool = False,
) -> Comet
Get a comet for a specific date/time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the comet you want to get (as designated by IAU Minor Planet Center) |
required |
observer
|
Observer
|
Observer instance that specifies a time and location |
None
|
ephemeris
|
str
|
Ephemeris to use for calculating comet positions (see Skyfield's documentation for details) |
'de440s.bsp'
|
reload
|
bool
|
If True, then the comet data file will be re-downloaded. Otherwise, it'll use the existing file if available. |
False
|
trajectory
trajectory(
date_start: datetime, date_end: datetime, step: timedelta | None = None
) -> Iterator[Comet]
Iterator for getting a trajectory of the comet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_start
|
datetime
|
Starting date/time for the trajectory (inclusive) |
required |
date_end
|
datetime
|
End date/time for the trajectory (exclusive) |
required |
step
|
timedelta | None
|
Time-step for the trajectory. Defaults to 1-day |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[Comet]
|
Iterator that yields a Comet instance at each step in the date range |