Conversation
Re-write of generate function
Add self.filename = os.path.basename(filename) to constructors
Add
self.filename = os.path.basename(filename)
to constructors
The integration tests etc. and notebooks were giving me a lot of errors. I ended up having to touch a lot of files for small little edits.
Fair point. In the new version I retained the old *generate_ ** functions with an added warning that they are deprecated. One minor thing to note is that the new generate function does not integrate over the energy bins as the older *generate_ ** functions used to. In practice this should not cause a problem: the Container has a method called integrate_or_sum which will undertake the appropriate action for the circumstances, and by avoiding the energy bin integration in generate, the spectral fluences can be re-sampled by e,g, the RateCalculator if needed.
The old versions of simulate and collate are also retained. The new function to replace them is called calculate and a) combines the effect of simulate and collate and b) returns Container objects. In a separate PR, I added a collate function to rate_calculator.py which might be useful.
I am open to having calculate add another level to the nested dictionary of event rate tables it returns, but is this really useful? |
|
I am going to keep this branch for reference but I am leaning more and more towards ditching this effort. If #445 is accepted, everything we need to easily replace the snowglobes module is available. |
Uh oh!
There was an error while loading. Please reload this page.