SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

Remove duplicate time entries from Walk_2019 nu_e_bar file #211

Closed sgriswol closed 1 year ago

sgriswol commented 1 year ago

Fixes #210

sgriswol commented 1 year ago

Though this PR is named fix_Walk_2019 I also found a similar issue in several of the Zha_2021 models. I have committed changes to the Zha models on Zha_2021_duplicate_times. Those model files are larger, and there are more duplicate times. To be specific, there were 3,658 duplicates out of 180,913 total entries, over 11 model files.

Given the much broader scope of these duplicates, and that in most cases the duplication seems consistent with the time being set to a fixed precision, I think the changes to the Zha models might be worth some extra consideration. I didn't see the same pattern of fixed precision in the Walk model.

JostMigenda commented 1 year ago

@evanoconnor, can you weigh in regarding the Zha_2021 model?

evanoconnor commented 1 year ago

I had a look. Most of these do indeed look like fixed precision. Near the end of the simulations the time step decreases to slightly below the output precision and once every 10 steps it seems to double the step.

Given the large number of points and the very small dt's here, the suggested change is perfectly fine.

There is just one interesting case which is the s18.dat where this only occurs once, it looks like there it may have been a restart stitching issue, but again, fine to just remove the offending lines.