Skip to content
Snippets Groups Projects
Commit 12ff2916 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

move Constants.Temp to be part of Infrastructure

Infrastructure is obviously where it really belongs.  This also allows us
to almost eliminate the need for the Constants struct on our side.
parent c7fa8197
No related branches found
No related tags found
No related merge requests found
...@@ -111,12 +111,16 @@ NOISE_NAME_MAP = { ...@@ -111,12 +111,16 @@ NOISE_NAME_MAP = {
def ifo_matlab_transform(ifo): def ifo_matlab_transform(ifo):
"""Prep the ifo structure for use with MATLAB gwinc """Prep the ifo structure for use with MATLAB gwinc
* add "constants" sub-Struct * add "Constants" sub-Struct
* copy Temp to Constants
""" """
# add constants # add constants
ifo.Constants = Struct.from_dict(const.CONSTANTS) ifo.Constants = Struct.from_dict(const.CONSTANTS)
# copy tempurature into Constants
ifo.Constants.Temp = ifo.Infrastructure.Temp
return ifo return ifo
......
...@@ -29,12 +29,9 @@ ...@@ -29,12 +29,9 @@
# #
# Updated numbers March 2018: LIGO-T1800044 # Updated numbers March 2018: LIGO-T1800044
Constants:
# Temperature of the Vacuum
Temp: 290 # K
Infrastructure: Infrastructure:
Length: 3995 # m Length: 3995 # m
Temp: 290 # K
ResidualGas: ResidualGas:
pressure: 4.0e-7 # Pa pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10) mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
......
...@@ -27,11 +27,9 @@ ...@@ -27,11 +27,9 @@
# * 13. Fejer # * 13. Fejer
# * 14. Braginsky # * 14. Braginsky
Constants:
Temp: 295 # K; Temperature of the Vacuum
Infrastructure: Infrastructure:
Length: 3995 # m Length: 3995 # m
Temp: 295 # K; Temperature of the Vacuum
ResidualGas: ResidualGas:
pressure: 4.0e-7 # Pa pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg, Mass of H_2 (ref. 10) mass: 3.35e-27 # kg, Mass of H_2 (ref. 10)
......
...@@ -29,12 +29,9 @@ ...@@ -29,12 +29,9 @@
# #
# Updated numbers March 2018: LIGO-T1800044 # Updated numbers March 2018: LIGO-T1800044
Constants:
# Temperature of the Vacuum
Temp: 290 # K
Infrastructure: Infrastructure:
Length: 3995 # m Length: 3995 # m
Temp: 290 # K
ResidualGas: ResidualGas:
pressure: 4.0e-7 # Pa pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10) mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
......
...@@ -16,7 +16,7 @@ def gas(f, ifo): ...@@ -16,7 +16,7 @@ def gas(f, ifo):
L = ifo.Infrastructure.Length L = ifo.Infrastructure.Length
Lambda = ifo.Laser.Wavelength Lambda = ifo.Laser.Wavelength
k = scipy.constants.k k = scipy.constants.k
T = ifo.Constants.Temp T = ifo.Infrastructure.Temp
P = ifo.Infrastructure.ResidualGas.pressure # Pressure inside the vacuum P = ifo.Infrastructure.ResidualGas.pressure # Pressure inside the vacuum
M = ifo.Infrastructure.ResidualGas.mass M = ifo.Infrastructure.ResidualGas.mass
R1 = ifo.Optics.Curvature.ITM # Radius of curvature of ITM R1 = ifo.Optics.Curvature.ITM # Radius of curvature of ITM
......
...@@ -27,7 +27,7 @@ def precompIFO(ifo, PRfixed=True): ...@@ -27,7 +27,7 @@ def precompIFO(ifo, PRfixed=True):
# derived temp # derived temp
if 'Temp' not in ifo.Materials.Substrate: if 'Temp' not in ifo.Materials.Substrate:
ifo.Materials.Substrate.Temp = ifo.Constants.Temp ifo.Materials.Substrate.Temp = ifo.Infrastructure.Temp
############################## ##############################
# suspension vertical-horizontal coupling # suspension vertical-horizontal coupling
...@@ -114,9 +114,12 @@ def precompIFO(ifo, PRfixed=True): ...@@ -114,9 +114,12 @@ def precompIFO(ifo, PRfixed=True):
############################## ##############################
# precompute bessels zeros, needed in coat and substrate thermal # precompute bessels zeros, needed in coat and substrate thermal
# FIXME: can we move this into const and just compute at load
# time?
besselzeros = scipy.special.jn_zeros(1, 300) if 'Constants' not in ifo:
ifo.Constants.BesselZeros = besselzeros ifo.Constants = Struct()
ifo.Constants.BesselZeros = scipy.special.jn_zeros(1, 300)
############################## ##############################
# saved seismic spectrum # saved seismic spectrum
......
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