DSO
starplot.DSO
dataclass
Deep Sky Object (DSO) model. An instance of this model is passed to any callables you define when plotting DSOs. So, you can use any attributes of this model in your callables. Note that some may be null.
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 Polygon of the DSO's extent. Right ascension coordinates are in degrees (0...360).
common_names
class-attribute
instance-attribute
List of common names for the DSO (e.g. 'Andromeda Galaxy' for M31)
Note: this field is parsed into a list of strings after querying DSOs, so if you want to query on this field, you should treat it as a comma-separated list.
magnitude
class-attribute
instance-attribute
Magnitude (if available)
maj_ax
class-attribute
instance-attribute
Major axis of the DSO, in arcmin (if available)
min_ax
class-attribute
instance-attribute
Minor axis of the DSO, in arcmin (if available)
angle
class-attribute
instance-attribute
Angle of the DSO, in degrees (if available)
size
class-attribute
instance-attribute
Size of the DSO calculated as the area of the minimum bounding rectangle of the DSO, in degrees squared (if available)
m
class-attribute
instance-attribute
Messier number. Note that this field is a string, to be consistent with the other identifier fields (ngc and ic).
ngc
class-attribute
instance-attribute
New General Catalogue (NGC) identifier. Note that this field is a string, to support objects like '3537 NED01'.
ic
class-attribute
instance-attribute
Index Catalogue (IC) identifier. Note that this field is a string, to support objects like '4974 NED01'.
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
get
classmethod
Get a DSO, by matching its attributes.
Example:
d = DSO.get(m=13)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Catalog you want to search |
OPEN_NGC
|
sql
|
str | None
|
SQL query for selecting DSO (table name is "_") |
None
|
**kwargs
|
Attributes on the DSO you want to match |
{}
|
Raises: ValueError if more than one DSO is matched
find
classmethod
find(
catalog: Catalog = OPEN_NGC,
where: list | None = None,
sql: str | None = None,
) -> list[DSO]
Find DSOs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
Catalog
|
Catalog you want to search |
OPEN_NGC
|
where
|
list | None
|
A list of expressions that determine which DSOs to find. See Selecting Objects for details. |
None
|
sql
|
str | None
|
SQL query for selecting DSOs (table name is "_") |
None
|
Returns:
| Type | Description |
|---|---|
list[DSO]
|
List of DSOs that match all |
starplot.models.dso.DsoType
Type of deep sky object (DSO), as designated in OpenNGC
ASSOCIATION_OF_STARS
class-attribute
instance-attribute
Association of stars
DOUBLE_STAR
class-attribute
instance-attribute
Double star or multiple star system
DUPLICATE_RECORD
class-attribute
instance-attribute
Duplicate record of another object
GLOBULAR_CLUSTER
class-attribute
instance-attribute
Globular cluster of stars
GROUP_OF_GALAXIES
class-attribute
instance-attribute
Group of more than three galaxies
HII_IONIZED_REGION
class-attribute
instance-attribute
Hydrogen ionized region
STAR_CLUSTER_NEBULA
class-attribute
instance-attribute
Star cluster with nebulosity