Skip to content
Snippets Groups Projects
Commit bb125561 authored by Kevin Kuns's avatar Kevin Kuns
Browse files

simplify residual gas logic

parent a4747094
No related branches found
No related tags found
1 merge request!121Residual gas sub-budgets and updates
This commit is part of merge request !121. Comments created here will be created in the context of that merge request.
......@@ -904,23 +904,21 @@ def _calc_residual_gas_damping(f, ifo, species, sustf):
Can get rid of if budgets are calculated at runtime
"""
squeezed_film = ifo.Infrastructure.ResidualGas.get('SqueezedFilm', None)
squeezed_film = ifo.Infrastructure.ResidualGas.get('SqueezedFilm', Struct())
if squeezed_film is None:
raise ValueError('Must specify either excess damping or a gap')
# Calculate squeezed film for ETM and ITM seperately if either is given
# explicitly. If only one is given, it is not computed for the other one.
if squeezed_film:
if ('ETM' in squeezed_film) or ('ITM' in squeezed_film):
n = np.zeros_like(f)
if 'ETM' in squeezed_film:
n_ETM = noise.residualgas.residual_gas_damping(
f, ifo, species, sustf, squeezed_film.ETM)
n += 2 * n_ETM
if 'ITM' in squeezed_film:
n_ITM = noise.residualgas.residual_gas_damping(
f, ifo, species, sustf, squeezed_film.ITM)
n += 2 * n_ITM
if ('ETM' in squeezed_film) or ('ITM' in squeezed_film):
squeezed_film_ETM = squeezed_film.get('ETM', Struct())
squeezed_film_ITM = squeezed_film.get('ITM', Struct())
n_ETM = noise.residualgas.residual_gas_damping(
f, ifo, species, sustf, squeezed_film_ETM)
n_ITM = noise.residualgas.residual_gas_damping(
f, ifo, species, sustf, squeezed_film_ITM)
n = 2 * (n_ETM + n_ITM)
# Otherwise the same calculation is used for both.
else:
......
......@@ -96,7 +96,7 @@ def residual_gas_damping(f, ifo, species, sustf, squeezed_film):
# add squeezed film damping if necessary as parametrized by
# Eq (5) of http://dx.doi.org/10.1103/PhysRevD.84.063007
if squeezed_film:
if squeezed_film.keys():
# the excess force noise and diffusion time are specified directly
if 'ExcessDamping' in squeezed_film:
# ExcessDamping is the ratio of the total gas damping noise at DC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment