This page outlines how finesse and pygwinc might be used together.
pygwinc no longer makes assumptions about the interferometer topology, and the transfer functions between noise sources and readout. This allows pygwinc to be used as a generic noise budgeting tool. This also allows for using other tools like finesse for generating transfer functions.
In this page we sketch out a toy "optimization" loop using pygwinc and finesse in concert, as a strawman for a useful interaction between the two packages.
The outline goes something like the following:
- initialize pygwinc budget
- initialize finesse model
- link finesse and pygwinc parameters
- in loop:
- evaluate finesse model
- update pygwinc with newly evaluated finesse transfer functions
- evaluate pygwinc noise terms
- evaluate cost function and exit condition
- update parameters
This sketch shows how parameters might be linked between a finesse model and pygwinc budget. This assumes features that don't yet exist in finesse, in particular the referencing of external variables in a kat string, and the outputting of some sort of explicit transfer function from the execution of the model.
import gwinc import finesse Budget, ifo = gwinc.load_ifo('...') kat = finesse.parse(''' ... mirror m1 R @ifo.Optics.ETMY.R ... ''', ifo=ifo) budget = Budget(ifo=ifo) while True: out = kat.run(ifo=ifo) budget.update(ifo=ifo, model=out) psd = budget.calc() if exit_condition(psd): break ifo.Optics.ETMY.R = ...