A key aspect of inference workflows is testing the pipeline on synthetic data.
This hugely beneficial in both verifying the inference methodology and understanding selection effects and the role of survey strategies.
redback, we provide 3 different ways to simulate data as part of the simulation module.
Although, we emphasize that as all the models are callable functions, the user can bypass this module to create their own synthetic data by calling the models directly.
In particular the 3 methods are:
SimulateGenericTransient: This is a generic transient model that can be used to simulate any transient model and is suited to producing more ToO style of observations. The user specifies a large array of times and observations filters (if simulating photometry) and the method will sample randomly in those times and filters to create synthetic data with noise consistent with user input.
SimulateOpticalTransient: This is specific class to simulate transients in an optical survey. Users can either generate a table of pointings. Which is a table that specifies a list of telescope pointings (what time/filter/limiting magnitude/cadence). Or use official tables corresponding to the LSST survey with Vera Rubin and the ZTF survey, which are provided within
redback. This class also has specific class methods to simulate single events and populations in either survey.
SimulateFullOpticalSurvey: Simulate a full survey. In this method, the user will provide a rate, a prior corresponding to the population, a survey duration etc. The class will then draw sources following the rate, place them isotropically in the sky and uniform in comoving volume and simulate the survey. All observations are saved in a table, which can be probed to understand the detection rate/non-detections etc.
Use simulated data to test the inference pipeline
All the simulation methods have specific methods to save the simulated transient. This data can then be loaded in one line to create a transient object. Which can then be used in fitting as any other transient object. Or simply to use for plotting the data, e.g.,
kn_object = redback.transient.Kilonova.from_simulated_optical_data(name='my_kilonova', data_mode='magnitude')
Where my_kilonova is a previously simulated kilonova.
We have written several examples to demonstrate the different simulation methods of
Simulate basic transient: Which shows how to use the SimulateGenericTransient class.
Simulate kilonova: Which shows how to use the SimulateOpticalTransient class to simulate a kilonova using a user constructed table of pointings.
Simulate single transient in rubin: Which shows how to use the SimulateOpticalTransient class to simulate a kilonova in Rubin.
Simulate single transient in ztf: Which shows how to use the SimulateOpticalTransient class to simulate a kilonova in ZTF.
Simulate kilonova population: Which shows how to use the SimulateOpticalTransient class to simulate a population of kilonovae in Rubin.
Simulate survey: Which shows how to use the SimulateFullOpticalSurvey class to simulate a full survey.
We note that although above examples are mostly written for kilonovae. All
redback models can be used by the simulation classes.