Optical scattering

The gwdetchar.scattering module provides a suite of tools designed to look for evidence of optical scattering in the LIGO detectors. This tool finds the velocity of a set of optics as measured by optical position sensors and electromagnetic drivers (OSEMs), then compares against the wavelength of a carrier laser to estimate the fringe frequency. For more information about this method, please see Accadia et al. (2010).

The gwdetchar.scattering module provides the following functions:

get_fringe_frequency(series[, multiplier]) Predict scattering fringe frequency from the derivative of a timeseries


OSEMs directly measure only the translational (linear) motion of optics, typically on the scale of microns. To measure velocity, gwdetchar.scattering uses a Savitzky-Golay filter to take smoothed time derivatives.

The gwdetchar.scattering.plot module also provides functions for comparing fringe frequency projections against high-resolution Q-transform spectrograms:

plot.spectral_comparison(gps, qspecgram, …) Compare a high-resolution spectrogram with projected fringe frequencies
plot.spectral_overlay(gps, qspecgram, …[, …]) Overlay scattering fringe projections on top of a high-resolution spectrogram

Command-line utilities

GWDetChar provides two command-line utilities for optical scattering; one is designed to identify time periods when scattering is likely, the other compares projected fringe frequencies against a high-resolution spectrogram of gravitational-wave strain.


These utilities require authentication with LIGO.ORG credentials for archived frame data access.


The gwdetchar-scattering tool searches over a standard list of OSEM measurements within a user-specified time range for evidence of optical scattering. The simplest usage is as follows:

gwdetchar-scattering -i <interferometer> <gps-start-time> <gps-end-time>

For example,

gwdetchar-scattering -i H1 1126259442 1126259502

For a full explanation of the available command-line arguments and options, you can run

$ gwdetchar-scattering --help
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/gwdetchar/envs/stable/bin/gwdetchar-scattering", line 62, in <module>
    tex_settings = get_gwpy_tex_settings()
  File "/home/docs/checkouts/readthedocs.org/user_builds/gwdetchar/envs/stable/lib/python3.7/site-packages/gwdetchar/plot.py", line 52, in get_gwpy_tex_settings
    rcParams.get('text.latex.preamble', []) + GWPY_TEX_MACROS),
TypeError: can only concatenate str (not "list") to str


The gwdetchar.scattering can also be run as a command-line module to compare fringe frequency projections against gravitational-wave strain at a specific time. The simplest usage is similar to gwdetchar-scattering, but with only a single time:

python -m gwdetchar.scattering -i <interferometer> <gps-time>

For a full explanation of the available command-line arguments and options, you can run

$ python -m gwdetchar.scattering --help
usage: __main__.py [-h] [-V] -i IFO [-d DURATION] [-t FREQUENCY_THRESHOLD]
                   [-w PRIMARY_CHANNEL] [-W PRIMARY_FRAMETYPE]
                   [-a AUX_FRAMETYPE] [-o OUTPUT_DIR] [-c COLORMAP]

Simple command-line interface to gwdetchar.scattering This module scans
through records of optic motion and projects scattering fringe frequencies.
For those channels with fringes above a user-specified threshold, a plot is
created comparing the fringes to a high-resolution Q-scan spectrogram. To
identify time segments where scattering is likely, please use the command-line
script: `gwdetchar-scattering --help`

positional arguments:
  gpstime               GPS time or datestring to analyze

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -i IFO, --ifo IFO     IFO prefix for this analysis, default: None
  -d DURATION, --duration DURATION
                        Duration (seconds) of analysis, default: 60
                        critical fringe frequency threshold (Hz), default: 15
                        harmonic numbers to plot projected motion for, should
                        be given as a comma-separated list of numbers,
                        default: 1,2,4,8
                        frequency multiplier to use when applying --frequency-
                        threshold, default: 4
                        name of primary channel (without IFO prefix), default:
                        frametype from which to read primary channel, default:
  -a AUX_FRAMETYPE, --aux-frametype AUX_FRAMETYPE
                        frametype from which to read aux channels, default:
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Output directory for analysis, default: .
  -c COLORMAP, --colormap COLORMAP
                        name of colormap to use, default: viridis