diff --git a/gwinc/ifo/noises.py b/gwinc/ifo/noises.py index 94b8944de9285c6487eaec01b1d3eab344534b5a..962c780a565c807a63edbb7b4668813e695cef13 100644 --- a/gwinc/ifo/noises.py +++ b/gwinc/ifo/noises.py @@ -166,6 +166,12 @@ def precomp_suspension(f, ifo): return pc + +def precomp_quantum(f, ifo): + noise_dict = noise.quantum.shotrad(f, ifo) + ifo.gwinc.quantum = noise_dict + + ################################################## ############################################################ @@ -236,11 +242,14 @@ class QuantumVacuumAS(nb.Noise): color='xkcd:emerald green' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) - noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - return noise_dict['asvac'] + return self.ifo.gwinc.quantum['asvac'] class QuantumVacuumArm(nb.Noise): @@ -252,11 +261,14 @@ class QuantumVacuumArm(nb.Noise): color='xkcd:orange brown' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) - noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - return noise_dict['arm'] + return self.ifo.gwinc.quantum['arm'] class QuantumVacuumSRC(nb.Noise): @@ -268,11 +280,15 @@ class QuantumVacuumSRC(nb.Noise): color='xkcd:cerulean' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - return noise_dict['src'] + return self.ifo.gwinc.quantum['src'] class QuantumVacuumFilterCavity(nb.Noise): @@ -284,11 +300,15 @@ class QuantumVacuumFilterCavity(nb.Noise): color='xkcd:goldenrod' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) - noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - # FC0 are the noises from the filter cavity losses and F0_unsqzd_back + noise_dict = self.ifo.gwinc.quantum + # FC0 are the noises from the filter cavity losses and FC0_unsqzd_back # are noises from the unsqueezed vacuum injected at the back mirror # Right now there are at most one filter cavity in all the models; # if there were two, there would also be FC1 and FC1_unsqzd_back, etc. @@ -305,11 +325,14 @@ class QuantumVacuumInjection(nb.Noise): color='xkcd:fuchsia' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) - noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - return noise_dict['injection'] + return self.ifo.gwinc.quantum['injection'] class QuantumVacuumReadout(nb.Noise): @@ -321,11 +344,14 @@ class QuantumVacuumReadout(nb.Noise): color='xkcd:mahogany' ) + precomp = [ + precomp_mirror, + precomp_power, + precomp_quantum + ] + def calc(self): - precomp_mirror(self.freq, self.ifo) - precomp_gwinc(self.freq, self.ifo) - noise_dict = noise.quantum.shotrad(self.freq, self.ifo) - return noise_dict['pd'] + return self.ifo.gwinc.quantum['pd'] class StandardQuantumLimit(nb.Noise):