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

Add rate computation without GLOBES #172

Closed soso128 closed 2 years ago

soso128 commented 2 years ago

Since someone in my group didn't want to install GLoBES, I modified the Snowglobes interface to allow to compute the expected rates using only the SNOwGLoBES detector configurations and cross-sections. Here, the rates are computed for a perfect detector (no smearing, 100% efficiencies). I added options in snowglobles.simulate and snowglobes.collate in order to choose to compute this rate if needed. Running this code for IceCUBE and for the Nakazato 2013 model with 30 bins (default options in scripts/TimeSeries.py), I found that the discrepancies between the new and old unsmeared rates were of at most 0.4%.

soso128 commented 2 years ago

Hi, thank you for the suggestion! I now implemented a separate class with its own run function.

soso128 commented 2 years ago

I have put the "self.efficiency=self.sng.efficiencies[self.detector]" line back and moved the docstring

Sheshuk commented 2 years ago

Oops, I overlooked that Runner.smearing is still missing...

soso128 commented 2 years ago

Oops, sorry, I have just put it back

Sheshuk commented 2 years ago

Too late - I already merged it :( Created #174 with a hotfix

soso128 commented 2 years ago

Ok, thanks a lot and sorry for the mistake!