The pipeline
module defines the FittingPipeline
class, which
is built to provide a parallelized approach to simulating and fitting
light-curves with atmospheric effects.
Although the pipeline
module provides a prebuilt data analysis pipeline,
you can also build customized pipelines using any of the included nodes.
Relevant documentation can be found in the following pages:
Defines a standardized data model for communication between pipeline nodes. |
|
Defines the individual data processing nodes used to construct complete data analysis pipelines. |
Instances of the FittingPipeline
class can be run synchronously
(by calling FittingPipeline.run
) or asynchronously (with
FittingPipeline.run_async
). A pipeline instance can be created as
follows:
>>> from snat_sim.models import SNModel
>>> from snat_sim.pipeline import FittingPipeline
>>> pipeline = FittingPipeline(
... cadence='alt_sched',
... sim_model=SNModel('salt2'),
... fit_model=SNModel('salt2'),
... vparams=['x0', 'x1', 'c'],
... out_path='./demo_out_path.h5',
... fitting_pool=6,
... simulation_pool=3
... )
Pipeline of parallel processes for simulating and fitting light-curves
Fit light-curves using multiple processes and combine results into an output file
cadence (str
) – Cadence to use when simulating light-curves
sim_model (SNModel
) – Model to use when simulating light-curves
fit_model (SNModel
) – Model to use when fitting light-curves
vparams (List
[str
]) – List of parameter names to vary in the fit
out_path (Union
[str
, Path
]) – Path to write results to
fitting_pool (int
) – Number of child processes allocated to simulating light-curves
simulation_pool (int
) – Number of child processes allocated to fitting light-curves
bounds (Optional
[Dict
[str
, Tuple
[Number
, Number
]]]) – Bounds to impose on fit_model
parameters when fitting light-curves
max_queue (int
) – Maximum number of light-curves to store in pipeline at once
iter_lim (int
) – Limit number of processed light-curves (Useful for profiling)
catalog (Optional
[VariableCatalog
]) – Reference star catalog to calibrate simulated supernova with
add_scatter (bool
) – Add randomly generated scatter to simulated light-curve points
fixed_snr (Optional
[float
]) – Simulate light-curves with a fixed signal to noise ratio
write_lc_sims (bool
) – Include simulated light_curves in the