Refactor precomps
In order to make merging some super duper dev branches less painful, this moves precomp_quantum
and precomp_suspension
into noises.quantum
and suspension
since that has been done on some of those branches.
Merge request reports
Activity
mentioned in merge request !153 (merged)
assigned to @christopher.wipf
mentioned in merge request !151 (merged)
10 10 from .. import logger 11 11 from .. import const 12 12 from ..struct import Struct 13 from .. import nb 14 from .. import suspension 15 16 17 @nb.precomp(sustf=suspension.precomp_suspension) 18 def precomp_quantum(f, ifo, sustf): 19 from ..ifo import noises Hmm, I don't remember but I think so. I just checked this out again and if I move
from ..ifo.noises import ifo_power
outside the function I get the error
ImportError: cannot import name 'ifo_power' from partially initialized module 'gwinc.ifo.noises' (most likely due to a circular import)
I have been wanting to move
ifo_power
into another file for awhile anyway (!139 for example).
It looks like this MR and !153 (merged) together result in pretty much eliminating
ifo.noises
, in favor of commingling IFO configuration details with noise source functions. Why is that desirable?I think one reason they had been kept separate was to delineate what would have to be changed when using the noise sources with an alternate configuration.
I think
ifo.noises
was getting pretty unwieldy with all of the noise sub-budgets we've added since it was created. And it seems logical to keep thenb.Noise
's separated and with the functions they call. The sub-budgets for suspension thermal and residual gas will get a little better with the constructors from !153 (merged), but all of the noises and various pre-packaged sub-budgets in superQK, for example, won't benefit from constructors.It's true that this with !153 (merged) would get rid of everything except calibrations and the
arm_cavity
andifo_power
functions. Making a separate calibrations file seems like a fine idea. And putting functions likearm_cavity
andifo_power
(which may become precomps? !138) in another location (!139) could also be fine.I don't have strong opinions about that though. Mainly
ifo.noises
is unwieldy and it seems logical to keep thenb.Noise
's with the noise functions they call. @lee-mcculler started this refactoring with the quantum noises, so maybe he has other reasons.
added 18 commits
-
cb22f8e3...8356c3d9 - 16 commits from branch
gwinc:master
- fe37ee6f - move quantum and suspension precomps into noises.quantum and suspension
- 57551e7e - add test_results to gitignore
-
cb22f8e3...8356c3d9 - 16 commits from branch
mentioned in commit 9716c243