You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nu_e_bar table loaded for the Walk_2019 model contains duplicate entries for the times listed below. Column 1 is the time in s, column 2 is the index in the Walk_2019.time member. This was found by running the model through scipy.interpolate.PchipInterpolator, using model.time as the argument x.
This only features in the nu_e_bar file, and appears to have been resolved for other flavors by commit 1e37a4c
fromsnewpy.models.ccsnimportWalk_2019fromsnewpy.neutrinoimportFlavorfromscipy.interpolateimportPchipInterpolatorimportnumpyasnpmodel=Walk_2019(filename='<path-to-snewpy-models>/Walk_2019/s40.0c_3DBH_dir1')
time=model.timetry:
interp_lum=PchipInterpolator(x=time, y=model.luminosity[Flavor.NU_E_BAR])
exceptValueErrorase:
print(e)
diff=np.diff(time)
idx=np.where(diff==0)[0]
print(f"{'time':<10s}{'idx':<5s}")
fort, iinzip(time[idx], idx):
# Add +1 to index to point at duplicate entriesprint(f"{t.value:<10f}{i+1:<5d}")
The nu_e_bar table loaded for the Walk_2019 model contains duplicate entries for the times listed below. Column 1 is the time in s, column 2 is the index in the
Walk_2019.time
member. This was found by running the model throughscipy.interpolate.PchipInterpolator
, usingmodel.time
as the argumentx
.This only features in the nu_e_bar file, and appears to have been resolved for other flavors by commit 1e37a4c
https://github.com/SNEWS2/snewpy/blob/main/models/Walk_2019/s40.0c_3DBH_dir1_LS220_nuebar
Code to replicate & find duplicate entries
Expected Output
The text was updated successfully, but these errors were encountered: