You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update discrete systematic README (Ultrasurface use)
The previous version described the use of scripts that aren't part of pisa:
* remove the pisa unrelated descriptions
* update the use instructions with specific config and pipeline example
* Implement PR review comments
Copy file name to clipboardexpand all lines: pisa/stages/discr_sys/README.md
+53-26
Original file line number
Diff line number
Diff line change
@@ -42,39 +42,66 @@ This will generate N different `.json` for N systematics.
42
42
All the info from the fit, including the fit function itself is stored in that file.
43
43
Plotting is also available via `-p/--plot' and is HIGHLY recomended to inspect the fit results.
44
44
45
-
### Ultrasurfaces
46
-
47
-
This is the novel treatment of detector systematics via likelihood-free inference. It assigns gradients to _every event_ to allow event-by-event re-weighting as a function of detector uncertainties in a way that is fully decoupled from flux and oscillation effects.
48
45
49
-
Once ready, the results are stored in a `.feather` file containing all events of the nominal MC set and their associated gradients.
46
+
### Ultrasurfaces
50
47
51
-
### Preparation
48
+
Treatment of detector systematics via likelihood-free inference. Polynomial coefficients, assigned to every event, allow continuous re-weighting as a function of detector uncertainties in a way that is fully decoupled from flux and oscillation effects. The results are stored in a feather file containing all events of the nominal MC set and their associated polynomial coefficients.
52
49
53
-
The scripts producing the gradients are located in `$FRIDGE_DIR/analysis/oscnext_ultrasurfaces`. To produce the gradient feather file, we first need to convert PISA HDF5 files to `.feather` using the `pisa_to_feather.py` script. We need to pass the input file, the output file, and a flag setting the sample (variable names) to be used (either `--verification-sample`, `--flercnn-sample`, `--flercnn-hnl-sample`, `--upgrade-sample`, or no additional flag for the Retro sample).
50
+
To use this in a PISA analysis pipeline, you will need to set up an ultrasurface config file looking like this:
After converting all files and setting the appropriate paths in `$FRIDGE_DIR/analysis/oscnext_ultrasurfaces/datasets/data_loading.py`, we produce gradients in two steps.
59
-
60
-
**First**: Calculate event-wise probabilities with (assuming we `cd`'d into `$FRIDGE_DIR/analysis/oscnext_ultrasurfaces/knn`)
61
98
62
-
(Note here that this needs to be run with an earlier version of sklearn, due to deprecation of some used functions, e.g. use: `scikit-learn = 1.1.2`)
99
+
Here you specify the detector systematic parameters to be varied in the fit, with their nominal values and allowed ranges. Additionally, you have to specify the nominal point at which the ultrasurfaces were fit (`nominal_points`), since this might be different from the nominal point used in your analysis. Finally, you have to point to the file where the polynomial coefficients are stored (`fit_results_file`).
The gradients are stored in a `.feather` file containing all events of the nominal MC set and their associated gradients. The Ultrasurface PISA stage needs to be pointed to the location of this file. In the unblinding version of this analysis, the file is
It's important to include the ultrasurface stage **before** the histogramming stage, unlike it's done for the hypersurfaces. Now you should be good to go.
0 commit comments