add the ability to reassemble live calculated TimeChunked quantities
Changes to LiveProperty and the reassemble functions to allow the reassembly of a live calculated TimeChunked property. Generally, this would be some function that manipulates already existing time chunked data such as SFR or SMBH accretion histories.
Also, in order to make things a bit more general, config.py does not automatically attempt to load nbodyshop properties but now only looks to the property modules defined by the environment variable. This change comes as I've had issues with this when attempting to load multiple external property modules. This also seems better as the code is now public and shouldn't be assuming anything about property modules the user wishes to load.
@apontzen I thought I'd give this a bump and put this on your radar to check out when you have the chance!
Yes it's on my radar... I have not quite got my head around the changes yet
I still haven't quite figured out what this does. Could you add an example somewhere in the documentation and preferably also a test? This way it will be clear!
I've added documentation, tests, and a new property to calculate specific star formation rate given SFR_histogram as a simple example. I realize this isn't 100% the best example, since the value makes little sense for reassembling with the "sum" option... Still it is a simple example that provides an easy to understand illustration of why you might want to do something like this. If I'm honest, my main goal is to connect histograms from linked objects (like black holes) to their host halo into a single histogram quantity tracked along the galaxy's main progenitor branch.. I just fear that trying to explain this might muddle things for the doc. Open to suggestions on this, of course!
Thanks. This still seems quite complicated :-) but now there are some unit tests so I am going to have a play to see if I can understand why it is complicated and whether there might be a simpler way to implement the same functionality.
I've updated the LiveCalculation class, changing how evaluation is changed when reassemble is needed or not. Basically, now a flag is set within the LiveProperty class that determines whether reassemble will be used or not. Initialization of this happens in builtin_functions/reassembly.py using set_reassemble() or set_raw() (default is to do a raw calculation without reassemble).
Hi @apontzen just wanted to ping you here. I've implemented tests as well as cleaned up the code considerably. I realize this has been drawn out in time, so I understand if it takes a while to parse things. Most recently, I have made the branch up-to-date with master and ensured that all tests pass by fixing a bug in the previous version which made normal reassembled properties fail.
Thanks Michael - I've got some comments in there which I think should be looked at. They are mainly old comments but I'm not sure they were ever addressed? Specifically, we seem to be coupling modules together in a way they weren't previously, which makes me nervous.