precomp decorator support
- Oct 08, 2020
-
-
Jameson Rollins authored
This is some cleanup and simplification of Lee's mapped precomp series.
-
Lee McCuller authored
-
Lee McCuller authored
-
Lee McCuller authored
-
Jameson Rollins authored
cache the load status
-
Jameson Rollins authored
Add a Struct.hash() method to return a unique hash over attributes. Modify Noise.run() method to check for changes to the ifo and only run the update method if the ifo has changed or other kwargs are supplied.
-
Jameson Rollins authored
nb.precomp decorator can be used to wrap BudgetItem.calc methods with functions that only need to be called once per budget run. nb.precomp(precomp_foo) def calc(self): ... Precomp functions are all executed by the update() method (after attribute update), and execution state is cached at the Budget level, to prevent re-calculating the same functions multiple times per update. The BudgetItem.update() method is no longer expected to be overloaded by the user. This provides a speed-up of about 50% for the Aplus model, but much less for the CE models which are limited by other noise calculations.
-