-
Notifications
You must be signed in to change notification settings - Fork 5
Data release #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data release #250
Changes from 28 commits
92a62c4
7a1a9bb
ebf75a1
469adae
82a6c37
e5cfd31
255cabf
74e3358
5bb6f2b
98671cc
b0da467
9a83c8e
0914f78
44046dd
8dabba2
96c8f2a
231ef25
8fa0edf
6958d7c
8ccb49b
6b51e19
690ce7d
0398b57
fb08766
485ab02
cc77cd2
89924ad
66743f9
74f564e
c3196a3
624a72b
14004ca
75aa21f
5020873
8f8f105
04b9a3b
9fcdada
8a2e526
9396bd8
b15d364
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,7 +31,9 @@ | |||||||||||||||
| from skyllh.core.timing import ( | ||||||||||||||||
| TaskTimer, | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| from skyllh.analyses.i3.publicdata_ps.utils import ( | ||||||||||||||||
| FctSpline2D, | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| class PDBackgroundI3EnergyPDF( | ||||||||||||||||
| EnergyPDF, | ||||||||||||||||
|
|
@@ -229,6 +231,8 @@ def __init__( | |||||||||||||||
|
|
||||||||||||||||
| self._hist_logE_sinDec = h | ||||||||||||||||
|
|
||||||||||||||||
| self._pdf_spline = self._construct_conditional_pdf_spline() | ||||||||||||||||
|
|
||||||||||||||||
| @property | ||||||||||||||||
| def hist_smoothing_method(self): | ||||||||||||||||
| """The instance of HistSmoothingMethod defining the smoothing filter of | ||||||||||||||||
|
|
@@ -276,6 +280,16 @@ def hist_mask_mc_covered_with_physics(self): | |||||||||||||||
| self._hist_mask_mc_covered & | ||||||||||||||||
| ~self._hist_mask_mc_covered_zero_physics) | ||||||||||||||||
|
|
||||||||||||||||
| def _construct_conditional_pdf_spline(self): | ||||||||||||||||
| """ | ||||||||||||||||
| """ | ||||||||||||||||
| spline = FctSpline2D( | ||||||||||||||||
| self._hist_logE_sinDec, | ||||||||||||||||
| self.binnings[0].binedges, | ||||||||||||||||
| self.binnings[1].binedges) | ||||||||||||||||
|
|
||||||||||||||||
| return spline | ||||||||||||||||
|
|
||||||||||||||||
| def initialize_for_new_trial( | ||||||||||||||||
| self, | ||||||||||||||||
| tdm, | ||||||||||||||||
|
|
@@ -285,16 +299,17 @@ def initialize_for_new_trial( | |||||||||||||||
| which has to be done only once for a particular trial data. | ||||||||||||||||
| """ | ||||||||||||||||
|
|
||||||||||||||||
| logE_binning = self.get_binning('log_energy') | ||||||||||||||||
| sinDec_binning = self.get_binning('sin_dec') | ||||||||||||||||
| # logE_binning = self.get_binning('log_energy') | ||||||||||||||||
| # sinDec_binning = self.get_binning('sin_dec') | ||||||||||||||||
|
|
||||||||||||||||
| logE_idx = np.digitize( | ||||||||||||||||
| tdm['log_energy'], logE_binning.binedges) - 1 | ||||||||||||||||
| sinDec_idx = np.digitize( | ||||||||||||||||
| tdm['sin_dec'], sinDec_binning.binedges) - 1 | ||||||||||||||||
| # logE_idx = np.digitize( | ||||||||||||||||
| # tdm['log_energy'], logE_binning.binedges) - 1 | ||||||||||||||||
| # sinDec_idx = np.digitize( | ||||||||||||||||
| # tdm['sin_dec'], sinDec_binning.binedges) - 1 | ||||||||||||||||
|
|
||||||||||||||||
| with TaskTimer(tl, 'Evaluating logE-sinDec histogram.'): | ||||||||||||||||
| self._pd = self._hist_logE_sinDec[(logE_idx, sinDec_idx)] | ||||||||||||||||
| # self._pd = self._hist_logE_sinDec[(logE_idx, sinDec_idx)] | ||||||||||||||||
chiarabellenghi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||
| self._pd = self._pdf_spline(tdm['log_energy'], tdm['sin_dec'], grid=False) | ||||||||||||||||
|
||||||||||||||||
| self._pd = self._pdf_spline(tdm['log_energy'], tdm['sin_dec'], grid=False) | |
| self._pd = self._pdf_spline( | |
| tdm['log_energy'], | |
| tdm['sin_dec'], | |
| grid=False, | |
| renorm=False, | |
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chiarabellenghi not sure about this, it sounds correct but also shouldn't impact performance too much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see things being especially slow at the moment, maybe we can keep this as a possible enhancement for the future?
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,8 +380,8 @@ def create_energy_filter_mask( | |
| if cut_sindec is None: | ||
| logger.warn( | ||
| 'No `cut_sindec` has been specified. The energy cut will be ' | ||
| 'applied in [-90, 0] deg.') | ||
| cut_sindec = 0. | ||
| 'applied in [-90, 90] deg.') | ||
| cut_sindec = np.sin(np.radians(90.1)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so this returns:
I guess we could just set it to 1.0 or 1.1?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think all this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that I think about it, for the new data release, the entire cut to inject events in the southern sky at meaningful energies is no longer needed. There, the effective area has been set to zero at low energies. However, we should keep this function so that the signal injection still works correctly for the 10yr data release. |
||
|
|
||
| filter_mask = np.logical_and( | ||
| events['sin_dec'] < cut_sindec, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.