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 (108)
Showing
with 640 additions and 305 deletions
[flake8]
ignore = E226,E741,E266,W503
max-line-length = 140
# E226, missing whitespace around arithmetic operator: quantum.py currently needs large changes to avoid this
# E741, "l" is a bad variable name: Gwinc uses "l" in a few reasonable places
# E266, Too many leading '#' for block comment: There are some reasonable instances of comments that trigger this
# W503, binary operator at start of line: This allows using parentheses to break equations
#for docs and setup.py outputs
build/
tresults/
tresults*/
test_results*/
# test cache
gwinc/test/cache
test/*/*.h5
gwinc.egg-info/
.eggs/
gwinc/_version.py
# Byte-compiled / optimized / DLL files
__pycache__/
......
......@@ -3,6 +3,7 @@ stages:
- test
- review
- deploy
- release
# have to specify this so that all jobs execute for all commits
# including merge requests
......@@ -10,6 +11,7 @@ workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
variables:
GIT_STRATEGY: clone
......@@ -25,7 +27,7 @@ gwinc/base:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- |
cat <<EOF > Dockerfile
FROM igwn/base:buster
FROM igwn/base:bullseye
RUN apt-get update -qq
RUN apt-get -y install --no-install-recommends git python3 python3-gitlab python3-setuptools-scm python3-yaml python3-scipy python3-matplotlib python3-pypdf2 python3-h5py python3-inspiral-range python3-lalsimulation
EOF
......@@ -122,3 +124,20 @@ pages:
when: always
paths:
- public
# make pypi release on tag creation
pypi_release:
stage: release
rules:
- if: $CI_PROJECT_NAMESPACE != "gwinc"
when: never
- if: $CI_COMMIT_TAG =~ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
image: python:latest
script:
- echo "pypi release for $CI_COMMIT_TAG"
- pip install twine
- python setup.py sdist bdist_wheel
- TWINE_USERNAME=__token__ TWINE_PASSWORD=${PYPI_TOKEN} twine upload dist/*
artifacts:
paths:
- dist/*
......@@ -50,28 +50,29 @@ figures of merit for gravitational wave detector budgets. See the
`pygwinc` provides a command line interface that can be used to
calculate and plot the various canonical IFO noise budgets described
above:
above. For most distributions this should be available via
`gwinc` at the command line, or `python3 -m gwinc` otherwise:
```shell
$ python3 -m gwinc aLIGO
$ gwinc aLIGO
```
Or [Custom budgets](#budget-interface) may also be processed by providing
Or [custom budgets](#budget-interface) may also be processed by providing
the path to the budget module/package:
```shell
$ python3 -m gwinc path/to/mybudget
$ gwinc path/to/mybudget
```
Budget plots can be saved in various formats (.png, .svg, .pdf):
```shell
$ python3 -m gwinc --save aLIGO.png aLIGO
$ gwinc --save aLIGO.png aLIGO
```
Or trace data can be saved to an
[HDF5](https://en.wikipedia.org/wiki/Hierarchical_Data_Format) file:
```shell
$ python3 -m gwinc --save aLIGO.hdf5 aLIGO
$ gwinc --save aLIGO.hdf5 aLIGO
```
Trace HDF5 files can also be plotted directly:
```shell
$ python3 -m gwinc aLIGO.hdf5
$ gwinc aLIGO.hdf5
```
The `--range` option can be used to include the values of various
......@@ -80,17 +81,17 @@ inspiral ranges for the overall noise in the output.
IFO parameters can be manipulated from the command line with the
`--ifo` option:
```shell
$ python3 -m gwinc aLIGO --ifo Optics.SRM.Tunephase=3.14
$ gwinc aLIGO --ifo Optics.SRM.Tunephase=3.14
```
You can also dump the IFO parameters to a [YAML-formatted parameter
file](#yaml-parameter-files):
```shell
$ python3 -m gwinc --yaml aLIGO > my_aLIGO.yaml
$ gwinc --yaml aLIGO > my_aLIGO.yaml
$ edit my_aLIGO.yaml
$ python3 -m gwinc -d my_aLIGO.yaml aLIGO
$ gwinc -d my_aLIGO.yaml aLIGO
aLIGO my_aLIGO.yaml
Materials.Coating.Philown 5e-05 3e-05
$ python3 -m gwinc my_aLIGO.yaml
$ gwinc my_aLIGO.yaml
```
Stand-alone YAML files assume the nominal ['aLIGO' budget
description](gwinc/ifo/aLIGO).
......@@ -99,7 +100,7 @@ The command line interface also includes an "interactive" mode which
provides an [IPython](https://ipython.org/) shell for interacting with
a processed budget:
```shell
$ python3 -m gwinc -i Aplus
$ gwinc -i Aplus
GWINC interactive shell
The 'ifo' Struct and 'trace' data are available for inspection.
......@@ -115,7 +116,7 @@ In [1]:
See command help for more info:
```shell
$ python3 -m gwinc -h
$ gwinc --help
```
......@@ -138,7 +139,7 @@ provided to `load_budget()` either in the form of a numpy array:
>>> budget = gwinc.load_budget('aLIGO', freq=freq)
```
or frequency specification string ('FLO:[NPOINTS:]FHI'):
```
```python
>>> budget = gwinc.load_budget('aLIGO', freq='10:1000:1000')
```
......@@ -152,8 +153,8 @@ is available in the `budget.ifo` attribute.
The budget `run()` method calculates all budget noises and the noise
total and returns a `BudgetTrace` object with `freq`, `psd`, and `asd`
properties. The budget sub-traces are available through a dictionary
(`trace['QuantumVacuum']`) interface and via attributes
(`trace.QuantumVacumm`).
(`trace['Quantum']`) interface and via attributes
(`trace.Quantum`).
The budget `freq` and `ifo` attributes can be updated at run time by
passing them as keyword arguments to the `run()` method:
......@@ -382,10 +383,9 @@ calculate common derived values needed in multiple `BudgetItems`.
They are specified using the `nb.precomp` decorator applied to the
`BudgetItem.calc()` method. These functions are executed during the
`update()` method call, supplied with the budget `freq` and `ifo`
attributes as input arguments, and are expected to update the `ifo`
struct. The execution state of the precomp functions is cached at the
Budget level, to prevent needlessly re-calculating them multiple
times. For example:
attributes as input arguments. The execution state of the precomp
functions is cached at the Budget level, to prevent needlessly
re-calculating them multiple times. For example:
```python
from gwinc import nb
......@@ -438,21 +438,21 @@ and extract the noise data the output traces dictionary:
```python
budget = load_budget('/path/to/MyBudget', freq)
trace = budget.run()
quantum_trace = trace['QuantumVacuum']
quantum_trace = trace['Quantum']
```
You can also calculate the final calibrated output noise for just a
single term using the Budget `calc_noise()` method:
```python
data = budget.calc_noise('QuantumVacuum')
data = budget.calc_noise('Quantum')
```
You can also calculate a noise at it's source, without applying any
calibrations, by using the Budget `__getitem__` interface to extract
the specific Noise BudgetItem for the noise you're interested in, and
running it's `calc()` method directly:
running it's `calc_trace()` method directly:
```python
data = budget['QuantumVacuum'].calc()
data = budget['Quantum'].calc_trace()
```
......
......@@ -40,6 +40,14 @@ def pytest_addoption(parser):
help="Do not preclear tpaths",
)
parser.addoption(
"--generate",
action="store_true",
default=False,
dest="generate",
help="Generate test data",
)
@pytest.fixture
def plot(request):
......@@ -63,7 +71,7 @@ def tpath_preclear(request):
def tpath(request):
"""
Fixture that takes the value of the special test-specific folder for test
run data and plots. Usually the <folder of the test>/tresults/test_name/
run data and plots. Usually the <folder of the test>/test_results/test_name/
"""
tpath_raw = tpath_raw_make(request)
......@@ -76,7 +84,7 @@ def tpath(request):
def tpath_join(request):
"""
Fixture that joins subpaths to the value of the special test-specific folder for test
run data and plots. Usually the <folder of the test>/tresults/test_name/.
run data and plots. Usually the <folder of the test>/test_results/test_name/.
This function should be use like test_thing.save(tpath_join('output_file.png'))
"""
......@@ -228,7 +236,7 @@ def pprint(request, tpath_join):
def tpath_raw_make(request):
if isinstance(request.node, pytest.Function):
return relfile_test(request.node.function.__code__.co_filename, request, 'tresults')
return relfile_test(request.node.function.__code__.co_filename, request, 'test_results')
raise RuntimeError("TPath currently only works for functions")
......@@ -270,3 +278,83 @@ def relfile_test(_file_, request, pre = None, post = None, fname = None):
else:
return relfile(_file_, testname, fname = fname)
@pytest.fixture
def compare_noise(pprint):
"""
Fixture to compare two sets of traces
A list of noises passed, failed, and skipped are printed. Comparisons are
skipped if the psd's are sufficiently small (controlled by psd_tol) indicating
that the noise is essentially zero or if a trace is missing.
An assertion error is raised if any noises fail.
"""
import numpy as np
def compare(traces, ref_traces, psd_tol=1e-52):
passed = []
failed = []
skipped = []
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(traces.name)
pprint('Noises failed:')
pprint(40 * '-')
for noise in failed:
pprint(noise)
pprint(40 * '+')
pprint('Noises passed:')
pprint(40 * '-')
for noise in passed:
pprint(noise)
pprint(40 * '+')
pprint('Noises skipped:')
pprint(40 * '-')
for noise in skipped:
pprint(noise)
assert len(failed) == 0
return compare
def pytest_collection_modifyitems(config, items):
"""
Modifies tests to be selectively skipped with command line options
https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option
"""
# run tests marked as generate if and only if --generate is given
# skip all others in this case
if config.getoption('--generate'):
skip = pytest.mark.skip(
reason='only running tests that generate data')
for item in items:
if 'generate' not in item.keywords:
item.add_marker(skip)
else:
skip = pytest.mark.skip(
reason='generates test data: needs --generate to run')
for item in items:
if 'generate' in item.keywords:
item.add_marker(skip)
......@@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('..'))
#gwinc must be importable to build the docs properly anyway, using apidoc, so
#import it now for the __version__ parameter
import gwinc
import gwinc # noqa
# -- General configuration ------------------------------------------------
......
......@@ -27,9 +27,11 @@ logger = logging.getLogger('gwinc')
DEFAULT_FREQ = '5:3000:6000'
class InvalidFrequencySpec(Exception):
pass
def freq_from_spec(spec=None):
"""logarithmicly spaced frequency array, based on specification string
......@@ -42,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(
......@@ -51,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}')
......@@ -90,7 +92,7 @@ def load_budget(name_or_path, freq=None, bname=None):
If `bname` is specified the Budget class with that name will be
loaded from the budget module. Otherwise, the Budget class with
the same name as the budget module will be load.
the same name as the budget module will be loaded.
If the budget is a package directory which includes an 'ifo.yaml'
file the ifo Struct will be loaded from that file and assigned to
......@@ -117,14 +119,40 @@ def load_budget(name_or_path, freq=None, bname=None):
if ext in Struct.STRUCT_EXT:
logger.info("loading struct {}...".format(path))
ifo = Struct.from_file(path)
bname = 'aLIGO'
modname = 'gwinc.ifo.aLIGO'
else:
ifo = Struct.from_file(path, _pass_inherit=True)
inherit_ifo = ifo.get('+inherit', 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 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,
clear_test=lambda v: isinstance(v, str) and v == '<unset>'
)
inherit_budget.update(ifo=pre_ifo)
return inherit_budget
else:
modname = 'gwinc.ifo.aLIGO'
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(
......@@ -132,13 +160,13 @@ def load_budget(name_or_path, freq=None, bname=None):
IFOS,
))
bname = bname or name_or_path
modname = 'gwinc.ifo.'+name_or_path
modname = 'gwinc.ifo.' + name_or_path
logger.info(f"loading budget {modname}.{bname}...")
logger.info(f"loading budget '{bname}' from {modname}...")
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):
......@@ -206,13 +234,15 @@ def gwinc(freq, ifo, source=None, plot=False, PRfixed=True):
logger.info('Power on BS: %7.2f W' % pbs)
# coating and substrate thermal load on the ITM
PowAbsITM = (pbs/2) * \
np.hstack([(finesse*2/np.pi) * ifo.Optics.ITM.CoatingAbsorption,
(2 * ifo.Materials.MassThickness) * ifo.Optics.ITM.SubstrateAbsorption])
PowAbsITM = (
(pbs/2)
* np.hstack([
(finesse*2/np.pi) * ifo.Optics.ITM.CoatingAbsorption,
(2 * ifo.Materials.MassThickness) * ifo.Optics.ITM.SubstrateAbsorption])
)
logger.info('Thermal load on ITM: %8.3f W' % sum(PowAbsITM))
logger.info('Thermal load on BS: %8.3f W' %
(ifo.Materials.MassThickness*ifo.Optics.SubstrateAbsorption*pbs))
logger.info('Thermal load on BS: %8.3f W' % (ifo.Materials.MassThickness*ifo.Optics.SubstrateAbsorption*pbs))
if (ifo.Laser.Power*prfactor != pbs):
logger.info('Lensing limited input power: %7.2f W' % (pbs/prfactor))
......
......@@ -148,6 +148,7 @@ def main():
parser.exit(2, f"Error: {e}\n")
name = budget.name
ifo = budget.ifo
freq = budget.freq
plot_style = getattr(budget, 'plot_style', {})
trace = None
......@@ -307,10 +308,17 @@ You may interact with the plot using the 'plt' functions, e.g.:
In [.]: plt.title("foo")
In [.]: plt.savefig("foo.pdf")
"""
from IPython.core import getipython
from IPython.terminal.embed import InteractiveShellEmbed
if subtitle:
plot_style['title'] += '\n' + subtitle
ipshell = InteractiveShellEmbed(
# deal with breaking change in ipython embedded mode
# https://github.com/ipython/ipython/issues/13966
if getipython.get_ipython() is None:
embed = InteractiveShellEmbed.instance
else:
embed = InteractiveShellEmbed
ipshell = embed(
banner1=banner,
user_ns={
'ifo': ifo,
......
from gwinc.ifo.noises import *
from gwinc.ifo import PLOT_STYLE
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class QuantumVacuum(nb.Budget):
"""Quantum Vacuum
class Aplus(nb.Budget):
"""
style = dict(
label='Quantum Vacuum',
color='#ad03de',
)
name = 'A+'
noises = [
QuantumVacuumAS,
QuantumVacuumArm,
QuantumVacuumSEC,
QuantumVacuumFilterCavity,
QuantumVacuumInjection,
QuantumVacuumReadout,
QuantumVacuumQuadraturePhase,
noise.quantum.Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
noise.residualgas.ResidualGas,
]
calibrations = [
calibrations.Strain,
]
class Aplus(nb.Budget):
plot_style = PLOT_STYLE
name = 'A+'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
CoatingBrownian,
CoatingThermoOptic,
SubstrateBrownian,
SubstrateThermoElastic,
ExcessGas,
class Displacement(Aplus):
calibrations = []
class Acceleration(Aplus):
calibrations = [
calibrations.Acceleration,
]
class Velocity(Aplus):
calibrations = [
Strain,
calibrations.Velocity,
]
plot_style = PLOT_STYLE
class Force(Aplus):
calibrations = [
calibrations.Force,
]
# GWINC aLIGO interferometer parameters
# GWINC A+ interferometer parameters
#
# parameters for quad pendulum suspension updated 3rd May 2006, NAR
# References:
......@@ -33,9 +33,30 @@ Infrastructure:
Length: 3995 # m
Temp: 290 # K
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.8e-31 # m^3
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
......@@ -75,8 +96,29 @@ Seismic:
Beta: 0.8 # quiet times beta: 0.35-0.60
# noisy times beta: 0.15-1.4
Omicron: 1 # Feedforward cancellation factor
pWaveSpeed: 600 # m/s
sWaveSpeed: 300 # m/s
TestMassHeight: 1.5 # m
RayleighWaveSpeed: 250 # m/s
pWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
sWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
PlatformMotion: 'BSC'
Atmospheric:
AirPressure: 101325 # Pa
AirDensity: 1.225 # kg/m**3
AirKinematicViscosity: 1.8e-5 # m**2/s
AdiabaticIndex: 1.4 #
SoundSpeed: 344 # m/s
WindSpeed: 10 # m/s; typical value
Temperature: 300 # K
TempStructConst: 0.2 # K**2/m**(2/3);
TempStructExp: 0.667 #
TurbOuterScale: 100 # m
# TurbEnergyDissRate: 0.01 # m**2/s**3
KolmEnergy1m: 1 # Kolmogorov energy spectrum at 1/m [m**2/s**2]
Suspension:
Type: 'Quad'
......@@ -267,8 +309,8 @@ Optics:
Tunephase: 0.0 # SEC tuning
Curvature: # ROC
ITM: 1970
ETM: 2192
ITM: 1940
ETM: 2245
## Squeezer Parameters------------------------------------------------------
# Define the squeezing you want:
......
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 Newtonian(nb.Budget):
"""Newtonian Gravity
"""
name = 'Newtonian'
style = dict(
label='Newtonian',
color='#15b01a',
)
noises = [
NewtonianRayleigh,
NewtonianBody,
NewtonianInfrasound,
]
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class Coating(nb.Budget):
......@@ -54,8 +17,8 @@ class Coating(nb.Budget):
)
noises = [
CoatingBrownian,
CoatingThermoOptic,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
]
......@@ -72,30 +35,49 @@ class Substrate(nb.Budget):
)
noises = [
SubstrateBrownian,
SubstrateThermoElastic,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
]
ExcessGas.style['linestyle'] = '-'
class CE1(nb.Budget):
name = 'Cosmic Explorer 1'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
noise.quantum.Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
Coating,
Substrate,
ExcessGas,
noise.residualgas.ResidualGas,
]
calibrations = [
Strain,
calibrations.Strain,
]
plot_style = PLOT_STYLE
class Displacement(CE1):
calibrations = []
class Acceleration(CE1):
calibrations = [
calibrations.Acceleration,
]
class Velocity(CE1):
calibrations = [
calibrations.Velocity,
]
class Force(CE1):
calibrations = [
calibrations.Force,
]
......@@ -26,9 +26,31 @@ Infrastructure:
Length: 40000 # m; whoa
Temp: 293 # K
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 0.81e-30 # m^3 (H_2, DOI: 10.1116/1.1479360)
# polarizabilities from https://cccbdb.nist.gov/pollistx.asp
H2:
BeamtubePressure: 4.4e-8 # Pa
ChamberPressure: 4.1e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.87e-31 # m^3;
N2:
BeamtubePressure: 2.5e-9
ChamberPressure: 1.1e-7
mass: 4.65e-26
polarizability: 1.71e-30
H2O:
BeamtubePressure: 4.0e-9
ChamberPressure: 1.4e-7
mass: 2.99e-26
polarizability: 1.50e-30
O2:
BeamtubePressure: 2.8e-9
ChamberPressure: 1.0e-7
mass: 5.31e-26
polarizability: 1.56e-30
BuildingRadius: 10 # m
......
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 Newtonian(nb.Budget):
"""Newtonian Gravity
"""
name = 'Newtonian'
style = dict(
label='Newtonian',
color='#15b01a',
)
noises = [
NewtonianRayleigh,
NewtonianBody,
NewtonianInfrasound,
]
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class Coating(nb.Budget):
......@@ -54,8 +17,8 @@ class Coating(nb.Budget):
)
noises = [
CoatingBrownian,
CoatingThermoOptic,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
]
......@@ -72,30 +35,49 @@ class Substrate(nb.Budget):
)
noises = [
SubstrateBrownian,
SubstrateThermoElastic,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
]
ExcessGas.style['linestyle'] = '-'
class CE2silica(nb.Budget):
name = 'Cosmic Explorer 2 (Silica)'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
noise.quantum.Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
Coating,
Substrate,
ExcessGas,
noise.residualgas.ResidualGas,
]
calibrations = [
Strain,
calibrations.Strain,
]
plot_style = PLOT_STYLE
class Displacement(CE2silica):
calibrations = []
class Acceleration(CE2silica):
calibrations = [
calibrations.Acceleration,
]
class Velocity(CE2silica):
calibrations = [
calibrations.Velocity,
]
class Force(CE2silica):
calibrations = [
calibrations.Force,
]
......@@ -26,9 +26,31 @@ Infrastructure:
Length: 40000 # m; whoa
Temp: 293 # K
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 0.81e-30 # m^3 (H_2, DOI: 10.1116/1.1479360)
# polarizabilities from https://cccbdb.nist.gov/pollistx.asp
H2:
BeamtubePressure: 4.4e-8 # Pa
ChamberPressure: 4.1e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.87e-31 # m^3;
N2:
BeamtubePressure: 2.5e-9
ChamberPressure: 1.1e-7
mass: 4.65e-26
polarizability: 1.71e-30
H2O:
BeamtubePressure: 4.0e-9
ChamberPressure: 1.4e-7
mass: 2.99e-26
polarizability: 1.50e-30
O2:
BeamtubePressure: 2.8e-9
ChamberPressure: 1.0e-7
mass: 5.31e-26
polarizability: 1.56e-30
BuildingRadius: 10 # m
......
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 Newtonian(nb.Budget):
"""Newtonian Gravity
"""
name = 'Newtonian'
style = dict(
label='Newtonian',
color='#15b01a',
)
noises = [
NewtonianRayleigh,
NewtonianBody,
NewtonianInfrasound,
]
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class Coating(nb.Budget):
......@@ -54,8 +17,8 @@ class Coating(nb.Budget):
)
noises = [
CoatingBrownian,
CoatingThermoOptic,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
]
......@@ -72,31 +35,54 @@ class Substrate(nb.Budget):
)
noises = [
ITMThermoRefractive,
SubstrateBrownian,
SubstrateThermoElastic,
noise.substratethermal.ITMThermoRefractive,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
]
ExcessGas.style['linestyle'] = '-'
class CE2silicon(nb.Budget):
name = 'Cosmic Explorer 2 (Silicon)'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
noise.quantum.Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
Coating,
Substrate,
ExcessGas,
noise.residualgas.ResidualGas,
]
calibrations = [
Strain,
calibrations.Strain,
]
plot_style = PLOT_STYLE
class Displacement(CE2silicon):
calibrations = []
class Displacement(CE2silicon):
calibrations = []
class Acceleration(CE2silicon):
calibrations = [
calibrations.Acceleration,
]
class Velocity(CE2silicon):
calibrations = [
calibrations.Velocity,
]
class Force(CE2silicon):
calibrations = [
calibrations.Force,
]
......@@ -26,10 +26,32 @@ Infrastructure:
Length: 40000 # m; whoa
Temp: 293 # K; Temperature of the Vacuum
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg, Mass of H_2 (ref. 10)
polarizability: 0.81e-30 # m^3 (H_2, DOI: 10.1116/1.1479360)
BuildingRadius: 5 # m
# polarizabilities from https://cccbdb.nist.gov/pollistx.asp
H2:
BeamtubePressure: 4.4e-8 # Pa
ChamberPressure: 4.1e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.87e-31 # m^3;
N2:
BeamtubePressure: 2.5e-9
ChamberPressure: 1.1e-7
mass: 4.65e-26
polarizability: 1.71e-30
H2O:
BeamtubePressure: 4.0e-9
ChamberPressure: 1.4e-7
mass: 2.99e-26
polarizability: 1.50e-30
O2:
BeamtubePressure: 2.8e-9
ChamberPressure: 1.0e-7
mass: 5.31e-26
polarizability: 1.56e-30
BuildingRadius: 10 # m
TCS:
......
from gwinc.ifo.noises import *
from gwinc.ifo import PLOT_STYLE
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class QuantumVacuum(nb.Budget):
"""Quantum Vacuum
class Voyager(nb.Budget):
"""
style = dict(
label='Quantum Vacuum',
color='#ad03de',
)
name = 'Voyager'
noises = [
QuantumVacuumAS,
QuantumVacuumArm,
QuantumVacuumSEC,
QuantumVacuumFilterCavity,
QuantumVacuumInjection,
QuantumVacuumReadout,
noise.quantum.Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
noise.substratethermal.ITMThermoRefractive,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
noise.residualgas.ResidualGas,
]
calibrations = [
calibrations.Strain,
]
class Voyager(nb.Budget):
plot_style = PLOT_STYLE
name = 'Voyager'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
CoatingBrownian,
CoatingThermoOptic,
ITMThermoRefractive,
SubstrateBrownian,
SubstrateThermoElastic,
ExcessGas,
class Displacement(Voyager):
calibrations = []
class Acceleration(Voyager):
calibrations = [
calibrations.Acceleration,
]
class Velocity(Voyager):
calibrations = [
Strain,
calibrations.Velocity,
]
plot_style = PLOT_STYLE
class Force(Voyager):
calibrations = [
calibrations.Force,
]
......@@ -31,9 +31,30 @@ Infrastructure:
Length: 3995 # m
Temp: 295 # K; Temperature of the Vacuum
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg, Mass of H_2 (ref. 10)
polarizability: 0.81e-30 # m^3 (H_2, DOI: 10.1116/1.1479360)
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:
## Parameter describing thermal lensing
......@@ -75,10 +96,30 @@ Seismic:
Beta: 0.8 # quiet times beta = 0.35-0.60; noisy times beta = 0.15-1.4
Omicron: 10 # Feedforward cancellation factor
TestMassHeight: 1.5 # m
pWaveSpeed: 600 # m/s
sWaveSpeed: 300 # m/s
RayleighWaveSpeed: 250 # m/s
pWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
sWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
PlatformMotion: '6D'
#darmSeiSusFile: 'CryogenicLIGO/Sensitivity/GWINC/seismic.mat'
Atmospheric:
AirPressure: 101325 # Pa
AirDensity: 1.225 # kg/m**3
AirKinematicViscosity: 1.8e-5 # m**2/s
AdiabaticIndex: 1.4 #
SoundSpeed: 344 # m/s
WindSpeed: 10 # m/s; typical value
Temperature: 300 # K
TempStructConst: 0.2 # K**2/m**(2/3);
TempStructExp: 0.667 #
TurbOuterScale: 100 # m
# TurbEnergyDissRate: 0.01 # m**2/s**3
KolmEnergy1m: 1 # Kolmogorov energy spectrum at 1/m [m**2/s**2]
Suspension:
Type: 'Quad'
VHCoupling:
......@@ -346,12 +387,13 @@ Squeezer:
AmplitudedB: 10 # SQZ amplitude [dB]
InjectionLoss: 0.05 # power loss to sqz
SQZAngle: 0 # SQZ phase [radians]
LOAngleRMS: 10e-3 # quadrature noise [radians]
# 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
......
from gwinc.ifo.noises import *
from gwinc.ifo import PLOT_STYLE
from gwinc import noise
from gwinc import nb
import gwinc.ifo.noises as calibrations
class QuantumVacuum(nb.Budget):
class Quantum(nb.Budget):
"""Quantum Vacuum
"""
......@@ -12,10 +14,10 @@ class QuantumVacuum(nb.Budget):
)
noises = [
QuantumVacuumAS,
QuantumVacuumArm,
QuantumVacuumSEC,
QuantumVacuumReadout,
noise.quantum.AS,
noise.quantum.Arm,
noise.quantum.SEC,
noise.quantum.Readout,
]
......@@ -24,19 +26,41 @@ class aLIGO(nb.Budget):
name = 'Advanced LIGO'
noises = [
QuantumVacuum,
Seismic,
Newtonian,
SuspensionThermal,
CoatingBrownian,
CoatingThermoOptic,
SubstrateBrownian,
SubstrateThermoElastic,
ExcessGas,
Quantum,
noise.seismic.Seismic,
noise.newtonian.Newtonian,
noise.suspensionthermal.SuspensionThermal,
noise.coatingthermal.CoatingBrownian,
noise.coatingthermal.CoatingThermoOptic,
noise.substratethermal.SubstrateBrownian,
noise.substratethermal.SubstrateThermoElastic,
noise.residualgas.ResidualGas,
]
calibrations = [
Strain,
calibrations.Strain,
]
plot_style = PLOT_STYLE
class Displacement(aLIGO):
calibrations = []
class Acceleration(aLIGO):
calibrations = [
calibrations.Acceleration,
]
class Velocity(aLIGO):
calibrations = [
calibrations.Velocity,
]
class Force(aLIGO):
calibrations = [
calibrations.Force,
]
......@@ -33,9 +33,30 @@ Infrastructure:
Length: 3995 # m
Temp: 290 # K
ResidualGas:
pressure: 4.0e-7 # Pa
mass: 3.35e-27 # kg; Mass of H_2 (ref. 10)
polarizability: 7.8e-31 # m^3
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
......@@ -76,8 +97,28 @@ Seismic:
Beta: 0.8 # quiet times beta: 0.35-0.60
# noisy times beta: 0.15-1.4
Omicron: 1 # Feedforward cancellation factor
pWaveSpeed: 600 # m/s
sWaveSpeed: 300 # m/s
TestMassHeight: 1.5 # m
RayleighWaveSpeed: 250 # m/s
pWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
sWaveLevel: 45 # Multiple of the Peterson NLNM amplitude
Atmospheric:
AirPressure: 101325 # Pa
AirDensity: 1.225 # kg/m**3
AirKinematicViscosity: 1.8e-5 # m**2/s
AdiabaticIndex: 1.4 #
SoundSpeed: 344 # m/s
WindSpeed: 10 # m/s; typical value
Temperature: 300 # K
TempStructConst: 0.2 # K**2/m**(2/3);
TempStructExp: 0.667 #
TurbOuterScale: 100 # m
# TurbEnergyDissRate: 0.01 # m**2/s**3
KolmEnergy1m: 1 # Kolmogorov energy spectrum at 1/m [m**2/s**2]
Suspension:
Type: 'Quad'
......