bin/
mbank comes with a list of executables that you can run from command line (they are installed together with the python package).
You can use to authomatize some tasks, such as bank generation, template placing, injection and metric validation: they will make your life easier!
Below you can find a list of all of them:
mbank_generate_flow_dataset
mbank_generate_flow_dataset --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_generate_flow_dataset:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_generate_flow_dataset
---------------------------
Executable to generate a dataset useful for training a normalizing flow model.
Each row of the dataset consist in :math:`\theta, M_{ij}, LL` where log likelihood is:
.. math
LL = \log{\sqrt{|M(\theta)|}}
The script will create a dataset with random points :math:`\theta` drawn within the space of interest.
To train a flow:
mbank_generate_flow_dataset --options-you-like
You can also load (some) options from an ini-file:
mbank_generate_flow_dataset --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_generate_flow_dataset --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--n-datapoints N_DATAPOINTS] [--dataset DATASET]
[--datapoints-file DATAPOINTS_FILE] [--only-ll] [--make-sub]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--n-datapoints N_DATAPOINTS
Number of datapoints to be stored in the dataset
--dataset DATASET Files with the datasets (more than one are accpted).
If the file does not exist, the dataset will be
created.
--datapoints-file DATAPOINTS_FILE
Csv with a list of points to build the dataset: for
each of them the likelihood will be computed and
stored in the dataset
--only-ll Whether to store only the metric LL in the dataset
file (to save memory). If not set, the metric will be
stored, together with the LL.
--make-sub If set, it will make a condor submit file that the
user can use to launch the job through condor.
mbank_train_flow
mbank_train_flow --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_train_flow:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_train_flow
----------------
Executable to train a normalizing flow to reproduce the volume element of the probability distribution:
.. math
p(\theta) \propto \sqrt{|M(\theta)|}
The script will train a normalizing flow from a dataset with random points drawn within the space.
A dataset can be generated with mbank_generate_flow_dataset. Multiple datasets are supported
To train a flow:
mbank_train_flow --options-you-like
You can also load (some) options from an ini-file:
mbank_train_flow --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_train_flow --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--m1-range M1_RANGE M1_RANGE]
[--m2-range M2_RANGE M2_RANGE] [--mtot-range MTOT_RANGE MTOT_RANGE]
[--q-range Q_RANGE Q_RANGE] [--mc-range MC_RANGE MC_RANGE]
[--eta-range ETA_RANGE ETA_RANGE] [--s1-range S1_RANGE S1_RANGE]
[--s2-range S2_RANGE S2_RANGE] [--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--flow-file FLOW_FILE]
[--loss-function {forward_KL,ll_mse,weighted_ll_mse}]
[--n-layers N_LAYERS]
[--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]]
[--n-epochs N_EPOCHS] [--learning-rate LEARNING_RATE]
[--train-fraction TRAIN_FRACTION] [--batch-size BATCH_SIZE]
[--min-delta MIN_DELTA] [--patience PATIENCE] [--load-flow]
[--variable-format VARIABLE_FORMAT] [--n-datapoints N_DATAPOINTS]
[--dataset DATASET [DATASET ...]] [--ignore-boundaries] [--make-sub]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--flow-file FLOW_FILE
File where the normalizing flow is saved/loaded (in
zip format).
--loss-function {forward_KL,ll_mse,weighted_ll_mse}
Method to use to compute the metric.
--n-layers N_LAYERS Number of layers for the flow model to train
--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]
Number of hidden features for the masked
autoregressive flow to train.
--n-epochs N_EPOCHS Number of training epochs for the flow
--learning-rate LEARNING_RATE
Learning rate for the flow
--train-fraction TRAIN_FRACTION
Fraction of the dataset to use for training
--batch-size BATCH_SIZE
Batch size for the training
--min-delta MIN_DELTA
Parameter for early stopping. If the validation loss
doesn't decrease of more than min-delta for --patience
times, the training will stop
--patience PATIENCE Patience for early stopping. If the validation loss
does not decrease enough for patience times, the
training will stop
--load-flow Whether to load the flow from file (useful for
plotting purposes)
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--n-datapoints N_DATAPOINTS
Number of datapoints to be loaded from the dataset
--dataset DATASET [DATASET ...]
Files with the datasets (more than one are accpted).
If the file does not exist, the dataset will be
created.
--ignore-boundaries Whether to ignore the ranges given by command line. If
set, the boudaries will be extracted from the dataset
--make-sub If set, it will make a condor submit file that the
user can use to launch the job through condor.
mbank_place_templates
mbank_place_templates --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_place_templates:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_place_templates
---------------------
A script to place the templates,
It operates in two modes:
- If a tiling file is given, the templates are placed according to the tiling file (plus an optional flow)
- If only a flow is given, the templates are placed according to the flow. In this case a dataset needs to be provided as a source of livepoints
To generate a bank:
mbank_place_templates --options-you-like
You can also load (some) options from an ini-file:
mbank_place_templates --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_place_templates --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}] [--mm MM]
[--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}]
[--n-livepoints N_LIVEPOINTS] [--covering-fraction COVERING_FRACTION]
[--empty-iterations EMPTY_ITERATIONS] [--flow-file FLOW_FILE]
[--loss-function {forward_KL,ll_mse,weighted_ll_mse}]
[--n-layers N_LAYERS]
[--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]]
[--n-epochs N_EPOCHS] [--learning-rate LEARNING_RATE]
[--train-fraction TRAIN_FRACTION] [--batch-size BATCH_SIZE]
[--min-delta MIN_DELTA] [--patience PATIENCE] [--load-flow]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--bank-file BANK_FILE] [--seed-bank SEED_BANK]
[--tiling-file TILING_FILE] [--train-flow] [--dry-run] [--make-sub]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--mm MM Minimum match for the bank (a.k.a. average distance
between templates)
--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}
Which placing method to use for each tile
--n-livepoints N_LIVEPOINTS
Parameter to control the number of livepoints to use
in the `random` and `pruning` placing method. For
`random` (or related), it represents the number of
livepoints to use for the estimation of the coverage
fraction. For `pruning`, it amounts to the the ratio
between the number of livepoints and the number of
templates placed by ``uniform`` placing method.
--covering-fraction COVERING_FRACTION
Parameter to control the fraction of livepoints dead
before terminating the bank generation with the
`random` and `pruning` placing method. The higher the
threshold, the higher the nuber of templates in the
final bank.
--empty-iterations EMPTY_ITERATIONS
Number of consecutive rejected proposal after which
the `stochastic` placing method stops.
--flow-file FLOW_FILE
File where the normalizing flow is saved/loaded (in
zip format).
--loss-function {forward_KL,ll_mse,weighted_ll_mse}
Method to use to compute the metric.
--n-layers N_LAYERS Number of layers for the flow model to train
--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]
Number of hidden features for the masked
autoregressive flow to train.
--n-epochs N_EPOCHS Number of training epochs for the flow
--learning-rate LEARNING_RATE
Learning rate for the flow
--train-fraction TRAIN_FRACTION
Fraction of the dataset to use for training
--batch-size BATCH_SIZE
Batch size for the training
--min-delta MIN_DELTA
Parameter for early stopping. If the validation loss
doesn't decrease of more than min-delta for --patience
times, the training will stop
--patience PATIENCE Patience for early stopping. If the validation loss
does not decrease enough for patience times, the
training will stop
--load-flow Whether to load the flow from file (useful for
plotting purposes)
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--bank-file BANK_FILE
Path to the file to save the bank. If no path to the
file is provided, it is understood it is located in
run-dir. If not given, a suitable default name will be
set.
--seed-bank SEED_BANK
Path to a seed bank: it will be used a starting point
for the stochastic method
--tiling-file TILING_FILE
The input file with a tiling. It must be generated by
a tiling_handler object. If no path to the file is
provided, it is understood it is located in run-dir
--train-flow Whether to train a normalizing flow model for the
tiling. It will be used for metric interpolation (only
applicable if a tiling is provided)
--dry-run If set, it will only compute the number of templates,
without actually placing the templates. Useful for
volume studies. (only applicable for volume estimation
purposes)
--make-sub If set, it will make a condor submit file that the
user can use to launch the job through condor.
mbank_injections
mbank_injections --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_injections:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_injections
----------------
A script to randomly draw injections inside a bank. Injections can be also read from an xml file.
It needs a tiling file so that the match can be computed with the metric approximation.
To perform injections:
mbank_injections --options-you-like
You can also load (some) options from an ini-file:
mbank_injections --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_injections --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--n-injs N_INJS]
[--fixed-sky-loc-polarization FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION]
[--inj-file INJ_FILE] [--stat-dict STAT_DICT]
[--mchirp-window MCHIRP_WINDOW] [--full-match] [--full-symphony-match]
[--seed SEED] [--use-ray] [--m1-range M1_RANGE M1_RANGE]
[--m2-range M2_RANGE M2_RANGE] [--mtot-range MTOT_RANGE MTOT_RANGE]
[--q-range Q_RANGE Q_RANGE] [--mc-range MC_RANGE MC_RANGE]
[--eta-range ETA_RANGE ETA_RANGE] [--s1-range S1_RANGE S1_RANGE]
[--s2-range S2_RANGE S2_RANGE] [--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--bank-file BANK_FILE] [--tiling-file TILING_FILE]
[--flow-file FLOW_FILE] [--mm MM]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--n-injs N_INJS Number of injections. If inj-file is specified, they
will be read from it; otherwise they will be randomly
drawn from the tiling and saved to file. If None, all
the injections will be read from inj-file and it will
throw an error if such file is not provided.
--fixed-sky-loc-polarization FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION
Sky localization and polarization angles for the
signal injections. They must be a tuple of float in
the format (longitude,latitude,polarization). If None,
the angles will be loaded from the injection file, if
given, or uniformly drawn from the sky otherwise.
--inj-file INJ_FILE An xml injection file to load the injections from. If
not provided, the injections will be performed at
random in each tile (injs-per-tile). If no path to the
file is provided, it is understood it is located in
run-dir.
--stat-dict STAT_DICT
The name of the file in which the results of the
injection study will be saved (either json or pkl). If
None, a suitable default will be provided.
--mchirp-window MCHIRP_WINDOW
The window in relative chirp mass inside which the
templates are considered for full match (if --full-
match is specified)
--full-match Whether to perform the full standard match
computation. If False, a metric approximation to the
match will be used
--full-symphony-match
Whether to perform the full symphony match
computation. If False, a metric approximation to the
match will be used
--seed SEED Random seed for extracting the random injections (if
it applies)
--use-ray Whether to use ray package to parallelize the match
computation
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--bank-file BANK_FILE
Path to the file of a bank. If no path to the file is
provided, it is understood it is located in run-dir.
--tiling-file TILING_FILE
The input file with a tiling. It must be generated by
a tiling_handler object. If no path to the file is
provided, it is understood it is located in run-dir.
--flow-file FLOW_FILE
An optional file with weigths for a normalizing flow
model. If provided it will be used to interpolate the
metric when computing the metric injection match.
--mm MM Minimum match for the bank - for plotting purposes
mbank_injfile
mbank_injfile --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_injfile:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_injfile
-------------
A script to create an xml file with random injections.
If a bank is given, they will be randomly chosen among the templates.
If a tiling obj is given, they will be randomly drawn within each tile.
To perform injections:
mbank_injfile --options-you-like
You can also load (some) options from an ini-file:
mbank_injfile --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_injfile --help
[-h] [--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE] [--run-dir RUN_DIR]
[--flow-file FLOW_FILE] [--bank-file BANK_FILE]
[--inj-out-file INJ_OUT_FILE] [--variable-format VARIABLE_FORMAT]
[--gps-start GPS_START] [--gps-end GPS_END] [--time-step TIME_STEP]
[--f-min F_MIN] [--f-max F_MAX]
[--distance-range DISTANCE_RANGE DISTANCE_RANGE]
[--approximant APPROXIMANT]
[--fixed-sky-loc-polarization FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION]
optional arguments:
-h, --help show this help message and exit
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--run-dir RUN_DIR Run directory. Unless explicitly stated, every input
file will be understood to be in this run-dir
--flow-file FLOW_FILE
A flow file to draw the injections from. If not given,
the injection will be read from the given --bank-file
--bank-file BANK_FILE
The path to the bank file to pick injection from.
Ignored if --tiling-file is set
--inj-out-file INJ_OUT_FILE
Injection file (in xml format) in wich the injections
are saved
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--gps-start GPS_START
Start GPS time for the injections
--gps-end GPS_END End GPS time for the injections
--time-step TIME_STEP
Distance in time between consecutive injections
--f-min F_MIN Minium frequency (in Hz) for the injections
--f-max F_MAX Maximum frequency (in Hz) for the injections
--distance-range DISTANCE_RANGE DISTANCE_RANGE
Luminosity distance for all the injections (in Mpc)
--approximant APPROXIMANT
LAL approximant for the injection generation
--fixed-sky-loc-polarization FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION FIXED_SKY_LOC_POLARIZATION
Sky localization and polarization angles for the
signal injections. They must be a tuple of float in
the format (longitude,latitude,polarization). If None,
the angles will be loaded from the injection file, if
given, or uniformly drawn from the sky otherwise.
mbank_merge
mbank_merge --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_merge:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_merge
-----------
It merges the mbank output products: banks, tilings or injection statistics.
Banks must be saved in dat or xml format.
Tiling objects mustbe saved in the npy format, as produces by `tiling_handler.load()`.
The injection statistics are dictionaries in pkl format
To merge the 3 banks into a single merged_banks.xml you can type:
mbank_merge --bank --variable-format your-format --out-name merged_banks.xml bank_1.xml bank_2.xml bank_3.xml
To merge 3 tiling you can type:
mbank_merge --tiling --out-name merged_tiling.npy tiling_1.npy tiling_2.npy tiling_3.npy
To merge 3 injection statistics files (either json or pkl) you can type:
mbank_merge --tiling --out-name merged_injections_stat.npy stat_1.pkl stat_2.json stat_3.pkl
Make sure that the mbank is properly installed.
To know which options are available:
mbank_merge --help
[-h] [--tiling] [--bank] [--injection-stat]
[--variable-format VARIABLE_FORMAT] [--out-name OUT_NAME] [--plot]
optional arguments:
-h, --help show this help message and exit
--tiling Whether the files to be merged are tiling files
--bank Whether the files to be merged are bank files
--injection-stat Whether the files to be merged are injection
statistics files, generated by 'mbank_injections'
--variable-format VARIABLE_FORMAT
Variable format for the bank files to merge
--out-name OUT_NAME Name of the file to store the merged inputs
--plot Whether to produce some plots. They will be stored in
the same folder as the --out-file.
mbank_validate_metric
mbank_validate_metric --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_validate_metric:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_validate_metric
---------------------
A script to make some plots to validate the metric at a given point in space.
It makes the following plots:
- Match vs distance parabolae
- Constant match ellipse
- Metric accuracy histogram
- epsilon validation
To validate the metric:
mbank_validate_metric --options-you-like
You can also load (some) options from an ini-file:
mbank_validate_metric --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_validate_metric --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--theta THETA [THETA ...]] [--match MATCH] [--overlap]
[--symphony-match] [--on-boundaries] [--epsilon EPSILON]
[--N-points N_POINTS]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--theta THETA [THETA ...]
The point at which the metric is evaluated at
--match MATCH Match for plotting the constant match ellipse and
metric accuracy histogram
--overlap Whether to compute the metric based on the overlap
rather than the match
--symphony-match Whether to compute the match with the symphony match
--on-boundaries Whether the sampled points for validation should be
drawn on the boundaries of the constant match ellipse.
If False (default) points will be drawn inside.
--epsilon EPSILON Infinitesimal step for the numerical gradients
--N-points N_POINTS Number of points to sample inside constant match
ellipse
mbank_print_metric
mbank_print_metric --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_print_metric:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_run
---------
A script to print the metric values
To print the metric:
mbank_print_metric --options-you-like
This will download a PSD file and print the metric in the `Mq_s1xz` format:
wget https://dcc.ligo.org/public/0165/T2000012/002/aligo_O3actual_H1.txt
mbank_print_metric --psd aligo_O3actual_H1.txt --asd --variable-format Mq_s1xz --metric-type symphony --theta 10. 3. 0.15 0.18
To know which options are available:
mbank_print_metric --help
[-h] --variable-format VARIABLE_FORMAT [--psd PSD] [--asd]
[--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}]
--theta THETA [THETA ...]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
optional arguments:
-h, --help show this help message and exit
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}
Which placing method to use for each tile
--theta THETA [THETA ...]
The point in space where the metric is evaluated
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
mbank_mcmc
mbank_mcmc --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_mcmc:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_mcmc
----------
A script to sample points from the PDF defined by the metric.
It uses `emcee` package, which is not among the package dependencies, so make sure it
To sample from:
mbank_mcmc --options-you-like
You can also load (some) options from an ini-file:
mbank_mcmc --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_mcmc --help
[-h] [--n-samples N_SAMPLES] [--n-walkers N_WALKERS]
[--chain-file CHAIN_FILE] [--use-ray] [--plot] [--show] [--verbose]
[--run-dir RUN_DIR] [--run-name RUN_NAME]
[--variable-format VARIABLE_FORMAT] [--psd PSD] [--asd]
[--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
optional arguments:
-h, --help show this help message and exit
--n-samples N_SAMPLES
Number of samples to be drawn from the MCMC
--n-walkers N_WALKERS
Number of walkers for the MCMC. If a chain-file is
set, the file should has enough walkers
--chain-file CHAIN_FILE
Path to a chain file. If given, this will be the input
of the MCMC and the burn-in phase will not be
performed.
--use-ray Whether to use ray package to parallelize the metric
computation
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
mbank_injections_workflow
mbank_injections_workflow --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_injections_workflow:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_injections_workflow
-------------------------
Generates a condor DAG to run a fitting factor computation on a high performance computing cluster, using condor. It assumes that the package ezdag (not among mbank's dependencies) is installed.
To generate a condor workflow:
mbank_injections_workflow --options-you-like
You can also load (some) options from an ini-file:
mbank_injections_workflow --some-options other_options.ini
Make sure that the mbank is properly installed.
To clean the workflow, you can execute:
mbank_injections_workflow --clean
To know which options are available:
mbank_injections_workflow --help
[-h] [--n-jobs N_JOBS] [--inj-file INJ_FILE] [--n-injs N_INJS]
[--clean]
optional arguments:
-h, --help show this help message and exit
--n-jobs N_JOBS Number of parallel jobs running 'mbank_injections'.
Each job will work on a small part of the whole
injection set.
--inj-file INJ_FILE An xml injection file to load the injections from. The
injection will be split and spread over multiple
istances of 'mbank_injections'
--n-injs N_INJS Number of injections to read from inj-file. If None,
all the injection in the fille wil be used.
--clean If the option is set, the dag and its generated files
will be removed and the program will quit.
mbank_run
mbank_run --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_run:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_run
---------
A script to run mbank for generating a bank
To generate a bank:
mbank_run --options-you-like
You can also load (some) options from an ini-file:
mbank_run --some-options other_options.ini
Make sure that the mbank is properly installed.
To create a sub file and run in condor:
mbank_run --make-sub options.ini
To know which options are available:
mbank_run --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--grid-size GRID_SIZE] [--tile-tolerance TILE_TOLERANCE]
[--max-depth MAX_DEPTH] [--mm MM]
[--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}]
[--n-livepoints N_LIVEPOINTS] [--covering-fraction COVERING_FRACTION]
[--empty-iterations EMPTY_ITERATIONS] [--flow-file FLOW_FILE]
[--loss-function {forward_KL,ll_mse,weighted_ll_mse}]
[--n-layers N_LAYERS]
[--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]]
[--n-epochs N_EPOCHS] [--learning-rate LEARNING_RATE]
[--train-fraction TRAIN_FRACTION] [--batch-size BATCH_SIZE]
[--min-delta MIN_DELTA] [--patience PATIENCE] [--load-flow]
[--bank-file BANK_FILE] [--use-ray] [--train-flow] [--make-sub]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--grid-size GRID_SIZE
Number of grid points for each dimension. The number
of grid must match the number extra dimensions. If
None, the grid size will be a set of ones
--tile-tolerance TILE_TOLERANCE
Maximum tolerated variation of the relative difference
of the metric determinant between parent and child in
the iterative splitting procedure
--max-depth MAX_DEPTH
Maximum number of iterative splitting before
terminating.
--mm MM Minimum match for the bank (a.k.a. average distance
between templates)
--placing-method {uniform,qmc,geometric,iterative,stochastic,random,tile_random,geo_stochastic,random_stochastic,tile_stochastic,pruning,iterative_stochastic}
Which placing method to use for each tile
--n-livepoints N_LIVEPOINTS
Parameter to control the number of livepoints to use
in the `random` and `pruning` placing method. For
`random` (or related), it represents the number of
livepoints to use for the estimation of the coverage
fraction. For `pruning`, it amounts to the the ratio
between the number of livepoints and the number of
templates placed by ``uniform`` placing method.
--covering-fraction COVERING_FRACTION
Parameter to control the fraction of livepoints dead
before terminating the bank generation with the
`random` and `pruning` placing method. The higher the
threshold, the higher the nuber of templates in the
final bank.
--empty-iterations EMPTY_ITERATIONS
Number of consecutive rejected proposal after which
the `stochastic` placing method stops.
--flow-file FLOW_FILE
File where the normalizing flow is saved/loaded (in
zip format).
--loss-function {forward_KL,ll_mse,weighted_ll_mse}
Method to use to compute the metric.
--n-layers N_LAYERS Number of layers for the flow model to train
--hidden-features HIDDEN_FEATURES [HIDDEN_FEATURES ...]
Number of hidden features for the masked
autoregressive flow to train.
--n-epochs N_EPOCHS Number of training epochs for the flow
--learning-rate LEARNING_RATE
Learning rate for the flow
--train-fraction TRAIN_FRACTION
Fraction of the dataset to use for training
--batch-size BATCH_SIZE
Batch size for the training
--min-delta MIN_DELTA
Parameter for early stopping. If the validation loss
doesn't decrease of more than min-delta for --patience
times, the training will stop
--patience PATIENCE Patience for early stopping. If the validation loss
does not decrease enough for patience times, the
training will stop
--load-flow Whether to load the flow from file (useful for
plotting purposes)
--bank-file BANK_FILE
Path to the file to save the bank. If no path to the
file is provided, it is understood it is located in
run-dir. If not given, a suitable default name will be
set.
--use-ray Whether to use ray package to parallelize the code
execution
--train-flow Whether to train a normalizing flow model for the
tiling. It will be used for metric interpolation
--make-sub If set, it will make a condor submit file that the
user can use to launch the job through condor.
mbank_compare_volumes
mbank_compare_volumes --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_compare_volumes:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_compare_volumes
---------------------
A script to compare the volumes between different parameter space.
It computes the ratio :math:`\frac{V^{other}}{V}` between volume computed with different PSD, speciefied `--psd-other` and `--psd`.
It outputs the results of the computation in a json file.
To compare two volumes:
mbank_compare_volumes --options-you-like
You can also load (some) options from an ini-file:
mbank_compare_volumes --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_compare_volumes --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--comparison-file COMPARISON_FILE] [--flow-file FLOW_FILE]
[--psd-other PSD_OTHER] [--asd-other] [--ifo-other {L1,H1,V1}]
[--f-min-other F_MIN_OTHER] [--f-max-other F_MAX_OTHER]
[--df-other DF_OTHER] [--approximant-other APPROXIMANT_OTHER]
[--metric-type-other {hessian,parabolic_fit_hessian,symphony}]
[--label LABEL] [--label-other LABEL_OTHER] [--n-points N_POINTS]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--comparison-file COMPARISON_FILE
JSON file to store the result of the comparison
between different volumes
--flow-file FLOW_FILE
File to load the normalizing flow, used for importance
sampling estimation of the volume ratio. If not given,
the samples will be drawn from a uniform distribution
in the coordinates.
--psd-other PSD_OTHER
The input file for the PSD of the other space: it can
be either a txt either a ligolw xml file
--asd-other Whether the input PSD file has an ASD (sqrt of the
PSD)
--ifo-other {L1,H1,V1}
Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min-other F_MIN_OTHER
Minium frequency for the scalar product of the other
space (if not set, it will be set the same as the base
space)
--f-max-other F_MAX_OTHER
Maximum frequency for the scalar product of the other
space (if not set, it will be set the same as the base
space)
--df-other DF_OTHER Spacing of the frequency grid where the PSD is
evaluated for the other space (if not set, it will be
set the same as the base space)
--approximant-other APPROXIMANT_OTHER
LAL approximant for the metric computation in the
other space (if not set, it will be set the same as
the base space)
--metric-type-other {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric for the other
space (if not set, it will be set the same as the base
space)
--label LABEL Label for the parameter space characterized by --psd
--label-other LABEL_OTHER
Label for the other parameter space characterized by
--psd-other
--n-points N_POINTS Number of points to evaluate the volume ratio with
mbank_compute_volume
mbank_compute_volume --help
/home/docs/checkouts/readthedocs.org/user_builds/mbank/envs/latest/bin/mbank_compute_volume:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
__import__('pkg_resources').require('gw-mbank==1.1.2')
usage:
mbank_compute_volume
--------------------
A script to compute the volume of a given parameter space. If --mm is given, the volume is also expressed in units of template volume (i.e. is a number of templates).
The volume is computed with importance sampling.
To compute the volume:
mbank_compute_volume --options-you-like
You can also load (some) options from an ini-file:
mbank_compute_volume --some-options other_options.ini
Make sure that the mbank is properly installed.
To know which options are available:
mbank_compute_volume --help
[-h] [--plot] [--show] [--verbose] [--run-dir RUN_DIR]
[--run-name RUN_NAME] [--variable-format VARIABLE_FORMAT] [--psd PSD]
[--asd] [--ifo {L1,H1,V1}] [--f-min F_MIN] [--f-max F_MAX] [--df DF]
[--approximant APPROXIMANT]
[--metric-type {hessian,parabolic_fit_hessian,symphony}]
[--m1-range M1_RANGE M1_RANGE] [--m2-range M2_RANGE M2_RANGE]
[--mtot-range MTOT_RANGE MTOT_RANGE] [--q-range Q_RANGE Q_RANGE]
[--mc-range MC_RANGE MC_RANGE] [--eta-range ETA_RANGE ETA_RANGE]
[--s1-range S1_RANGE S1_RANGE] [--s2-range S2_RANGE S2_RANGE]
[--chi-range CHI_RANGE CHI_RANGE]
[--theta-range THETA_RANGE THETA_RANGE]
[--phi-range PHI_RANGE PHI_RANGE] [--e-range E_RANGE E_RANGE]
[--meanano-range MEANANO_RANGE MEANANO_RANGE]
[--iota-range IOTA_RANGE IOTA_RANGE]
[--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE]
[--volume-file VOLUME_FILE] [--flow-file FLOW_FILE] [--mm MM]
[--n-points N_POINTS] [--n-experiments N_EXPERIMENTS]
optional arguments:
-h, --help show this help message and exit
--plot Whether to make some plots. They will be store in run-
dir
--show Whether to show the plots.
--verbose Whether to be verbose
--run-dir RUN_DIR Output directory in which the outputs will be saved.
If default is used, the run name will be appended.
--run-name RUN_NAME Name for the current run: it will set the name of some
outputs
--variable-format VARIABLE_FORMAT
Choose which variables to include in the bank. Valid
formats are those of `mbank.handlers.variable_format`
--psd PSD The input file for the PSD: it can be either a txt
either a ligolw xml file
--asd Whether the input file has an ASD (sqrt of the PSD)
--ifo {L1,H1,V1} Interferometer name: it can be L1, H1, V1. This is a
field for the xml files for the PSD and the bank
--f-min F_MIN Minium frequency for the scalar product
--f-max F_MAX Maximum frequency for the scalar product
--df DF Spacing of the frequency grid where the PSD is
evaluated
--approximant APPROXIMANT
LAL approximant for the bank generation
--metric-type {hessian,parabolic_fit_hessian,symphony}
Method to use to compute the metric.
--m1-range M1_RANGE M1_RANGE
Range values for the mass 1 (in solar masses)
--m2-range M2_RANGE M2_RANGE
Range values for the mass 2 (in solar masses)
--mtot-range MTOT_RANGE MTOT_RANGE
Range values for the total masses (in solar masses).
--q-range Q_RANGE Q_RANGE
Range values for the mass ratio.
--mc-range MC_RANGE MC_RANGE
Range values for the total masses (in solar masses).
--eta-range ETA_RANGE ETA_RANGE
Range values for the mass ratio.
--s1-range S1_RANGE S1_RANGE
Range values for magnitude of spin 1 (if applicable)
--s2-range S2_RANGE S2_RANGE
Range values for magnitude of spin 1 (if applicable)
--chi-range CHI_RANGE CHI_RANGE
Range values for effective spin parameter (if
applicable)
--theta-range THETA_RANGE THETA_RANGE
Range values for theta angles of spins (if applicable)
--phi-range PHI_RANGE PHI_RANGE
Range values for phi angles of spins (if applicable)
--e-range E_RANGE E_RANGE
Range values for the eccentricity (if applicable)
--meanano-range MEANANO_RANGE MEANANO_RANGE
Range values for the mean anomaly (if applicable).
TODO: find a nice default...
--iota-range IOTA_RANGE IOTA_RANGE
Range values for iota (if applicable)
--ref-phase-range REF_PHASE_RANGE REF_PHASE_RANGE
Range values for reference phase (if applicable)
--volume-file VOLUME_FILE
JSON file to store the result of the volume
computation
--flow-file FLOW_FILE
File to load the normalizing flow, used for importance
sampling estimation of the volume ratio. If not given,
the samples will be drawn from a uniform distribution
in the coordinates.
--mm MM Typical match between neighbouring templates, to
compute the template volume
--n-points N_POINTS Number of points to evaluate the volume ratio with
--n-experiments N_EXPERIMENTS
Number of times the volume computation is performed
(to compute the error of the mean). Default means no
standard error is computed