-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7f09ce
commit 9049b30
Showing
2 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,9 @@ | |
"source": [ | ||
"## I. Create the configuration files for varying parameters\n", | ||
"\n", | ||
"See the examples of master configuration files in the config folder. Running **init\\_fisher\\_from\\_fiducial** will create a folder (named after the run name set in the master configuration file) and sub configuration files inside (which correspond to the variation of each parameter). Once they are created each can by run with the script [**run\\_fisher.py**](https://github.com/gaetanfacchinetti/21cmCAST/blob/main/scripts/exec/run_fisher.py). Note that the script takes at least one argument (the name of the sub configuration files to run) and three optional: the number of threads, the number of the first seed, and the number of times the same script should be run with increasing seeds. The latter is only usefull to run several fiducial cases in order to determine what the 'average Universe' looks like. In practice, for a Fisher forecast one should fix the seed to a single value for all the runs. " | ||
"/!\\ Equivalent to use init_fisher.py\n", | ||
"\n", | ||
"See the examples of master configuration files in the config folder. Running **init\\_runs** will create a folder (named after the run name set in the master configuration file) and sub configuration files inside (which correspond to the variation of each parameter). Once they are created each can by run with the script [**run\\_lightcone.py**](https://github.com/gaetanfacchinetti/21cmCAST/blob/main/scripts/exec/run_fisher.py). Note that the script takes at least one argument (the name of the sub configuration files to run) and a few optionals (check with running python **run\\_lightcone** -h). However, the option generate_script = True of **init\\_runs** directly produce a slurm script that can be submitted out of the box (after verification of the execution time and memory requirements)." | ||
] | ||
}, | ||
{ | ||
|
@@ -31,7 +33,7 @@ | |
"outputs": [], | ||
"source": [ | ||
"configuration_file = \"example_wdm.config\"\n", | ||
"p21c.init_runs(configuration_file, clean_existing_dir=False)" | ||
"p21c.init_runs(configuration_file, clean_existing_dir=False, generate_script = True, email_address = \"[email protected]\")" | ||
] | ||
}, | ||
{ | ||
|
@@ -85,18 +87,18 @@ | |
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## III. Define the fiducial model and get its power spectrum\n", | ||
"## III. Define the fiducial model\n", | ||
"\n", | ||
"A **Fiducial** object can be defined by specifying the path where the lightcones are saved (depends on what was set on the config file) as well as the redshifts and modes bin edges. Note that we must set by hand whether the mode bins are linearly of logarithmically spaced with the option **logk** that is by default **False** as the output mode bin deges returned by **define\\_grid\\_modes\\_redshits()** are linearly spaced. Further options can be specified, such as a fraction of modeling error **frac\\_mod** (see below)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"fiducial = p21c.Fiducial(\"/globalscratch/ulb/physth_fi/gfacchin/wdm_21cm/output/WDM_FISHER/WDM_7.0_0_MINIHALOS\", z_bins, z_array, k_bins, False, load=True)" | ||
"fiducial = p21c.Fiducial(\"/globalscratch/ulb/physth_fi/gfacchin/wdm_21cm/output/WDM_FISHER/WDM_7.0_MINIHALOS\", z_bins, z_array, k_bins, False, load=True)" | ||
] | ||
}, | ||
{ | ||
|
@@ -185,9 +187,9 @@ | |
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### 2. Including WDM (or any other parameter)\n", | ||
"### 2. Including WDM (or any other extra parameter)\n", | ||
"\n", | ||
"We define an array of parameter objects corresponding to M_WDM for many different step sizes around the central/fiducial value (given in percentage of the fiducial value). This part (especially for a large number of steps) can be long up to a few hours." | ||
"We define an array of parameter objects corresponding to M_WDM for many different step sizes around the central/fiducial value (given in percentage of the fiducial value). This part (especially for a large number of steps) can be long up to a few hours. By extra parameters we mean parameters for which we do not know which step size gives a correct evaluation of the power spectrum derivative in the Fisher matrix element. For those parameters we test different step sizes (given in percentage of the fiducial value)." | ||
] | ||
}, | ||
{ | ||
|
@@ -234,7 +236,7 @@ | |
"source": [ | ||
"## VI. Evaluate the Fisher matrix and its inverse\n", | ||
"\n", | ||
"From the list of parameters objects defined above one can directly compute the Fisher matrix with the **evaluate\\_fisher\\_matrix()** function. One can add a modeling noise to the power spectrum with the attribute **frac\\_noise** of the fiducial (as a percentage of the fiducial value). The triangle plot figure can be produced with the function **make\\_triangle\\_plot()** and plotted. Finally, the matrices can be displayed nicely with the **display\\_matrix()** function." | ||
"From the list of parameters objects defined above one can directly compute the Fisher matrix with the **evaluate\\_fisher\\_matrix()** function. The triangle plot figure can be produced with the function **make\\_triangle\\_plot()** and plotted. Finally, the matrices can be displayed nicely with the **display\\_matrix()** function." | ||
] | ||
}, | ||
{ | ||
|