lsst_inaf_agile.catalog_star
Implement CatalogStar class.
Attributes
Classes
CatalogStar class. |
Module Contents
- 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.
- 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.
- get_lightcurve_mjd(i, band, mjd, mjd0)[source]
Estimate a star lightcurve.
Convenience function for handling all different classes of stars.
- get_lightcurve_mjd_lpv(i, band, mjd, mjd0, is_c_rich)[source]
Estimate a long-period variable 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)