Target Instance#

A Target is used to customize and store the metadata associated with the target, including coordinates, priors, and which photometry will be queried.

class stelpar.Target(name, coords=None, **coord_kwargs)[source]#

Creates the object that holds target-specific metadata that can be accessed and used by the simulation.

Parameters:
  • name (str) – The target name. If coords=None, the target name will be used when querying for photometry.

  • coords (None, list-like, or astropy.coordinates.SkyCoord; optional) –

    • None (default): name will be used to query photometry.

    • list-like object of the form (RA, DEC): will create a SkyCoord instance. Additional options (e.g., units) must be passed to coord_kwargs.

    • astropy.coordinates.SkyCoord: coord_kwargs is ignored.

    If list-like or astropy.coordinates.SkyCoord, these coordinates will be used to query photometry.

  • coord_kwargs (optional) – Any additional keyword arguments passed to astropy.coordinates.SkyCoord when passing a list-like to coords.

Attributes:
initial_conditions

A pandas.DataFrame containing initial conditions such as bounds, priors, and initial walker positions in parameter space.

isochrone_analogs

A list of keywords associated with all the photometry bands available in the isochrone models.

moves

The object from emcee.moves which control the algorithm for updating the positions of the walkers.

photometry_meta

A pandas.DataFrame containing metadata for the photometry query including catalog and band identifiers.

plx

The (parallax, error) pair given in arcsec.

Methods

add_photometry(photometry_dict)

Add catalogs and/or bands to the photometry query.

remove_photometry(photometry_dict)

Remove catalogs and/or bands from being queried.

reset([params, conds, moves, photometry])

Resets the photometry metadata to default values.

show_metadata()

Displays a collection of all the metadata associated with the Target instance.

add_photometry(photometry_dict)[source]#

Add catalogs and/or bands to the photometry query.

Parameters:

photometry_dict (dict) – A nested dictionary accessed by the catalog identifier containing column names for magnitude and error. See the Target tutorial for an example.

property initial_conditions#

A pandas.DataFrame containing initial conditions such as bounds, priors, and initial walker positions in parameter space.

property isochrone_analogs#

A list of keywords associated with all the photometry bands available in the isochrone models.

property moves#

The object from emcee.moves which control the algorithm for updating the positions of the walkers.

See https://emcee.readthedocs.io/en/stable/user/moves/ for more information.

property photometry_meta#

A pandas.DataFrame containing metadata for the photometry query including catalog and band identifiers.

property plx#

The (parallax, error) pair given in arcsec. If the user provides a parallax and error, plx will be a 1-dimensional list-like with two values. Otherwise, plx will be None.

remove_photometry(photometry_dict)[source]#

Remove catalogs and/or bands from being queried.

Parameters:

photometry_dict (dict) –

A dictionary whose key is the catalog identifier(s). For each catalog there are two options.

  • Remove all photometry associated with that catalog: the value of the dictionary is “all”.

  • Remove one or multiple bands: the value of the dictionary is the band keyword string or a list of such strings.

See the Target tutorial for an example.

reset(params=None, conds=None, moves=True, photometry=True)[source]#

Resets the photometry metadata to default values.

Parameters:
  • params (list of str, optional) – The list of parameters whose initial conditions are to be reset to default. If None, all parameters will be reset. The default is None.

  • conds (list of str, optional) – The list of conditions which are to be reset to default. If None, all conditions will be reset. The default is None.

  • moves (bool, optional) – If True, resets moves to default (emcee.moves.StretchMove, 1.0). If False, does not reset the moves. The default is True.

  • photometry (bool, optional) – If True, resets photometry metadata to default. If False, does not reset the photometry metadata. The default is True.

show_metadata()[source]#

Displays a collection of all the metadata associated with the Target instance.