hyrax.datasets.collate_utils

hyrax.datasets.collate_utils#

Functions#

collate_as_1d_light_curve(→ dict)

Collate the given field in the samples as if it were a light curve

Module Contents#

collate_as_1d_light_curve(samples: list[dict], field: str) → dict[source]#

Collate the given field in the samples as if it were a light curve

Parameters:
  • samples – List of dicts; each dict is expected to have the key passed in for the field argument

  • field – The field to collate

Returns:

Contains three keys: <field>, <field>_lengths, and <field>_mask field - float32 array (batch, max_len) containing the padded light curves <field>_lengths - int64 array (batch) of true light curve lengths <field>_mask - int64 array (batch, max_len) of masks denoting light-curve data vs. padding

Return type:

dict