SNEWS2 / sntools

Event generator for supernova burst neutrinos
BSD 3-Clause "New" or "Revised" License
11 stars 11 forks source link

No module named 'snewpy.models.loaders' #55

Closed Papetitje closed 5 months ago

Papetitje commented 5 months ago

Dear Jost,

I've noticed a minor typo in the sntools/format/init.py file that affects compatibility with the latest version of snewpy. Specifically, at line 165, the correct code should be:

sn_model = getattr(import_module('snewpy.models.ccsn_loaders'), format)(abspath(file))

Could you modify?

Best regards, Pierre-Alexandre

JostMigenda commented 5 months ago

Thanks for opening this issue! Yes, we renamed that file (loaders.pyccsn_loaders.py) as part of a recent PR that adds support for pre-SN neutrinos to SNEWPY; which will be part of an upcoming SNEWPY 2.0 release.

Unfortunately, while the change you suggest would continue to work as is, some more work is needed to ensure we can also use the new preSN models in sntools. I plan to work on this (and support for other improvements coming in SNEWPY 2.0) this summer, around the time the first beta version with those snewpy changes is released.

In the meantime, you could either use the latest SNEWPY release from PyPI or—if you’d like to use the bleeding-edge version from the GitHub main branch—make the suggested change in your local version of sntools for now. Does that work for you?

Papetitje commented 5 months ago

Hello, Yes I just modify locally and everything works fine for myself. I have not try for the Pre-SN neutrinos. Warm regards, Pierre-Alexandre