drw_dataset#

Module Contents#

Classes#

DRWDataset

Sampler

class drw_dataset.DRWDataset(params_sampler, out_dir, num_samples, is_training, transform_x_func=lambda x: ..., transform_y_func=lambda x: ..., prestored_bandpasses=list('ugrizy'), seed=123, obs_kwargs={})[source]#

Bases: torch.utils.data.Dataset

bp_to_int[source]#
int_to_bp[source]#
get_sliced_params()[source]#
load_obs_strat()[source]#

Load observation strategies

get_t_obs()[source]#

Get full 10-year times in observed frame

_generate_x_y_params()[source]#

Generate and store fully observed DRW light curves and params

_generate_light_curve(index, log_rf_tau, log_sf_inf, mean, z)[source]#

Generate a single light curve in a given filter. Rendering is done in the rest frame, with the input params assumed to be in the rest frame.

indexint

index within the dataset

log_rf_taufloat

log10 of rest-frame timescale in days

log_sf_inffloat

log10 of rest-frame asymptotic amplitude in mag

meanfloat

mean static magnitude

zfloat

redshift

tuple

single-filter light curve of shape [n_points, 1]

property fully_obs[source]#
property add_noise[source]#
__getitem__(index)[source]#
get_normalizing_metadata(set_metadata=True)[source]#
__len__()[source]#
class drw_dataset.Sampler(seed, bandpasses)[source]#
sample()[source]#