diff --git a/toise/classification_efficiency.py b/toise/classification_efficiency.py index c3473de..0b4b0bb 100644 --- a/toise/classification_efficiency.py +++ b/toise/classification_efficiency.py @@ -7,6 +7,7 @@ from .util import data_dir import json import os +import warnings def get_classification_efficiency(geometry="IceCube", spacing=125): @@ -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) ) @@ -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("/"): diff --git a/toise/data/cache/manifest.json b/toise/data/cache/manifest.json index 4f54a84..7b47a91 100644 --- a/toise/data/cache/manifest.json +++ b/toise/data/cache/manifest.json @@ -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 } } \ No newline at end of file diff --git a/toise/data/selection_efficiency/sparsecube_doublecascade_NL_efficiency.json b/toise/data/selection_efficiency/sparsecube_doublecascade_NL_efficiency.json new file mode 100644 index 0000000..f701c34 --- /dev/null +++ b/toise/data/selection_efficiency/sparsecube_doublecascade_NL_efficiency.json @@ -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 + ] + ] + } +} \ No newline at end of file