Skip to content
Snippets Groups Projects

Refactor precomps

Merged Kevin Kuns requested to merge kevin.kuns/pygwinc:refactor-precomps into master
2 unresolved threads

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

Merge request pipeline #482895 passed

Merge request pipeline passed for 57551e7e

Approved by

All merge request dependencies have been merged (1 merged)

Merged by Kevin KunsKevin Kuns 2 years ago (Dec 11, 2022 6:43pm UTC)

Merge details

  • Changes merged into master with 9716c243.
  • Did not delete the source branch.

Pipeline #482896 passed

Pipeline passed for 9716c243 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • Is this a trick to avoid circular import?

  • Author Maintainer

    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).

  • Please register or sign in to reply
    • 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.

    • Author Maintainer

      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 the nb.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 and ifo_power functions. Making a separate calibrations file seems like a fine idea. And putting functions like arm_cavity and ifo_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 the nb.Noise's with the noise functions they call. @lee-mcculler started this refactoring with the quantum noises, so maybe he has other reasons.

    • Please register or sign in to reply
  • Kevin Kuns added 18 commits

    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

    Compare with previous version

  • Kevin Kuns approved this merge request

    approved this merge request

  • Kevin Kuns mentioned in commit 9716c243

    mentioned in commit 9716c243

  • merged

  • Please register or sign in to reply
    Loading