forked from gwastro/pycbc
-
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.
Ranking statistic for live singles (gwastro#4689)
* Allow the live single trigger fits to use ranking statistic rather than sngl-ranking * inbin is no longer all the events above threshold, plotting to indicate with case where no triggers are found * deal better with cases where there are no triggers * Use ranking statistic for single-detector events * Fix some errors * fix some statistics so they can produce single-detector events * Some codeclimate suggestions * get fit coeff files into CI, set a maximum IFAR for singles * alter the CI example run * Codeclimate suggestions * Line too long * minor tweaks * Used shared code * Fix broken fixing * missed that this needs the module * typo * calculate plotmax earlier and use it to decide the histogram bins * Update bin/live/pycbc_live_plot_single_significance_fits Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr> * TDC comments * Update threshold naming and description * update argument in example * Please do not look at the previous commit and see how much of an idiot I am * Update bin/live/pycbc_live_combine_single_significance_fits Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr> --------- Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr>
- Loading branch information
1 parent
9154481
commit d486ec2
Showing
9 changed files
with
266 additions
and
101 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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Makes files which can be used as the fit_coeffs statistic. | ||
These are not of any scientific use, but the code will accept them | ||
and run properly | ||
""" | ||
|
||
import h5py | ||
import numpy as np | ||
|
||
# Get number of templates from bank file | ||
with h5py.File('template_bank.hdf', 'r') as bankf: | ||
n_templates = bankf['mass1'].size | ||
|
||
for ifo in ['H1','L1','V1']: | ||
with h5py.File(f'{ifo}-fit_coeffs.hdf','w') as fits_f: | ||
fits_f.attrs['analysis_time'] = 430000 | ||
fits_f.attrs['ifo'] = ifo | ||
fits_f.attrs['stat'] = f'{ifo}-fit_coeffs' | ||
fits_f.attrs['stat_threshold'] = 5 | ||
|
||
fits_f['count_above_thresh'] = np.ones(n_templates) * 100 | ||
fits_f['count_in_template'] = np.ones(n_templates) * 20000 | ||
fits_f['fit_coeff'] = np.ones(n_templates) * 5.5 | ||
fits_f['median_sigma'] = np.ones(n_templates) * 5800 | ||
fits_f['template_id'] = np.arange(n_templates) | ||
|
||
|
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
Oops, something went wrong.