Skip to content

Commit

Permalink
Switch to real Gen2 classification efficiency
Browse files Browse the repository at this point in the history
Co-authored-by: Neha Lad <[email protected]>
  • Loading branch information
jvansanten and NehaLad9 committed May 21, 2024
1 parent 43ea7aa commit 9e76454
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 0 deletions.
13 changes: 13 additions & 0 deletions toise/classification_efficiency.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .util import data_dir
import json
import os
import warnings


def get_classification_efficiency(geometry="IceCube", spacing=125):
Expand Down Expand Up @@ -56,7 +57,14 @@ def get_classification_efficiency(geometry="IceCube", spacing=125):
return ClassificationEfficiency.load(
"icecube_doublecascade_efficiency.json", (6e4, 1e7)
)
elif geometry == "Sunflower" and spacing == 240:
return ClassificationEfficiency.load(
"sparsecube_doublecascade_NL_efficiency.json", (6e4, 1e7)
)
elif 240 <= spacing <= 260:
warnings.warn(
f"Falling back to SparseCube classification efficiency for {geometry=} and {spacing=}"
)
return ClassificationEfficiency.load(
"sparsecube_doublecascade_efficiency.json", (6e4, 1e7)
)
Expand Down Expand Up @@ -93,6 +101,11 @@ def sigmoid(x, a, b, c, d, m):
"""
return ((a - d) / (1 + (np.exp(b * np.log(x / 1e3) - c)) ** m)) + d

@staticmethod
def sigmoid_updated(x, L, x0, k, b):
y = (L) / (1 + np.exp(-k * (x - x0))) + b
return y

@classmethod
def load(cls, filename, energy_range=(0, np.inf)):
if not filename.startswith("/"):
Expand Down
16 changes: 16 additions & 0 deletions toise/data/cache/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,21 @@
"toise.externals.nuFATE.crosssections.differential.5.n.NC": {
"expires": null,
"filename": "toise.externals.nuFATE.crosssections.differential.5.n.NC.fits"
},
"toise.figures.diffuse.flavor.source_profile.astro_00_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None": {
"filename": "toise.figures.diffuse.flavor.source_profile.astro_00_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None.pkl.gz",
"expires": 1716465797.961588
},
"toise.figures.diffuse.flavor.source_profile.astro_01_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None": {
"filename": "toise.figures.diffuse.flavor.source_profile.astro_01_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None.pkl.gz",
"expires": 1716465868.364501
},
"toise.figures.diffuse.flavor.profile.astro_00_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None": {
"filename": "toise.figures.diffuse.flavor.profile.astro_00_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None.pkl.gz",
"expires": 1716466794.651093
},
"toise.figures.diffuse.flavor.profile.astro_01_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None": {
"filename": "toise.figures.diffuse.flavor.profile.astro_01_(('Gen2-InIce', 10.0), ('IceCube', 15.0))_{'emu_crit': 2000000.0}_100_None.pkl.gz",
"expires": 1716466868.466432
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"nue": {
"cascades": [
"logpoly",
[
211.08562334,
-40.24929496,
2.79896331
]
],
"starting_tracks": [
"logpoly",
[
-251.7835465,
117.63929112,
-16.83418227,
0.80111839
]
],
"double_cascades": [
"logpoly",
[
-63.83109032,
25.42909962,
-2.99231194,
0.12524589
]
]
},
"numu": {
"cascades": [
"logpoly",
[
-65.51433012,
27.46710645,
-2.25716057
]
],
"starting_tracks": [
"logpoly",
[
454.6150171,
-167.52327515,
24.56073741,
-1.18053345
]
],
"double_cascades": [
"logpoly",
[
-139.05608984,
61.46406983,
-8.76234556,
0.41181181
]
]
},
"nutau": {
"cascades": [
"sigmoid_updated",
[
42.7778948,
5.83830578,
-3.54578634,
30.37678602
]
],
"starting_tracks": [
"sigmoid_updated",
[
30.57598051,
6.17941948,
3.58992146,
21.87159307
]
],
"double_cascades": [
"logpoly",
[
-418.10648932,
159.28011746,
-17.77677905,
0.5634169
]
]
}
}

0 comments on commit 9e76454

Please sign in to comment.