Skip to content

Star

starplot.Star dataclass

Star model.

ra instance-attribute

ra: float

Right Ascension, in degrees (0 to 360)

dec instance-attribute

dec: float

Declination, in degrees (-90 to 90)

constellation_id class-attribute instance-attribute

constellation_id: str | None = None

Three-letter IAU id of the constellation that contains this object

healpix_index class-attribute instance-attribute

healpix_index: int = None

HEALPix pixel index of this object's RA/DEC

pk instance-attribute

pk: int

Primary key of object in catalog. Needs to be unique across all objects in the catalog.

magnitude instance-attribute

magnitude: float

Magnitude

geometry instance-attribute

geometry: Point

Shapely Point of the star's position. Right ascension coordinates are in degrees (0...360).

epoch_year class-attribute instance-attribute

epoch_year: float = None

Epoch of position

bv class-attribute instance-attribute

bv: float | None = None

B-V Color Index, if available

hip class-attribute instance-attribute

hip: int | None = None

Hipparcos Catalog ID, if available

tyc class-attribute instance-attribute

tyc: str | None = None

Tycho ID, if available

ccdm class-attribute instance-attribute

ccdm: str | None = None

CCDM Component Identifier (if applicable)

parallax_mas class-attribute instance-attribute

parallax_mas: float = None

Trigonometric parallax in milliarcseconds

ra_mas_per_year class-attribute instance-attribute

ra_mas_per_year: float = None

Right ascension proper motion in milliarcseconds per Julian year

dec_mas_per_year class-attribute instance-attribute

dec_mas_per_year: float = None

Declination proper motion in milliarcseconds per Julian year

name class-attribute instance-attribute

name: str | None = None

Name, if available

bayer class-attribute instance-attribute

bayer: str | None = None

Bayer designation, if available

flamsteed class-attribute instance-attribute

flamsteed: int | None = None

Flamsteed number, if available

create_optic

create_optic(*args, **kwargs)

Creates an optic plot with this object at the center

Parameters:

Name Type Description Default
*args

args passed through to OpticPlot()

()
**kwargs

kwargs passed through to OpticPlot()

{}

Returns:

Name Type Description
OpticPlot

new instance of a OpticPlot

create_map

create_map(height_degrees: float, width_degrees: float, *args, **kwargs)

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 MapPlot()

()
**kwargs

kwargs passed through to MapPlot()

{}

Returns:

Name Type Description
MapPlot

new instance of a MapPlot

constellation

constellation()

Returns an instance of the Constellation that contains this object, or None if no constellation is found.

populate_constellation_id

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 None if no star matches

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 where expressions

get_label classmethod

get_label(star) -> str

Default function for determining the plotted label for a Star.

Returns:

Type Description
str

The star's name