rail.creation.engines.gcr_engine module
Stage that loads a catalog from GCRCatalogs.
- class rail.creation.engines.gcr_engine.GCRCreator
Bases:
CreatorCreator that returns a catalog from GCRCatalogs.
For info on GCRCatalogs, see https://github.com/LSSTDESC/gcr-catalogs
See https://github.com/LSSTDESC/gcr-catalogs/blob/master/examples/GCRCatalogs%20Demo.ipynb for how to get available options for catalog_name.
See https://github.com/LSSTDESC/gcr-catalogs/blob/master/GCRCatalogs/SCHEMA.md for all options for quantities to query.
- Parameters:
output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.
n_samples ([int] (required)) – Number of samples to create
seed ([int] default=12345) – Random number seed
gcr_root_dir ([str] default=/global/cfs/cdirs/lsst/shared) – The path to the GCR catalogs.
catalog_name ([str] default=cosmoDC2_v1.1.4_small) – The name of the GCR catalog to load.
quantities ([list] default=['redshift', 'mag_u_lsst', 'mag_g_lsst', 'mag_r_lsst', 'mag_i_lsst', 'mag_z_lsst', 'mag_y_lsst', 'size_true', 'size_minor_true']) – The quantities to query from the catalog.
filters ([list] default=['mag_i_lsst < 26.5']) – Filters passed to the GCR query.
model (ModelHandle (INPUT))
output (PqHandle (OUTPUT))
- __init__(args, **kwargs)
Initialize Creator
- entrypoint_function: str | None = 'sample'
- interactive_function: str | None = 'gcr_loader'
- name = 'GCRLoader'
- outputs = [('output', <class 'rail.core.data.PqHandle'>)]
- run()
Load the GCR catalog, subsample, and return pandas DataFrame.