Star
starplot.Star
dataclass
Star model.
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
pk
instance-attribute
Primary key of object in catalog. Needs to be unique across all objects in the catalog.
geometry
instance-attribute
Shapely Point of the star's position. Right ascension coordinates are in degrees (0...360).
ccdm
class-attribute
instance-attribute
CCDM Component Identifier (if applicable)
parallax_mas
class-attribute
instance-attribute
Trigonometric parallax in milliarcseconds
ra_mas_per_year
class-attribute
instance-attribute
Right ascension proper motion in milliarcseconds per Julian year
dec_mas_per_year
class-attribute
instance-attribute
Declination proper motion in milliarcseconds per Julian year
flamsteed
class-attribute
instance-attribute
Flamsteed number, if available
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
all
classmethod
all(catalog: Catalog = BIG_SKY_MAG11) -> Iterator[Star]
Get all stars from a catalog
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Catalog you want to get star objects from |
BIG_SKY_MAG11
|
Returns:
| Type | Description |
|---|---|
Iterator[Star]
|
Iterator of Star instances |
get
classmethod
get(
catalog: Catalog = BIG_SKY_MAG11, sql: str | None = None, **kwargs
) -> Union[Star, None]
Get a Star, by matching its attributes as specified in **kwargs
If there are multiple matches, then the first match (sorted by CCDM) will be returned.
Example:
sirius = Star.get(name="Sirius")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
The catalog of stars to use |
BIG_SKY_MAG11
|
sql
|
str | None
|
SQL query for selecting star (table name is "_") |
None
|
**kwargs
|
Attributes on the star you want to match |
{}
|
Returns:
| Type | Description |
|---|---|
Union[Star, None]
|
First star that matches specified attributes, when sorted by CCDM -- or |
find
classmethod
find(
catalog: Catalog = BIG_SKY_MAG11,
where: list | None = None,
sql: str | None = None,
) -> list[Star]
Find Stars
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
The catalog of stars to use |
BIG_SKY_MAG11
|
where
|
list | None
|
A list of expressions that determine which stars to find. See Selecting Objects for details. |
None
|
sql
|
str | None
|
SQL query for selecting stars (table name is "_") |
None
|
Returns:
| Type | Description |
|---|---|
list[Star]
|
List of Stars that match all |