hyrax.datasets.range_read_lsst_dataset#

Attributes#

Classes#

RangeReadLSSTDataset

LSST dataset that prefetches file paths from butler and reads cutouts via FITS range reads.

Module Contents#

logger[source]#
class RangeReadLSSTDataset(config, data_location=None)[source]#

Bases: hyrax.datasets.lsst_dataset.LSSTDataset

LSST dataset that prefetches file paths from butler and reads cutouts via FITS range reads.

__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

_prefetch_all()[source]#

Resolve all file paths and pixel bounding boxes from the butler and skymap.

After this method completes, the butler is no longer needed for get_image calls.

get_image(idxs)[source]#

Get image cutouts for the given indices using FITS range reads.

Parameters:

idxs (int or list of int) – The index or indices of the cutouts to retrieve.

Returns:

Single cutout tensor or list of cutout tensors.

Return type:

list or torch.Tensor

_fetch_single_cutout_range_read(idx)[source]#

Read a single cutout from FITS files using range reads.