lsst_inaf_agile.catalog_star

Implement CatalogStar class.

Attributes

logger

Classes

CatalogStar

CatalogStar class.

Module Contents

logger[source]
class CatalogStar(dirname, catalog_galaxy, is_binary)[source]

CatalogStar class.

Catalog star correspond to the stellar catalog (either star OR binary). Refer to dal Tio+ for the details.

dirname[source]
catalog_galaxy[source]
is_binary[source]
filename[source]
stars = None[source]
catalog[source]
get_catalog()[source]

Build the star catalog.

__getitem__(k)[source]

Return column corresponding to ‘k’.

get_stars(selection='rmag', maglim=28)[source]

Query NOIRlab to retrieve the stellar catalogs from LSST-SIM.

Parameters:
  • selection (str) – Column name for selection in terms of magnitude.

  • maglim (float) – Magnitude limit for the ‘selection’ column.

is_cepheid(i)[source]

Return true if star ‘i’ is a cepheid star.

is_c_rich(i=None)[source]
is_lpv(i, orich=True, crich=True)[source]

Return true if star ‘i’ is a long-period variable star.

get_lightcurve_mjd(i, band, mjd, mjd0)[source]

Estimate a star lightcurve.

Convenience function for handling all different classes of stars.

get_lightcurve_mjd_cepheid(i, band, mjd, mjd0)[source]

Estimate a cepheid star lightcurve.

get_lightcurve_mjd_lpv(i, band, mjd, mjd0, is_c_rich)[source]

Estimate a long-period variable star lightcurve.

get_lightcurve_mjd_binary(i, band, mjd, mjd0)[source]

Estimate a binary star lightcurve.

static get_star_binary_fbin(catalog_star, catalog_binary, fbin=0.4, nrepeat=4, seed=1206)[source]

Return a binary star catalog according to the description of dal Tio+ and the definition of fbin.

According to dal Tio+ Sec. 3.2: (https://iopscience.iop.org/article/10.3847/1538-4365/ac7be6/pdf)

`` Therefore, for the moment, we recommend a fbin value of 0.4, as being both most robust (see Dal Tio et al. 2021) and more consistent with the way the stellar densities were originally calibrated in TRILEGAL. As we simulated only one-tenth of expected binaries, the fbin value of 0.4 can be achieved by randomly selecting 60% of single stars and by multiplying by 4 times the number of binary systems present in the same regions. ``

Parameters:
  • star (CatalogStar) – Input single CatalogStar

  • binary (CatalogStar) – Input binary CatalogStar

  • fbin (float) – Assumed fbin value. Stars will be downsampled to 1 - fbin of the original size

  • nrepeat (int) – Number of repeats on binary star catalog.

  • seed (int) – Random number seed.

Returns:

star2, binary2 – Down- and upsampled stellar and binary star catalogs.

Return type:

tuple[ArrayLike, ArrayLike]

Examples

>>> from astropy.table import Table
>>> from . import CatalogStar
>>> # Create mock catalogs with sizes (1000, 100)
>>> star = Table({"a": [0.0] * 1000})
>>> binary = Table({"a": [0.0] * 100, "b": [0.0] * 100})
>>> star2, binary2 = CatalogStar.get_star_binary_fbin(star, binary)
>>> len(star2), len(binary2)
(617, 400)
>>> # Small catalog will warn about insufficient statistics but succeeds
>>> star = Table({"a": [0.0] * 5})
>>> binary = Table({"a": [0.0] * 2, "b": [0.0] * 2})
>>> star2, binary2 = CatalogStar.get_star_binary_fbin(star, binary)
>>> len(star2), len(binary2)
(2, 8)