ATK.Models.HRD#

class ATK.Models.HRD[source]#

Bases: Container, DataFrameIOMixin, TableIOMixin, FITSIOMixin

Container for storing the location of sources on the Hertzsprung-Russell Diagram. This object stores both data and relevant metadata.

Units

The following attributes are automatically converted to Quantity with a default unit unless one is explictly provided:

  • colour - mag

  • abs_mag - mag

  • distance - pc


Plotting Arguments

The following keyword arguments are accepted when plotting via plot() or open().

splitbool, optional

If True, multiple HRDs in a DataSet are plotted independently. Otherwise, combine into a single HRD plot.”

Default is True.

backgroundfloat, optional

Sets the fraction of the background sample that is rendered, from 0.0 for no background to 1.0 for the full background sample.

Default is 1.0.




Attributes

abs_mag

Absolute magnitude value in band given by abs_mag_band, calculated using distance.

abs_mag_band

Apparent magnitude band from which to calculate absolute magnitude.

colour

Colour value in colour defined by colour_bands.

colour_bands

Colour bands.

correction

Achieved degree of proper motion correction.

distance

Distance to source, as derived from parallax.

identifier

Gaia Source ID.

survey

Survey from which the stored data originates.

Methods

from_dataframe(target, data, **kwargs)

Construct a HRD from a DataFrame.

from_table(target, data, **kwargs)

Construct a HRD from a Table.

show([show_types, show_all])

Prints structure to stdout in a human-readable format.

to_dataframe()

Combines all array-like attributes of a structure into a DataFrame.

to_hdu()

Converts structure into a FITS BinTableHDU.

to_table()

Combines all array-like attributes of a structure into a Table, preserving units.



Attribute Descriptions

abs_mag: ndarray | None = None#

Absolute magnitude value in band given by abs_mag_band, calculated using distance.

abs_mag_band: str | None = None#

Apparent magnitude band from which to calculate absolute magnitude.

E.g. abs_mag_band = 'Gmag'

colour: ndarray | None = None#

Colour value in colour defined by colour_bands.

colour_bands: str | None = None#

Colour bands.

E.g. colour_bands = 'BPmag-RPmag'

correction: str | None = None#

Achieved degree of proper motion correction.

  • 'full' = complete 3-dimensional projection on the sky.

  • 'partial' = 2-dimensional plane projection.

  • 'none' = no correction.

distance: Quantity | None = None#

Distance to source, as derived from parallax.

identifier: int | None = None#

Gaia Source ID.

survey: str | None = None#

Survey from which the stored data originates.


Method Descriptions

classmethod from_dataframe(target, data, **kwargs)#

Construct a HRD from a DataFrame.

Parameters:
targetTarget, int, or SkyCoord

Astronomical target with which to associate input data.

Can be a Target, a Gaia Source ID (int), or a SkyCoord.

dataDataFrame

Tabular data containing the relevant fields (i.e. array-like attributes) required to construct a HRD. Units are assumed to be as listed above.

**kwargs

Additional keyword arguments to be forwarded to the internal parser.

The following keyword arguments are required: survey

Returns:
HRD
classmethod from_table(target, data, **kwargs)#

Construct a HRD from a Table.

Parameters:
targetTarget, int, or SkyCoord

Astronomical target with which to associate input data.

Can be a Target, a Gaia Source ID (int), or a SkyCoord.

dataTable

Tabular data containing the relevant fields (i.e. array-like attributes) required to construct a HRD. Units are taken from the table where available, with missing units assumed to be those listed above.

**kwargs

Additional keyword arguments to be forwarded to the internal parser.

The following keyword arguments are required: survey

Returns:
HRD
show(show_types=False, show_all=False)#

Prints structure to stdout in a human-readable format.

Parameters:
show_typesbool, optional

If True, print data types of structure attributes.

Default is False

show_allbool, optional

If True, do not truncate printing of large iterables.

Default is False.

Returns:
self
to_dataframe()#

Combines all array-like attributes of a structure into a DataFrame.

Units are not preserved.

Returns:
DataFrame
to_hdu() BinTableHDU#

Converts structure into a FITS BinTableHDU.

Returns:
BinTableHDU
to_table()#

Combines all array-like attributes of a structure into a Table, preserving units.

Returns:
Table