... | ... | @@ -22,38 +22,48 @@ usage: pe_pyGWB [-h] --path_to_file PATH_TO_FILE [--Model MODEL] [--Model_Parame |
|
|
optional arguments:
|
|
|
-h, --help show this help message and exit
|
|
|
--path_to_file PATH_TO_FILE
|
|
|
Path to data file to use for analysis.
|
|
|
Path to data file (or pickled baseline) to use for analysis.
|
|
|
--ifos IFOS List of names of two interferometers for which you want to run PE, default is H1 and L1. Not needed when running from a pickled baseline.
|
|
|
--Model MODEL Model for which to run the PE. Default is "Power-law".
|
|
|
--Model_Parameters_Dictionary_Priors MODEL_PARAMETERS_DICTIONARY_PRIORS
|
|
|
The required parameters for the model and their priors. Default value is power-law parameters omega_ref with LogUniform bilby prior from 1e-11 to 1e-8 and alpha with Uniform bilby prior from -4 to 4.
|
|
|
The required parameters for the model and their priors. Default value is power-law parameters omega_ref with LogUniform bilby prior from 1e-11 to 1e-8 and alpha with Uniform bilby
|
|
|
prior from -4 to 4.
|
|
|
--Non_Prior_Arguments NON_PRIOR_ARGUMENTS
|
|
|
A dictionary with the parameters of the model that are not associated with a prior, such as the reference frequency for Power-Law. Default value is reference frequency at 25 Hz for the power-law model.
|
|
|
A dictionary with the parameters of the model that are not associated with a prior, such as the reference frequency for Power-Law. Default value is reference frequency at 25 Hz
|
|
|
for the power-law model.
|
|
|
--output_dir OUTPUT_DIR
|
|
|
Output directory of the PE (sampler). Default: ./PE_Output.
|
|
|
--injection_parameters INJECTION_PARAMETERS
|
|
|
The injected parameters.
|
|
|
--quantiles QUANTILES
|
|
|
The quantiles used for plotting in plot corner, default is [0.05, 0.95].
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
For the moment, these are the six parameters of the script. Only the first one is required if one wants to run for a power-law model. In the next lines, we will go over them quickly:
|
|
|
- `path_to_file`: This parameter must give the path to an `npz` file with information about the pyGWB run you want to analyse. The file needs to contain the point estimate spectrum, sigma spectrum and corresponding frequencies of that run.
|
|
|
- `Model`: The model you want to run PE for, currently all models from the PE module are in here, but not all work. I would use `Power-Law` for the moment.
|
|
|
- `ifos`: This parameters is a list with the names of the interferometers you are considering when running the PE, default value is '["H1", "L1"]'.
|
|
|
- `Model`: The model you want to run PE for, currently all models from the PE module are in here. Default and easiest model to work with is `Power-Law`.
|
|
|
- `Model_Parameters_Dictionary`: the required parameters of the model that need a prior for the parameter estimation and their bilby priors. These parameters are stored in a dictionary which is given to the script as a string, see the example below.
|
|
|
- `Non_Prior_Arguments`: A dictionary of parameters that are part of the model you consider, but are just one value and do not need a prior in PE.
|
|
|
- `output_dir`: The output directory of the PE sampler.
|
|
|
- `injection_parameters`: The values for the (possible) injection parameters of the data you are considering here.
|
|
|
- `quantiles`: The values for the quantiles used when plotting the PE results at the end in the plot corner. Default is '[0.05, 0.95]'.
|
|
|
|
|
|
That brings us to an example on how to run the PE script. This example will show the most basic way to run the script for a Power-Law model, first using the default values and then using the actual arguments of the script:
|
|
|
```
|
|
|
./pe_pyGWB --path_to_file {complete-path-to-file}/file.npz
|
|
|
```
|
|
|
You can also run the code with a pickled baseline. In that case `file.npz` should be a pickle file `baseline.p` or `baseline.pickle`.
|
|
|
|
|
|
This code will run a Power-Law PE with the priors and values references in the help of the script. The following line of code will give the same result:
|
|
|
```
|
|
|
./pe_pyGWB --path_to_file {complete-path-to-file}/file.npz --Model Power-Law --Model_Parameters_Dictionary '{"omega_ref":"bilby.core.prior.LogUniform(1e-11,1e-8,\"$\\Omega_{ref}$\")","alpha":"bilby.core.prior.Uniform(-4,4,\"$\\\\alpha$\")"}' --Non_Prior_Arguments '{"fref":"25"}' --output_dir ./PE_Output/ --injection_parameters '{"Omega_ref":"{insert_injected_Omega_ref}", "alpha": "{Insert_injected_alpha}"}'
|
|
|
./pe_pyGWB --path_to_file {complete-path-to-file}/file.npz --ifos '["H1", "L1"]' --Model Power-Law --Model_Parameters_Dictionary '{"omega_ref":"bilby.core.prior.LogUniform(1e-11,1e-8,\"$\\Omega_{ref}$\")","alpha":"bilby.core.prior.Uniform(-4,4,\"$\\\\alpha$\")"}' --Non_Prior_Arguments '{"fref":"25"}' --output_dir ./PE_Output/ --injection_parameters '{"Omega_ref":"{insert_injected_Omega_ref}", "alpha": "{Insert_injected_alpha}"}' --quantiles '[0.05, 0.95]'
|
|
|
|
|
|
```
|
|
|
It is important that you add the correct amount of '\' and dubble quotes, otherwise the dictionary cannot be loaded by the script.
|
|
|
It is important that you add the correct amount of '\', single and double quotes, otherwise the dictionary cannot be loaded by the script. The dictionaries and lists are loaded in using json, so single quotes at the beginning and end are needed to read it correctly. Double quotes are then used inside the single quotes to mark a general quote.
|
|
|
|
|
|
Now, in the output folder, you can find the results of the PE script.
|
|
|
Now, in the output folder, you can find the results and plots of the PE script.
|
|
|
|
|
|
|