Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wenxuan.jia/pygwinc
  • sean-leavey/pygwinc
  • sebastian.steinlechner/pygwinc
  • nicholas.demos/pygwinc
  • chris.whittle/pygwinc
  • raymond.robie/pygwinc
  • mateusz.bawaj/pygwinc
  • anchal.gupta/pygwinc
  • 40m/pygwinc
  • evan.hall/pygwinc
  • kevin.kuns/pygwinc
  • geoffrey-lovelace/pygwinc
  • brittany.kamai/pygwinc
  • daniel-brown/pygwinc
  • lee-mcculler/pygwinc
  • jameson.rollins/pygwinc
  • gwinc/pygwinc
17 results
Show changes
Commits on Source (16)
......@@ -296,21 +296,27 @@ def compare_noise(pprint):
passed = []
failed = []
skipped = []
for ref_trace in ref_traces:
if np.all(ref_trace.psd < psd_tol):
skipped.append(ref_trace.name)
continue
try:
trace = traces[ref_trace.name]
except KeyError:
skipped.append(ref_trace.name)
continue
if np.allclose(trace.psd, ref_trace.psd, atol=0):
passed.append(trace.name)
if ref_traces.budget:
for ref_trace in ref_traces:
if np.all(ref_trace.psd < psd_tol):
skipped.append(ref_trace.name)
continue
try:
trace = traces[ref_trace.name]
except KeyError:
skipped.append(ref_trace.name)
continue
if np.allclose(trace.psd, ref_trace.psd, atol=0):
passed.append(trace.name)
else:
failed.append(trace.name)
else:
if np.allclose(ref_traces.psd, traces.psd, atol=0):
passed.append(traces.name)
else:
failed.append(trace.name)
failed.append(traces.name)
pprint('Noises failed:')
pprint(40 * '-')
......
......@@ -44,8 +44,8 @@ def freq_from_spec(spec=None):
return spec
elif spec is None:
spec = DEFAULT_FREQ
fspec = spec.split(':')
try:
fspec = spec.split(':')
if len(fspec) == 2:
fspec = fspec[0], DEFAULT_FREQ.split(':')[1], fspec[1]
return np.logspace(
......@@ -53,7 +53,7 @@ def freq_from_spec(spec=None):
np.log10(float(fspec[2])),
int(fspec[1]),
)
except (ValueError, IndexError):
except (ValueError, IndexError, AttributeError):
raise InvalidFrequencySpec(f'Improper frequency specification: {spec}')
......@@ -125,22 +125,34 @@ def load_budget(name_or_path, freq=None, bname=None):
if inherit_ifo is not None:
del ifo['+inherit']
# make the inherited path relative to the loaded path
# if it is a yml file
if os.path.splitext(inherit_ifo)[1] in Struct.STRUCT_EXT:
base = os.path.split(path)[0]
inherit_ifo = os.path.join(base, inherit_ifo)
# if it is a yml file or a directory
head = os.path.split(path)[0]
rel_path = os.path.join(head, inherit_ifo)
if os.path.splitext(inherit_ifo)[1] in Struct.STRUCT_EXT or os.path.exists(rel_path):
inherit_ifo = rel_path
inherit_budget = load_budget(inherit_ifo, freq=freq, bname=bname)
pre_ifo = inherit_budget.ifo
pre_ifo.update(ifo, overwrite_atoms=False)
pre_ifo.update(
ifo,
overwrite_atoms=False,
clear_test=lambda v: isinstance(v, str) and v == '<unset>'
)
inherit_budget.update(ifo=pre_ifo)
return inherit_budget
else:
modname = 'gwinc.ifo.aLIGO'
else:
bname = bname or 'aLIGO'
elif ext == '':
bname = bname or base
modname = path
else:
raise RuntimeError(
"Unknown file type: {} (supported types: {}).".format(
ext, Struct.STRUCT_EXT))
else:
if name_or_path not in IFOS:
raise RuntimeError("Unknown IFO '{}' (available IFOs: {}).".format(
......@@ -154,7 +166,7 @@ def load_budget(name_or_path, freq=None, bname=None):
mod, modpath = load_module(modname)
Budget = getattr(mod, bname)
if freq is None:
freq = getattr(Budget, 'freq', None)
freq = getattr(Budget, '_freq', None)
freq = freq_from_spec(freq)
ifopath = os.path.join(modpath, 'ifo.yaml')
if not ifo and os.path.exists(ifopath):
......
......@@ -370,9 +370,9 @@ Squeezer:
# Parameters for frequency dependent squeezing
FilterCavity:
fdetune: -25 # detuning [Hz] zz['x'][0][1]
fdetune: -27.3 # detuning [Hz] zz['x'][0][1]
L: 300 # cavity length [m]
Ti: 6.15e-4 # input mirror transmission [Power] zz['x'][0][2]
Ti: 6.88e-4 # input mirror transmission [Power] zz['x'][0][2]
Te: 0e-6 # end mirror transmission
Lrt: 10e-6 # round-trip loss in the cavity
Rot: 0 # phase rotation after cavity
......
......@@ -139,9 +139,8 @@ class BudgetItem:
variables to the initialized object.
"""
if freq is not None:
assert isinstance(freq, np.ndarray)
self.freq = freq
assert isinstance(freq, np.ndarray) or freq is None
self._freq = freq
self.ifo = None
for key, val in kwargs.items():
setattr(self, key, val)
......@@ -153,6 +152,20 @@ class BudgetItem:
""""Name of this BudgetItem class."""
return self.__class__.__name__
@property
def freq(self):
"""Frequency array [Hz]"""
return self._freq
@freq.setter
def freq(self, val):
assert isinstance(val, np.ndarray)
# clear the precomp cache
self._precomp = dict()
# use update instead of setting _freq directly so that Budget.update
# recurses through all cal_objs and noise_objs
self.update(_freq=val)
def __str__(self):
# FIXME: provide info on internal state (load/update/calc/etc.)
return '<{} {}>'.format(
......@@ -353,7 +366,7 @@ class Budget(Noise):
if freq is not None:
self.kwargs['freq'] = freq
else:
self.kwargs['freq'] = getattr(self, 'freq', None)
self.kwargs['freq'] = getattr(self, '_freq', None)
# FIXME: special casing the ifo kwarg here, in case it's
# defined as a class attribute rather than passed at
# initialization. we do this because we're not defining a
......@@ -498,7 +511,7 @@ class Budget(Noise):
logger.debug("load {}".format(item))
item.load()
def update(self, _precomp=None, **kwargs):
def update(self, **kwargs):
"""Recursively update all noise and cal objects with supplied kwargs.
See BudgetItem.update() for more info.
......
......@@ -12,13 +12,6 @@ from .. import const
from ..struct import Struct
def sqzOptimalSqueezeAngle(Mifo, eta):
vHD = np.array([[sin(eta), cos(eta)]])
H = getProdTF(vHD, Mifo)[0]
alpha = arctan(abs(H[1]), abs(H[0]))
return alpha
def getSqzParams(ifo):
"""Determine squeezer type, if any, and extract common parameters
......@@ -33,14 +26,16 @@ def getSqzParams(ifo):
params = Struct()
if 'Squeezer' not in ifo:
sqzType = None
sqzType = 'None'
elif ifo.Squeezer.AmplitudedB == 0:
sqzType = 'None'
else:
sqzType = ifo.Squeezer.get('Type', 'Freq Independent')
params.sqzType = sqzType
# extract squeezer parameters
if sqzType is None:
if sqzType == 'None':
params.SQZ_DB = 0
params.ANTISQZ_DB = 0
params.alpha = 0
......
......@@ -66,3 +66,39 @@ def test_change_ifo_struct():
assert np.all(
tr2.Seismic.SeismicVertical.asd == 2*tr1.Seismic.SeismicVertical.asd)
@pytest.mark.logic
@pytest.mark.fast
def test_update_freq():
"""
Test three methods of updating a Budget frequency
"""
freq1 = np.logspace(1, 3, 10)
freq2 = np.logspace(0.8, 3.5, 11)
freq3 = np.logspace(0.5, 3.6, 12)
budget = gwinc.load_budget('Aplus', freq=freq1)
traces1 = budget.run()
traces2 = budget.run(freq=freq2)
budget.freq = freq3
traces3 = budget.run()
assert np.all(traces1.freq == freq1)
assert np.all(traces2.freq == freq2)
assert np.all(traces3.freq == freq3)
@pytest.mark.logic
@pytest.mark.fast
def test_freq_spec_error():
"""
Test that three methods of setting Budget frequencies raise errors
"""
freq = [1, 2, 3]
with pytest.raises(gwinc.InvalidFrequencySpec):
budget = gwinc.load_budget('Aplus', freq=freq)
with pytest.raises(AssertionError):
budget = gwinc.load_budget('Aplus')
traces = budget.run(freq=freq)
with pytest.raises(AssertionError):
budget = gwinc.load_budget('Aplus')
budget.freq = freq
+inherit: 'Aplus'
# test that unset removes struct entries
Optics:
Quadrature: <unset>
\ No newline at end of file
ifos can't be specified by a txt file, so load_budget should fail when trying to load this.
# GWINC aLIGO interferometer parameters
#
# parameters for quad pendulum suspension updated 3rd May 2006, NAR
# References:
# LIGO-T000012-00-D
# * Differentiate between silica and sapphire substrate absorption
# * Change ribbon suspension aspect ratio
# * Change pendulum frequency
# References:
# 1. Electro-Optic Handbook, Waynant & Ediger (McGraw-Hill: 1993)
# 2. LIGO/GEO data/experience
# 3. Suspension reference design, LIGO-T000012-00
# 4. Quartz Glass for Optics Data and Properties, Heraeus data sheet,
# numbers for suprasil
# 5. Y.S. Touloukian (ed), Thermophysical Properties of Matter
# (IFI/Plenum,1970)
# 6. Marvin J. Weber (ed) CRC Handbook of laser science and technology,
# Vol 4, Pt 2
# 7. R.S. Krishnan et al.,Thermal Expansion of Crystals, Pergamon Press
# 8. P. Klocek, Handbook of infrared and optical materials, Marcel Decker,
# 1991
# 9. Rai Weiss, electronic log from 5/10/2006
# 10. Wikipedia online encyclopedia, 2006
# 11. D.K. Davies, The Generation and Dissipation of Static Charge on
# dielectrics in a Vacuum, page 29
# 12. Gretarsson & Harry, Gretarsson thesis
# 13. Fejer
# 14. Braginsky
#
# Updated numbers March 2018: LIGO-T1800044
Infrastructure:
Length: 3995 # m
Temp: 290 # K
ResidualGas:
H2:
BeamtubePressure: 2.7e-7 # Pa
ChamberPressure: 2.7e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.8e-31 # m^3
N2:
BeamtubePressure: 1.33e-8
ChamberPressure: 1.33e-8
mass: 4.65e-26
polarizability: 1.71e-30
H2O:
BeamtubePressure: 1.33e-8
ChamberPressure: 1.33e-8
mass: 2.99e-26
polarizability: 1.50e-30
O2:
BeamtubePressure: 1e-9
ChamberPressure: 1e-9
mass: 5.31e-26
polarizability: 1.56e-30
TCS:
# The presumably dominant effect of a thermal lens in the ITMs is an increased
# mode mismatch into the SRC, and thus an increased effective loss of the SRC.
# The increase is estimated by calculating the round-trip loss S in the SRC as
# 1-S = |<Psi|exp(i*phi)|Psi>|^2, where
# |Psi> is the beam hitting the ITM and
# phi = P_coat*phi_coat + P_subs*phi_subs
# with phi_coat & phi_subs the specific lensing profiles
# and P_coat & P_subst the power absorbed in coating and substrate
#
# This expression can be expanded to 2nd order and is given by
# S= s_cc P_coat^2 + 2*s_cs*P_coat*P_subst + s_ss*P_subst^2
# s_cc, s_cs and s_ss were calculated analytically by Phil Willems (4/2007)
s_cc: 7.024 # Watt^-2
s_cs: 7.321 # Watt^-2
s_ss: 7.631 # Watt^-2
# The hardest part to model is how efficient the TCS system is in
# compensating this loss. Thus as a simple Ansatz we define the
# TCS efficiency TCSeff as the reduction in effective power that produces
# a phase distortion. E.g. TCSeff=0.99 means that the compensated distortion
# of 1 Watt absorbed is equivalent to the uncompensated distortion of 10mWatt.
# The above formula thus becomes:
# S= s_cc P_coat^2 + 2*s_cs*P_coat*P_subst + s_ss*P_subst^2 * (1-TCSeff)^2
#
# To avoid iterative calculation we define TCS.SCRloss = S as an input
# and calculate TCSeff as an output.
# TCS.SRCloss is incorporated as an additional loss in the SRC
SRCloss: 0.00
Seismic:
Site: 'LHO' # LHO or LLO (only used for Newtonian noise)
# darmSeiSusFile: 'seismic.mat' # .mat file containing predictions for darm displacement
KneeFrequency: 10 # Hz; freq where 'flat' noise rolls off
LowFrequencyLevel: 1e-9 # m/rtHz; seismic noise level below f_knee
Gamma: 0.8 # abruptness of change at f_knee
Rho: 1.8e3 # kg/m^3; density of the ground nearby
Beta: 0.8 # quiet times beta: 0.35-0.60
# noisy times beta: 0.15-1.4
Omicron: 1 # Feedforward cancellation factor
TestMassHeight: 1.5 # m
RayleighWaveSpeed: 250 # m/s
Suspension:
Type: 'Quad'
FiberType: 'Tapered'
BreakStress: 750e6 # Pa; ref. K. Strain
Temp: 290
# VHCoupling:
# theta: 1e-3 # vertical-horizontal x-coupling (computed in precompIFO)
Silica:
Rho : 2.2e3 # Kg/m^3;
C : 772 # J/Kg/K;
K : 1.38 # W/m/kg;
Alpha : 3.9e-7 # 1/K;
dlnEdT: 1.52e-4 # (1/K), dlnE/dT
Phi : 4.1e-10 # from G Harry e-mail to NAR 27April06 dimensionless units
Y : 7.2e10 # Pa; Youngs Modulus
Dissdepth: 1.5e-2 # from G Harry e-mail to NAR 27April06
C70Steel:
Rho: 7800
C: 486
K: 49
Alpha: 12e-6
dlnEdT: -2.5e-4
Phi: 2e-4
Y: 212e9 # measured by MB for one set of wires
MaragingSteel:
Rho: 7800
C: 460
K: 20
Alpha: 11e-6
dlnEdT: 0
Phi: 1e-4
Y: 187e9
# ref http://www.ioffe.ru/SVA/NSM/Semicond/Si/index.html
# all properties should be for T ~ 120 K
Silicon:
Rho: 2329 # Kg/m^3; density
C: 300 # J/kg/K heat capacity
K: 700 # W/m/K thermal conductivity
Alpha: 1e-10 # 1/K thermal expansion coeff
# from Gysin, et. al. PRB (2004) E(T): E0 - B*T*exp(-T0/T)
# E0: 167.5e9 Pa T0: 317 K B: 15.8e6 Pa/K
dlnEdT: -2e-5 # (1/K) dlnE/dT T=120K
Phi: 2e-9 # Nawrodt (2010) loss angle 1/Q
Y: 155.8e9 # Pa Youngs Modulus
Dissdepth: 1.5e-3 # 10x smaller surface loss depth (Nawrodt (2010))
# Note stage numbering: mirror is at beginning of stack, not end
#
# last stage length adjusted for d: 10mm and and d_bend = 4mm
# (since 602mm is the CoM separation, and d_bend is accounted for
# in suspQuad, so including it here would double count)
Stage:
# Stage1
- Mass: 39.6 # kg; current numbers May 2006 NAR
# length adjusted for d = 10mm and d_bend = 4mm
# (since 602mm is the CoM separation, and d_bend is accounted for
# in suspQuad, so including it here would double count)
Length: 0.59 # m
Dilution: .nan #
K: .nan # N/m; vertical spring constant
WireRadius: .nan # m
Blade: .nan # blade thickness
NWires: 4
# Stage2
- Mass: 39.6
Length: 0.341
Dilution: 106
K: 5200
WireRadius: 310e-6
Blade: 4200e-6
NWires: 4
# Stage3
- Mass: 21.8
Length: 0.277
Dilution: 80
K: 3900
WireRadius: 350e-6
Blade: 4600e-6
NWires: 4
# Stage4
- Mass: 22.1
Length: 0.416
Dilution: 87
K: 3400
WireRadius: 520e-6
Blade: 4300e-6
NWires: 2
Ribbon:
Thickness: 115e-6 # m
Width: 1150e-6 # m
Fiber:
Radius: 205e-6 # m
# for tapered fibers
# EndRadius is tuned to cancel thermo-elastic noise (delta_h in suspQuad)
# EndLength is tuned to match bounce mode frequency
EndRadius: 400e-6 # m; nominal 400um
EndLength: 45e-3 # m; nominal 20mm
## Optic Material -------------------------------------------------------
Materials:
MassRadius: 0.17 # m;
MassThickness: 0.200 # m; Peter F 8/11/2005
## Dielectric coating material parameters----------------------------------
Coating:
## high index material: tantala
Yhighn: 120e9 # Ta2O5-TiO2 from 2020 LMA https://iopscience.iop.org/article/10.1088/1361-6382/ab77e9
Sigmahighn: 0.29 # 2020 LMA
CVhighn: 2.1e6 # Crooks et al, Fejer et al
Alphahighn: 3.6e-6 # 3.6e-6 Fejer et al, 5e-6 from Braginsky
Betahighn: 1.4e-5 # dn/dT, value Gretarrson (G070161)
ThermalDiffusivityhighn: 33 # Fejer et al
Indexhighn: 2.09 # 2020 LMA
Phihighn: 3.89e-4 # loss angle at 100Hz (Gras 2020)
Phihighn_slope: 0.1
## low index material: silica
Ylown: 70e9 # 2020 LMA
Sigmalown: 0.19 # 2020 LMA
CVlown: 1.6412e6 # Crooks et al, Fejer et al
Alphalown: 5.1e-7 # Fejer et al
Betalown: 8e-6 # dn/dT, (ref. 14)
ThermalDiffusivitylown: 1.38 # Fejer et al
Indexlown: 1.45
Philown: 2.3e-5 # loss angle at 100Hz 2020 LMA
Philown_slope: 0 # G1600641 and arXiv:1712.05701 suggest
# slopes between 0 and 0.3, depending on
# deposition method. Slawek's analysis in
# 10.1103/PhysRevD.98.122001 assumes zero slope.
## Substrate Material parameters--------------------------------------------
Substrate:
Temp: 295
c2 : 7.6e-12 # Coeff of freq depend. term for bulk mechanical loss, 7.15e-12 for Sup2
MechanicalLossExponent: 0.77 # Exponent for freq dependence of silica loss, 0.822 for Sup2
Alphas: 5.2e-12 # Surface loss limit (ref. 12)
MirrorY: 7.27e10 # N/m^2; Youngs modulus (ref. 4)
MirrorSigma: 0.167 # Kg/m^3; Poisson ratio (ref. 4)
MassDensity: 2.2e3 # Kg/m^3; (ref. 4)
MassAlpha: 3.9e-7 # 1/K; thermal expansion coeff. (ref. 4)
MassCM: 739 # J/Kg/K; specific heat (ref. 4)
MassKappa: 1.38 # J/m/s/K; thermal conductivity (ref. 4)
RefractiveIndex: 1.45 # mevans 25 Apr 2008
## Laser-------------------------------------------------------------------
Laser:
Wavelength: 1.064e-6 # m
Power: 125 # W
## Optics------------------------------------------------------------------
Optics:
Type: 'SignalRecycled'
PhotoDetectorEfficiency: 0.9 # photo-detector quantum efficiency
Loss: 37.5e-6 # average per mirror power loss
BSLoss: 0.5e-3 # power loss near beamsplitter
coupling: 1.0 # mismatch btwn arms & SRC modes; used to
# calculate an effective r_srm
SubstrateAbsorption: 0.5e-4 # 1/m; bulk absorption coef (ref. 2)
pcrit: 10 # W; tolerable heating power (factor 1 ATC)
Quadrature:
dc: 1.5707963 # pi/2 # demod/detection/homodyne phase
ITM:
Transmittance: 0.014
CoatingThicknessLown: 0.308
CoatingThicknessCap: 0.5
CoatingAbsorption: 0.5e-6
ETM:
Transmittance: 5e-6
CoatingThicknessLown: 0.27
CoatingThicknessCap: 0.5
PRM:
Transmittance: 0.03
SRM:
Transmittance: 0.325
CavityLength: 55 # m, ITM to SRM distance
Tunephase: 0.0 # SEC tuning
Curvature: # RoCs per E080511, E080512
ITM: 1934
ETM: 2245
Squeezer:
AmplitudedB: 12
FilterCavity:
L: 300
from gwinc.ifo.noises import *
from gwinc.ifo import PLOT_STYLE
class QuantumVacuum(nb.Budget):
"""Quantum Vacuum
"""
style = dict(
label='Quantum Vacuum',
color='#ad03de',
)
noises = [
QuantumVacuumAS,
QuantumVacuumArm,
QuantumVacuumSEC,
QuantumVacuumFilterCavity,
QuantumVacuumInjection,
QuantumVacuumReadout,
QuantumVacuumQuadraturePhase,
]
class CustomBudget(nb.Budget):
name = 'A custom budget'
noises = [
QuantumVacuum,
Seismic,
]
calibrations = [
Strain,
]
plot_style = PLOT_STYLE
# GWINC aLIGO interferometer parameters
#
# parameters for quad pendulum suspension updated 3rd May 2006, NAR
# References:
# LIGO-T000012-00-D
# * Differentiate between silica and sapphire substrate absorption
# * Change ribbon suspension aspect ratio
# * Change pendulum frequency
# References:
# 1. Electro-Optic Handbook, Waynant & Ediger (McGraw-Hill: 1993)
# 2. LIGO/GEO data/experience
# 3. Suspension reference design, LIGO-T000012-00
# 4. Quartz Glass for Optics Data and Properties, Heraeus data sheet,
# numbers for suprasil
# 5. Y.S. Touloukian (ed), Thermophysical Properties of Matter
# (IFI/Plenum,1970)
# 6. Marvin J. Weber (ed) CRC Handbook of laser science and technology,
# Vol 4, Pt 2
# 7. R.S. Krishnan et al.,Thermal Expansion of Crystals, Pergamon Press
# 8. P. Klocek, Handbook of infrared and optical materials, Marcel Decker,
# 1991
# 9. Rai Weiss, electronic log from 5/10/2006
# 10. Wikipedia online encyclopedia, 2006
# 11. D.K. Davies, The Generation and Dissipation of Static Charge on
# dielectrics in a Vacuum, page 29
# 12. Gretarsson & Harry, Gretarsson thesis
# 13. Fejer
# 14. Braginsky
#
# Updated numbers March 2018: LIGO-T1800044
Infrastructure:
Length: 3995 # m
Temp: 290 # K
ResidualGas:
H2:
BeamtubePressure: 2.7e-7 # Pa
ChamberPressure: 2.7e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.8e-31 # m^3
N2:
BeamtubePressure: 1.33e-8
ChamberPressure: 1.33e-8
mass: 4.65e-26
polarizability: 1.71e-30
H2O:
BeamtubePressure: 1.33e-8
ChamberPressure: 1.33e-8
mass: 2.99e-26
polarizability: 1.50e-30
O2:
BeamtubePressure: 1e-9
ChamberPressure: 1e-9
mass: 5.31e-26
polarizability: 1.56e-30
TCS:
# The presumably dominant effect of a thermal lens in the ITMs is an increased
# mode mismatch into the SRC, and thus an increased effective loss of the SRC.
# The increase is estimated by calculating the round-trip loss S in the SRC as
# 1-S = |<Psi|exp(i*phi)|Psi>|^2, where
# |Psi> is the beam hitting the ITM and
# phi = P_coat*phi_coat + P_subs*phi_subs
# with phi_coat & phi_subs the specific lensing profiles
# and P_coat & P_subst the power absorbed in coating and substrate
#
# This expression can be expanded to 2nd order and is given by
# S= s_cc P_coat^2 + 2*s_cs*P_coat*P_subst + s_ss*P_subst^2
# s_cc, s_cs and s_ss were calculated analytically by Phil Willems (4/2007)
s_cc: 7.024 # Watt^-2
s_cs: 7.321 # Watt^-2
s_ss: 7.631 # Watt^-2
# The hardest part to model is how efficient the TCS system is in
# compensating this loss. Thus as a simple Ansatz we define the
# TCS efficiency TCSeff as the reduction in effective power that produces
# a phase distortion. E.g. TCSeff=0.99 means that the compensated distortion
# of 1 Watt absorbed is equivalent to the uncompensated distortion of 10mWatt.
# The above formula thus becomes:
# S= s_cc P_coat^2 + 2*s_cs*P_coat*P_subst + s_ss*P_subst^2 * (1-TCSeff)^2
#
# To avoid iterative calculation we define TCS.SCRloss = S as an input
# and calculate TCSeff as an output.
# TCS.SRCloss is incorporated as an additional loss in the SRC
SRCloss: 0.00
Seismic:
Site: 'LHO' # LHO or LLO (only used for Newtonian noise)
KneeFrequency: 10 # Hz; freq where 'flat' noise rolls off
LowFrequencyLevel: 1e-9 # m/rtHz; seismic noise level below f_knee
Gamma: 0.8 # abruptness of change at f_knee
Rho: 1.8e3 # kg/m^3; density of the ground nearby
Beta: 0.8 # quiet times beta: 0.35-0.60
# noisy times beta: 0.15-1.4
Omicron: 1 # Feedforward cancellation factor
TestMassHeight: 1.5 # m
RayleighWaveSpeed: 250 # m/s
Suspension:
Type: 'Quad'
FiberType: 'Tapered'
BreakStress: 750e6 # Pa; ref. K. Strain
Temp: 290
# VHCoupling:
# theta: 1e-3 # vertical-horizontal x-coupling (computed in precompIFO)
Silica:
Rho : 2.2e3 # Kg/m^3;
C : 772 # J/Kg/K;
K : 1.38 # W/m/kg;
Alpha : 3.9e-7 # 1/K;
dlnEdT: 1.52e-4 # (1/K), dlnE/dT
Phi : 4.1e-10 # from G Harry e-mail to NAR 27April06 dimensionless units
Y : 7.2e10 # Pa; Youngs Modulus
Dissdepth: 1.5e-2 # from G Harry e-mail to NAR 27April06
C70Steel:
Rho: 7800
C: 486
K: 49
Alpha: 12e-6
dlnEdT: -2.5e-4
Phi: 2e-4
Y: 212e9 # measured by MB for one set of wires
MaragingSteel:
Rho: 7800
C: 460
K: 20
Alpha: 11e-6
dlnEdT: 0
Phi: 1e-4
Y: 187e9
# ref http://www.ioffe.ru/SVA/NSM/Semicond/Si/index.html
# all properties should be for T ~ 120 K
Silicon:
Rho: 2329 # Kg/m^3; density
C: 300 # J/kg/K heat capacity
K: 700 # W/m/K thermal conductivity
Alpha: 1e-10 # 1/K thermal expansion coeff
# from Gysin, et. al. PRB (2004) E(T): E0 - B*T*exp(-T0/T)
# E0: 167.5e9 Pa T0: 317 K B: 15.8e6 Pa/K
dlnEdT: -2e-5 # (1/K) dlnE/dT T=120K
Phi: 2e-9 # Nawrodt (2010) loss angle 1/Q
Y: 155.8e9 # Pa Youngs Modulus
Dissdepth: 1.5e-3 # 10x smaller surface loss depth (Nawrodt (2010))
# Note stage numbering: mirror is at beginning of stack, not end
#
# last stage length adjusted for d: 10mm and and d_bend = 4mm
# (since 602mm is the CoM separation, and d_bend is accounted for
# in suspQuad, so including it here would double count)
Stage:
# Stage1
- Mass: 39.6 # kg; current numbers May 2006 NAR
# length adjusted for d = 10mm and d_bend = 4mm
# (since 602mm is the CoM separation, and d_bend is accounted for
# in suspQuad, so including it here would double count)
Length: 0.59 # m
Dilution: .nan #
K: .nan # N/m; vertical spring constant
WireRadius: .nan # m
Blade: .nan # blade thickness
NWires: 4
# Stage2
- Mass: 39.6
Length: 0.341
Dilution: 106
K: 5200
WireRadius: 310e-6
Blade: 4200e-6
NWires: 4
# Stage3
- Mass: 21.8
Length: 0.277
Dilution: 80
K: 3900
WireRadius: 350e-6
Blade: 4600e-6
NWires: 4
# Stage4
- Mass: 22.1
Length: 0.416
Dilution: 87
K: 3400
WireRadius: 520e-6
Blade: 4300e-6
NWires: 2
Ribbon:
Thickness: 115e-6 # m
Width: 1150e-6 # m
Fiber:
Radius: 205e-6 # m
# for tapered fibers
# EndRadius is tuned to cancel thermo-elastic noise (delta_h in suspQuad)
# EndLength is tuned to match bounce mode frequency
EndRadius: 400e-6 # m; nominal 400um
EndLength: 45e-3 # m; nominal 20mm
## Optic Material -------------------------------------------------------
Materials:
MassRadius: 0.17 # m;
MassThickness: 0.200 # m; Peter F 8/11/2005
## Dielectric coating material parameters----------------------------------
Coating:
## high index material: tantala
Yhighn: 120e9 # Ta2O5-TiO2 from 2020 LMA https://iopscience.iop.org/article/10.1088/1361-6382/ab77e9
Sigmahighn: 0.29 # 2020 LMA
CVhighn: 2.1e6 # Crooks et al, Fejer et al
Alphahighn: 3.6e-6 # 3.6e-6 Fejer et al, 5e-6 from Braginsky
Betahighn: 1.4e-5 # dn/dT, value Gretarrson (G070161)
ThermalDiffusivityhighn: 33 # Fejer et al
Indexhighn: 2.09 # 2020 LMA
Phihighn: 9.0e-5 # tantala mechanical loss
Phihighn_slope: 0.1
## low index material: silica
Ylown: 70e9 # 2020 LMA
Sigmalown: 0.19 # 2020 LMA
CVlown: 1.6412e6 # Crooks et al, Fejer et al
Alphalown: 5.1e-7 # Fejer et al
Betalown: 8e-6 # dn/dT, (ref. 14)
ThermalDiffusivitylown: 1.38 # Fejer et al
Indexlown: 1.45
Philown: 1.25e-5 # silica mechanical loss
Philown_slope: 0 # G1600641 and arXiv:1712.05701 suggest
# slopes between 0 and 0.3, depending on
# deposition method. Slawek's analysis in
# 10.1103/PhysRevD.98.122001 assumes zero slope.
## Substrate Material parameters--------------------------------------------
Substrate:
Temp: 295
c2: 7.6e-12 # Coeff of freq depend. term for bulk mechanical loss, 7.15e-12 for Sup2
MechanicalLossExponent: 0.77 # Exponent for freq dependence of silica loss, 0.822 for Sup2
Alphas: 5.2e-12 # Surface loss limit (ref. 12)
MirrorY: 7.27e10 # N/m^2; Youngs modulus (ref. 4)
MirrorSigma: 0.167 # Kg/m^3; Poisson ratio (ref. 4)
MassDensity: 2.2e3 # Kg/m^3; (ref. 4)
MassAlpha: 3.9e-7 # 1/K; thermal expansion coeff. (ref. 4)
MassCM: 739 # J/Kg/K; specific heat (ref. 4)
MassKappa: 1.38 # J/m/s/K; thermal conductivity (ref. 4)
RefractiveIndex: 1.45 # mevans 25 Apr 2008
## Laser-------------------------------------------------------------------
Laser:
Wavelength: 1.064e-6 # m
Power: 125 # W
## Optics------------------------------------------------------------------
Optics:
Type: 'SignalRecycled'
PhotoDetectorEfficiency: 0.9 # photo-detector quantum efficiency
Loss: 37.5e-6 # average per mirror power loss
BSLoss: 0.5e-3 # power loss near beamsplitter
coupling: 1.0 # mismatch btwn arms & SRC modes; used to
# calculate an effective r_srm
SubstrateAbsorption: 0.5e-4 # 1/m; bulk absorption coef (ref. 2)
pcrit: 10 # W; tolerable heating power (factor 1 ATC)
Quadrature:
dc: 1.5707963 # pi/2 # demod/detection/homodyne phase
ITM:
Transmittance: 0.014
CoatingThicknessLown: 0.308
CoatingThicknessCap: 0.5
CoatingAbsorption: 0.5e-6
ETM:
Transmittance: 5e-6
CoatingThicknessLown: 0.27
CoatingThicknessCap: 0.5
PRM:
Transmittance: 0.03
SRM:
Transmittance: 0.325
CavityLength: 55 # m, ITM to SRM distance
Tunephase: 0.0 # SEC tuning
Curvature: # ROC
ITM: 1970
ETM: 2192
## Squeezer Parameters------------------------------------------------------
# Define the squeezing you want:
# None: ignore the squeezer settings
# Freq Independent: nothing special (no filter cavities)
# Freq Dependent = applies the specified filter cavities
# Optimal = find the best squeeze angle, assuming no output filtering
# OptimalOptimal = optimal squeeze angle, assuming optimal readout phase
Squeezer:
Type: 'Freq Dependent'
AmplitudedB: 12 # SQZ amplitude [dB]
InjectionLoss: 0.05 # power loss to sqz
SQZAngle: 0 # SQZ phase [radians]
LOAngleRMS: 30e-3 # quadrature noise [radians]
# Parameters for frequency dependent squeezing
FilterCavity:
L: 300 # cavity length
Te: 1e-6 # end mirror transmission
Lrt: 60e-6 # round-trip loss in the cavity
Rot: 0 # phase rotation after cavity
fdetune: -45.78 # detuning [Hz]
Ti: 1.2e-3 # input mirror transmission [Power]
+inherit: 'CustomBudget'
Squeezer:
AmplitudedB: 14
FilterCavity:
Lrt: 40e-6
......@@ -36,6 +36,58 @@ def test_inherit_load(pprint, tpath_join, fpath_join):
])
)
fpath3 = fpath_join('Aplus_mod3.yaml')
B_inherit3 = load_budget(fpath3)
pprint(B_inherit3.ifo.diff(B_orig.ifo))
assert(
B_inherit3.ifo.diff(B_orig.ifo)
== [('Optics.Quadrature.dc', None, 1.5707963)]
)
@pytest.mark.fast
@pytest.mark.logic
def test_inherit_custom_budget(fpath_join):
"""
Test that inheritance works when the final budget is a custom budget in
an arbitrary directory instead of one of the canonical budgets
"""
B_inherit = load_budget(fpath_join('subdir/CustomBudget_mod.yaml'))
B_orig = load_budget(fpath_join('subdir/CustomBudget'))
noises = [noise.__name__ for noise in B_inherit.noises]
assert B_inherit.name == 'A custom budget'
assert sorted(noises) == ['QuantumVacuum', 'Seismic']
assert(
sorted(B_inherit.ifo.diff(B_orig.ifo))
== sorted([
('Squeezer.AmplitudedB', 14, 12),
('Squeezer.FilterCavity.Lrt', 40e-6, 60e-6),
])
)
@pytest.mark.fast
@pytest.mark.logic
def test_load_uninherited_yaml(fpath_join):
"""
Test that a yaml file not specifying an inherited budget is loaded into
the aLIGO budget
"""
B_new = load_budget(fpath_join('new_ifo.yaml'))
B_aLIGO = load_budget('aLIGO')
assert B_new.name == 'Advanced LIGO'
assert(
sorted(B_new.ifo.diff(B_aLIGO.ifo))
== sorted([
('Optics.Loss', 3.75e-05, 4e-05),
('Squeezer.AmplitudedB', 12, None),
('Squeezer.FilterCavity.L', 300, None),
])
)
@pytest.mark.fast
@pytest.mark.logic
......@@ -48,3 +100,24 @@ def test_inherit_fail(pprint, tpath_join, fpath_join):
with pytest.raises(RuntimeError):
B_inherit2 = load_budget(fpath2)
@pytest.mark.fast
@pytest.mark.logic
def test_load_fail_unknown_filetype(fpath_join):
"""
Test that load_budget fails when given a file type not supported by Struct
"""
with pytest.raises(RuntimeError):
budget = load_budget(fpath_join('new_ifo.txt'))
@pytest.mark.fast
@pytest.mark.logic
def test_load_fail_unknown_ifo():
"""
Test that load_budget fails when given an unknown ifo that doesn't exist
"""
with pytest.raises(RuntimeError):
budget = load_budget('not_a_real_ifo')
"""
Unit tests for quantum noise
"""
import gwinc
from gwinc.noise.quantum import getSqzParams
from copy import deepcopy
import pytest
@pytest.mark.logic
@pytest.mark.fast
def test_no_squeezer_type():
"""Test that the appropriate options result in no squeezer
"""
def assert_no_squeezer(params):
assert params.sqzType == 'None'
assert params.SQZ_DB == 0
assert params.ANTISQZ_DB == 0
assert params.lambda_in == 0
assert params.etaRMS == 0
budget = gwinc.load_budget('Aplus')
ifo1 = deepcopy(budget.ifo)
ifo2 = deepcopy(budget.ifo)
ifo3 = deepcopy(budget.ifo)
# there should be no squeezer if
# the squeezer struct is missing
del ifo1.Squeezer
# or the squeezing amplitude is 0
ifo2.Squeezer.AmplitudedB = 0
# or the squeezer type is 'None'
ifo3.Squeezer.Type = 'None'
assert_no_squeezer(getSqzParams(ifo1))
assert_no_squeezer(getSqzParams(ifo2))
assert_no_squeezer(getSqzParams(ifo2))
@pytest.mark.logic
@pytest.mark.fast
@pytest.mark.skip(reason='Needs to be implemented')
def test_lo_params():
"""Test the logic for the various LO options
"""
pass