redback.simulate_transients.SimulateGenericTransient
- class redback.simulate_transients.SimulateGenericTransient(model, parameters, times, model_kwargs, data_points, seed=1234, multiwavelength_transient=False, noise_term=0.2, noise_type='gaussianmodel', extra_scatter=0.0)[source]
Bases:
object
- __init__(model, parameters, times, model_kwargs, data_points, seed=1234, multiwavelength_transient=False, noise_term=0.2, noise_type='gaussianmodel', extra_scatter=0.0)[source]
A generic interface to simulating transients
- Parameters:
model – String corresponding to redback model
parameters – Dictionary of parameters describing a single transient
times – Time values that the model is evaluated from
model_kwargs – Additional keyword arguments, must include all the keyword arguments required by the model. Refer to the model documentation for details
data_points – Number of data points to randomly sample. This will randomly sample data_points in time and in bands or frequency.
seed – random seed for reproducibility
multiwavelength_transient – Boolean. If True, the model is assumed to be a transient which has multiple bands/frequency and the data points are sampled in bands/frequency as well, rather than just corresponding to one wavelength/filter. This also allows the same time value to be sampled multiple times.
noise_type – String. Type of noise to add to the model. Default is ‘gaussianmodel’ where sigma is noise_term * model. Another option is ‘gaussian’ i.e., a simple Gaussian noise with sigma = noise_term.
noise_term – Float. Factor which is multiplied by the model flux/magnitude to give the sigma or is sigma itself for ‘gaussian’ noise.
extra_scatter – Float. Sigma of normal added to output for additional scatter.
- __call__(**kwargs)
Call self as a function.
Methods
__init__
(model, parameters, times, ...[, ...])A generic interface to simulating transients
save_transient
(name)Save the transient observations to a csv file.
- save_transient(name)[source]
Save the transient observations to a csv file. This will save the full observational dataframe including non-detections etc. This will save the data to a folder called ‘simulated’ with the name of the transient and a csv file of the injection parameters
- Parameters:
name – name to save transient.