Skip to content
Snippets Groups Projects
Commit ee321063 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins Committed by Christopher Wipf
Browse files

move bessel zeros calc into const

This really doesn't need to be a part of precompIFO
parent bfb0c8a7
No related branches found
No related tags found
No related merge requests found
Pipeline #28003 passed
import scipy.constants
import scipy.special
CONSTANTS = {
......@@ -25,3 +26,7 @@ CONSTANTS = {
'omegaM': 0.3175,
'omegaLambda': 1 - 0.3175,
}
BESSEL_ZEROS = scipy.special.jn_zeros(1, 300)
J0M = scipy.special.jn(0, BESSEL_ZEROS)
......@@ -4,6 +4,9 @@ import scipy.special
import numpy as np
from numpy import pi, sum, zeros, exp, real, imag, sqrt, sin, cos, sinh, cosh, polyfit, roots, max, min, ceil, log
from ..const import BESSEL_ZEROS as zeta
from ..const import J0M as j0m
def coatbrownian(f, ifo):
"""Optical coating Brownian thermal noise
......@@ -545,7 +548,6 @@ def getCoatFiniteCorr(ifo, wBeam, dOpt):
R = ifo.Materials.MassRadius #substrate radius
H = ifo.Materials.MassThickness #substrate thickness
lambda_ = ifo.Laser.Wavelength
zeta = ifo.Constants.BesselZeros # zeros of 1st order bessel function (J1)
alphaS = ifo.Materials.Substrate.MassAlpha
C_S = ifo.Materials.Substrate.MassCM * ifo.Materials.Substrate.MassDensity
......@@ -595,9 +597,6 @@ def getCoatFiniteCorr(ifo, wBeam, dOpt):
# beam size parameter used by Braginsky
r0 = wBeam / sqrt(2)
# values of J0 at zeros of J1
j0m = scipy.special.jn(0, zeta)
# between eq 77 and 78
km = zeta / R
Qm = exp(-2 * km * H)
......
......@@ -5,6 +5,10 @@ import scipy.special
import scipy.integrate
import scipy.constants
from ..const import BESSEL_ZEROS as zeta
from ..const import J0M as j0m
def carrierdensity(f, ifo):
"""Strain noise arising from charge carrier density fluctuations in ITM substrate
......@@ -159,10 +163,8 @@ def subbrownianFiniteCorr(ifo, opticName):
w = ifo.Optics[opticName].BeamRadius
Y = ifo.Materials.Substrate.MirrorY
sigma = ifo.Materials.Substrate.MirrorSigma
zeta = ifo.Constants.BesselZeros
# do the work
j0m = scipy.special.jn(0, zeta)
r0 = w / sqrt(2) # LT uses e-folding of power
km = zeta/a
......@@ -242,10 +244,8 @@ def subthermFiniteCorr(ifo, opticName):
h = ifo.Materials.MassThickness
w = ifo.Optics[opticName].BeamRadius
sigma = ifo.Materials.Substrate.MirrorSigma
zeta = ifo.Constants.BesselZeros
# do the work
j0m = scipy.special.jn(0, zeta)
r0 = w/sqrt(2) # LT uses power e-folding
km = zeta/a
......
......@@ -119,15 +119,6 @@ def precompIFO(f, ifoin, PRfixed=True):
ifo.gwinc.fGammaIFO = fGammaIFO
ifo.gwinc.fGammaArm = fGammaArm
##############################
# precompute bessels zeros, needed in coat and substrate thermal
# FIXME: can we move this into const and just compute at load
# time?
if 'Constants' not in ifo:
ifo.Constants = Struct()
ifo.Constants.BesselZeros = scipy.special.jn_zeros(1, 300)
##############################
# 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