hyrax.data_sets.lsst_dataset

Attributes

logger

Classes

LSSTDataset

LSSTDataset: A dataset to access deep_coadd images from lsst pipelines

Module Contents

logger[source]
class LSSTDataset(config)[source]

Bases: hyrax.data_sets.data_set_registry.HyraxDataset, hyrax.data_sets.data_set_registry.HyraxImageDataset, torch.utils.data.Dataset

LSSTDataset: A dataset to access deep_coadd images from lsst pipelines via the butler. Must be run in an RSP.

__init__()[source]

Initialize the dataset with either a HATS catalog or astropy table.

Config can specify either: - config[“data_set”][“hats_catalog”]: path to HATS catalog - config[“data_set”][“astropy_table”]: path to any file readable by Astropy Table

BANDS = ['u', 'g', 'r', 'i', 'z', 'y'][source]
catalog[source]
sh_deg[source]
sw_deg[source]
_load_catalog(data_set_config)[source]

Load the catalog from either a HATS catalog or an astropy table.

_load_hats_catalog(hats_path)[source]

Load catalog from HATS format using LSDB.

_load_astropy_catalog(table_path)[source]

Load catalog from astropy table format or pickled astropy table.

__len__()[source]
__getitem__(idxs)[source]
_parse_box(patch, row)[source]

Return a Box2I representing the desired cutout in pixel space, given a “row” of catalog data which includes the semi-height (sh) and semi-width (sw) in degrees desired for the cutout.

_parse_sphere_point(row)[source]

Return a SpherePoint with the ra and deck given in the “row” of catalog data. Row must include the RA and dec as “ra” and “dec” columns respectively

_get_tract_patch(row)[source]

Return (tractInfo, patchInfo) for a given row.

This function only returns the single principle tract and patch in the case of overlap.

_request_patch(tract_index, patch_index)[source]

Request a patch from the butler. This will be a list of lsst.afw.image objects each corresponding to the configured bands

Uses functools.lru_cache for basic in-memory caching.

_fetch_single_cutout(row)[source]

Make a single cutout, returning a torch tensor.

Does not handle edge-of-tract/patch type edge cases, will only work near center of a patch.