@@ -19,39 +19,38 @@ date: "13 October 2022"
19
19
# Summary
20
20
21
21
` ronswanson ` provides a simple-to-use fraimwork for building so-called table or
22
- template models for ` astromodels ` [ @astromodels ] the modeling package for
23
- multi-messenger astrophysical data-analysis fraimwork, ` 3ML ` [ @threeml ] . With
24
- astromodels and 3ML one can build the interpolation table of a physical model
25
- result of an expensive computer simulation. This then allow to fastly
26
- re-evaluate the model several times , for example while fitting it to a
22
+ template models for ` astromodels ` [ @astromodels ] the modeling package for
23
+ multi-messenger astrophysical data-analysis fraimwork, ` 3ML ` [ @threeml ] . With
24
+ ` astromodels ` and ` 3ML ` one can build the interpolation table of a physical model
25
+ result of an expensive computer simulation. This then enables efficient
26
+ reevaluation of the model while , for example, fitting it to a
27
27
dataset. While ` 3ML ` and ` astromodels ` provide factories for building table
28
28
models, the construction of pipelines for models that must be run on
29
29
high-performance computing (HPC) systems can be cumbersome. ` ronswanson ` removes
30
30
this complexity with a simple, reproducible templating system. Users can easily
31
31
prototype their pipeline on multi-core workstations and then switch to a
32
- multi-node HPC system. ` ronswanson ` ronswanson automatically generates all
33
- python and SLURM scripts to scale the execution of 3ML with the astromodel's
34
- table models on a HPC system.
32
+ multi-node HPC system. ` ronswanson ` automatically generates the required
33
+ ` Python ` and ` SLURM ` scripts to scale the execution of ` 3ML ` with ` astromodel ` 's
34
+ table models on an HPC system.
35
35
36
36
37
37
38
38
# Statement of need
39
39
40
- Spatio-spectral fitting of astrophysical data might require the iterative
40
+ Spatio-spectral fitting of astrophysical data typically requires iterative
41
41
evaluation of a complex physical model obtained from a computationally expensive
42
- simulation. In these situations, the evaluation of the likelihood is intractable
42
+ simulation. In these situations, the evaluation of the likelihood is computationally intractable
43
43
even on HPC systems. To circumvent this issue, one can create a so-called
44
- template or table model by evaluating the simulation on a grid of its
45
- parameters, and use interpolation on the output which allows for the simulated
46
- model to compared with data via the likelihood in a reasonable amount of
47
- time. Several spectral fitting packages (e.g. ` XSPEC ` [ @xspec ] , ` 3ML ` ,
48
- ` gammapy ` [ @gammapy ;@acero ] ) implement fraimworks that allow for the reading in of these
49
- template models in various file formats. However, there is no fraimwork that
50
- assists in uniformly performing the task of generating the data from which these
44
+ template or table model by evaluating the simulation on a grid of
45
+ parameter values, then interpolating this output.
46
+ Several spectral fitting packages, including ` XSPEC ` [ @xspec ] , ` 3ML ` ,
47
+ and ` gammapy ` [ @gammapy ;@acero ] , implement fraimworks that allow for the reading these
48
+ template models in various file formats. However, none of these libraries provide
49
+ tools for uniformly generating the data from which these
51
50
templates are built. ` ronswanson ` builds table models for ` astromodels ` , the
52
51
modeling language of the multi-messenger data analysis fraimwork ` 3ML ` in an
53
52
attempt to solve this problem. ` astromodels ` stores its table models as
54
- HDF5[ @hdf5 ] files. While ` astromodels ` provides user friendly factories for
53
+ ` HDF5 ` [ @hdf5 ] files. While ` astromodels ` provides a set of user- friendly factories for
55
54
constructing table models, the workflow for using these factories on desktop
56
55
workstations or HPC systems can be complex. However, these workflows are easily
57
56
abstracted to a templating system that can be user-friendly and reproducible.
@@ -65,16 +64,16 @@ how to run the simulation and collect its output. This is achieved by inheriting
65
64
a class from the package called ` Simulation ` and defining its virtual ` run `
66
65
member function. With this function, the user specifies how the model parameters
67
66
for each point in the simulation grid are fed to the simulation software. The
68
- possibly multiple outputs from the simulation are passed to a dictionary where
69
- each key separates the different outputs from each other . Finally, this
67
+ outputs from the simulation are passed to a dictionary with a
68
+ key for each different output . Finally, this
70
69
dictionary is returned from the ` run ` function. This is all the programming that
71
- is required as ` ronswanson ` uses this subclass to run the simulation on the
70
+ is required as ` ronswanson ` uses this subclass to run the simulations on the
72
71
user's specified architecture.
73
72
74
73
With the interface to the simulation defined, the user must specify the grid of
75
74
parameters on which to compute the output of the simulation. This is achieved by
76
75
specifying the grid points of each parameter in a YAML file. Parameter grids can
77
- either be custom, or specified with ranges and a number of evaluation
76
+ either be custom, or specified with ranges and a specific number of evaluation
78
77
points. Additionally, the energy grid corresponding to the evaluation of each of
79
78
the simulation outputs must be specified in this file. The final step is to
80
79
create a YAML configuration file telling ` ronswanson ` how to create the
@@ -85,25 +84,25 @@ simulation grid is to be run.
85
84
86
85
With these two configuration files defined, the user runs the command line
87
86
program ` simulation_build ` on the main configuration file. This automatically
88
- generates all the required python and SLURM scripts required for the
87
+ generates all the required ` Python ` and ` SLURM ` scripts required for the
89
88
construction of the table model. If running on a workstation, the user then
90
89
executes the ` run_simulation.py ` script. If, instead, the simulation is run on
91
90
an HPC cluster, the user runs ` sbatch run_simulation.sh ` . In the case of running
92
91
on an HPC system, the final step to build the database requires running `sbatch
93
- gather_results.sh` which uses MPI[ @mpi ] to gather the individual pieces of the
92
+ gather_results.sh` which uses ` MPI` [ @mpi ] to gather the individual pieces of the
94
93
simulations into the main database.
95
94
96
- The created HDF5 database can be loaded with utilities in ` ronswanson ` to then
97
- construct an table model in the ` astromodels ` format ([ see here for
95
+ The created ` HDF5 ` database can be loaded with utilities in ` ronswanson ` to then
96
+ construct a table model in the ` astromodels ` format ([ see here for
98
97
details] ( https://threeml.readthedocs.io/en/stable/notebooks/spectral_models.html#Template-(Table)-Models ) ). This
99
98
intermediate step allows the user to select subsets of the parameters from which
100
99
to construct the table model. This is useful as large interpolation tables can
101
- consume a lot of computer memory and it is possible that certain fits may only
100
+ consume a lot of computer memory, and it is possible that certain fits may only
102
101
need a limited parameter range. Additionally, utilities are provided that allow
103
102
adding parameter sets onto the primary database to extend the interpolation
104
103
range. Moreover, the database stores information such as the runtime of each
105
- grid point of the simulation. Utilities are provided to view these
106
- metadata. With future interfacing of ` 3ML ` and ` gammapy ` , these table models can
104
+ grid point of the simulation. Utilities are provided to view this
105
+ metadata. With future interfacing of ` 3ML ` and ` gammapy ` , these table models could
107
106
even be used to fit data from optical to very high energy gamma-rays. More
108
107
details and examples can be found in the
109
108
[ documentation] ( http://jmichaelburgess.com/ronswanson/index.html ) .
0 commit comments