Skip to content

fixes to isolate the action of precomp.

Lee McCuller requested to merge lee-mcculler/pygwinc:precomp_fix into master

Ok, now for maybe a more controversial push.

this whole notion of mutating the "ifo" struct during construction of the noise curves is bad news, but rampant. The "gwinc" call makes a good first start by doing a deepcopy. It seems to me that this deepcopy should be the job of the first function to mutate ifo. In this case precompifo should do the copy.

Furthermore, the beginnings of the "gwinc" function are really additional precomputations, so they have been factored into precompifo.

the F_Hz array is placed in ifo at this point since it already contains dhdl and suspension information that has used F_Hz.

This way future calls can have a simplified API that only needs ifo in the same way that dhdl is given this status.

Really I'm doing this so that optimizer work that wants to work on individual curves within the gwinc call can be made in a more sane fashion.

As a side note to the merge. there should be some other mechanism for this mutation of ifo. It will probably be fixed if we switch to an object-oriented approach to the noise curves. In that, precomputations can be provided by @property methods and memoized within them... Anyway this merge is an incremental palliative.

Merge request reports