ggt.data.dataset ================ .. py:module:: ggt.data.dataset Classes ------- .. autoapisummary:: ggt.data.dataset.FITSDataset Module Contents --------------- .. py:class:: FITSDataset(data_dir, slug=None, split=None, channels=1, cutout_size=167, label_col='bt_g', normalize=True, transform=None, expand_factor=1, repeat_dims=False, label_scaling=None, scaling_data_dir=None, scaling_slug=None, load_labels=True) Bases: :py:obj:`torch.utils.data.Dataset` Dataset from FITS files. Pre-caches FITS files as PyTorch tensors to improve data load speed. .. py:attribute:: data_dir .. py:attribute:: cutout_shape .. py:attribute:: normalize :value: True .. py:attribute:: transform :value: None .. py:attribute:: repeat_dims :value: False .. py:attribute:: expand_factor :value: 1 .. py:attribute:: data_info :value: None .. py:attribute:: cutouts_path .. py:attribute:: tensors_path .. py:attribute:: filenames .. py:attribute:: observations .. py:method:: __getitem__(index) Magic method to index into the dataset. .. py:method:: __len__() Return the effective length of the dataset. .. py:method:: load_fits_as_tensor(filename) :staticmethod: Open a FITS file and convert it to a Torch tensor.