Skip to content

Commit 192b8ec

Browse files
authored
NuFit 5.2 and small bug fixes (#740)
add NuFit 5.2 osc values ignore NANs in kde stage ignore NANs in map plotter
1 parent eb5ca7f commit 192b8ec

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

pisa/core/map.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -717,10 +717,10 @@ def plot(self, symm=False, logz=False, vmin=None, vmax=None, backend=None,
717717

718718
# we need to set the vmin and vmax now by hand:
719719
if vmin is None:
720-
vmin = uncertainties.nominal_value(self.hist.min())
720+
vmin = np.nanmin(unp.nominal_values(self.hist))
721721

722722
if vmax is None:
723-
vmax = uncertainties.nominal_value(self.hist.max())
723+
vmax = np.nanmax(unp.nominal_values(self.hist))
724724

725725
if symm:
726726
v = np.max([-vmin, vmax])

pisa/utils/kde_hist.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def get_hist(
7878
if len(weights) == 0:
7979
norm = sample.shape[0]
8080
else:
81-
norm = np.sum(weights)
81+
norm = np.sum(np.nan_to_num(weights))
8282

8383
binning = binning.oversample(oversample)
8484

@@ -107,9 +107,8 @@ def get_hist(
107107
reflect_upper = binning[coszen_name].bin_edges[-1] == 1
108108

109109
# Get the kernel weights
110-
111110
kde_kwargs = dict(
112-
weights=weights,
111+
weights=np.nan_to_num(weights),
113112
bw_method=bw_method,
114113
adaptive=adaptive,
115114
alpha=alpha,
@@ -127,7 +126,7 @@ def get_hist(
127126
c = b.weighted_centers.m
128127
if b.name == coszen_name:
129128
# how many bins to add for reflection
130-
l = int(len(c) * coszen_reflection)
129+
l = int(len(c) * float(coszen_reflection))
131130
if reflect_lower:
132131
c0 = 2 * c[0] - c[1 : l + 1][::-1]
133132
else:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Best fit values from NuFitv5.2 (with SK atmospheric data)
2+
# Note that asymmetric Gaussian 1 sigma not currently implemented, so 1 sigma uncertainty not exact here
3+
4+
theta12 = 33.41 units.deg
5+
theta12.3s_range = [31.31, 35.74] * units.deg
6+
7+
theta13_nh = 8.58 +/- 0.11 units.deg
8+
theta13_nh.3s_range = [8.23, 8.91] * units.deg
9+
10+
theta13_ih = 8.57 +/- 0.11 units.deg
11+
theta13_ih.3s_range = [8.23, 8.94] * units.deg
12+
13+
theta23_nh = 42.2 units.deg
14+
theta23_nh.3s_range = [39.7, 51.0] * units.deg
15+
theta23_nh.range = [30.0, 60.0] * units.deg
16+
17+
theta23_ih = 49.0 units.deg
18+
theta23_ih.3s_range = [39.9, 51.5] * units.deg
19+
theta23_ih.range = [30.0, 60.0] * units.deg
20+
21+
deltacp_nh = 232 units.deg
22+
deltacp_nh.3s_range = [144,350] * units.deg
23+
deltacp_nh.range = [0,360] * units.deg
24+
25+
deltacp_ih = 276 units.deg
26+
deltacp_ih.3s_range = [194,344] * units.deg
27+
deltacp_ih.range = [0,360] * units.deg
28+
29+
deltam21 = 7.41e-5 units.eV**2
30+
deltam21.3s_range = [6.82e-5, 8.03e-5] * units.eV**2
31+
32+
# NuFit dm3l = dm31 for the normal ordering, so can directly use the NuFit value
33+
deltam31_nh = 0.002507 units.eV**2
34+
deltam31_nh_gauss = 0.002507 +/- 0.000027 * units.eV**2
35+
deltam31_nh.range = [0.001, 0.007] * units.eV**2
36+
deltam31_nh.3s_range = [0.002427, 0.002590] * units.eV**2
37+
38+
# NuFit dm3l = dm32 for the inverted ordering (and is thus negative), so must convert using: dm31 = dm32 + dm21
39+
deltam31_ih = -0.002412 units.eV**2
40+
deltam31_ih_gauss = -0.002412 +/- 0.000028 * units.eV**2
41+
deltam31_ih.3s_range = [-0.002496, -0.002332] * units.eV**2
42+
deltam31_ih.range = [-0.007, -0.001] * units.eV**2

0 commit comments

Comments
 (0)