Generating Intepolator Data Files¶
Gravelamps is capable of producing the amplification factor for a number of models in both the wave and geometric optics regimes. Efforts have been made to make these calculations as efficient as possible, however, in many cases these are sufficiently slow as to be less efficient to compute than waveform approximants and as such may not be used for rapid parameter estimation. To aid in this, Gravelamps can make data files that may be used to construct an interpolator that will be significantly more rapid.
Generation of these files is handled by the gravelamps_generate_lens
entrypoint. This may typically be run as follows:
$ gravelamps_generate_lens -o --option /path/to/ini-file.ini
Commandline Options¶
- -h, --help
Shows the help message and exits.
- -l, --local
Run should be performed locally rather than built for a scheduler. Will overwrite INI option.
- -v, --verbose
Sets the maximal logging level. Will overwrite INI option.
Example INI¶
The following example INI will generate the HTCondor submit file for a job that will produce data files using the isolated point mass model.
[output]
outdir = generate-lens-test
label = lens-generation-example
logging_level = INFO
[lens]
module = gravelamps.models.isolated_point
minimum_dimensionless_frequency = 0.01
maximum_dimensionless_frequency = 1000
length_dimensionless_frequency = 10000
minimum_source_position = 0.1
maximum_source_position = 3.0
length_source_position = 1000
[run]
local = False
submit = True
[scheduler]
scheduler = condor
[scheduler.condor]
accounting_group = ligo.dev.o4.cbc.lensing.multi
For a more detailed look at the options availble in the INI file, please see the Gravelamps INI Structure page.
Adding New Models¶
Gravelamps is not restricted to only the implemented models, it may also use
any arbitary python module in the data generation. The requirement for this
module is either that it has a generate_data function or an
amplification function. In the former case, the generate_data function
must take as its first four arguments in order, the dimensionless frequency and
source position grid files, and then the real and imaginary component
amplification factor data files. It may then take arbitrary additional keyword
arguments which may be accessed using the data_generation_kwargs option in
the INI. In the latter case, the function must take the arrays of dimensionless
frequency and source position as its first two positional arguments followed
again, by arbitrary keyword arguments. For further information on the latter
case, see the gravelamps.interpolator.generate_data_from_amplification
function.