FrequencySeries๏ƒ

Stability: Stable

What it is๏ƒ

Use FrequencySeries for one frequency-domain spectrum with GWexpy fitting, statistics, filtering, and plotting extensions.

Representative Signatures๏ƒ

FrequencySeries(data, unit=None, f0=None, df=None, frequencies=None, ...)
FrequencySeries.ifft(...)

Minimal Example๏ƒ

from gwexpy.frequencyseries import FrequencySeries
import numpy as np

fs = FrequencySeries(np.ones(128), df=1.0, unit="V / Hz")
phase = fs.phase()

API Reference๏ƒ

The detailed generated API continues below on this page.

Inherits from: gwpy.frequencyseries.FrequencySeries

Extended FrequencySeries with gwexpy analysis and interop features.

See Frequency Series for the API reference.

Physical Context๏ƒ

FrequencySeries represents a single-channel frequency-domain quantity. Use it for complex FFT outputs, PSD/ASD estimates, transfer functions, response functions, or any spectrum where each bin corresponds to one frequency interval.

  • Relation to time-domain data: many FrequencySeries objects come from TimeSeries.fft(), psd(), asd(), or csd(). That means df, window length, and averaging assumptions are inherited from upstream time-domain processing.

  • Unit semantics: the unit depends on what the spectrum represents. ASD may be strain / sqrt(Hz), PSD may be strain2 / Hz, while response functions may carry ratios such as m / V or count / N.

  • Complex-valued meaning: real, imag, phase(), and unwrap_phase() are not just numerical helpers. They are often the quantities used to interpret delay, resonance, causality, and control-loop phase margin.

Analysis Notes๏ƒ

Fix what kind of spectrum you have first๏ƒ

The same container can hold an amplitude spectrum, PSD, ASD, or a complex transfer function. The interpretation changes with that choice.

  • use ASD/PSD language when comparing noise floors

  • use transfer/response-function language when comparing input-output relations

  • if you want to return to a waveform with ifft(), check the FFT convention and Hermitian assumptions first

FFT conventions and normalization still matter๏ƒ

Because the object is already in the frequency domain, normalization mistakes are easy to hide. Before comparing with another code path or a paper figure, check:

  1. one-sided vs two-sided spectrum

  2. whether window correction is included

  3. amplitude quantity vs power quantity

  4. what reference is used before converting to dB

Use FFT_Conventions as the baseline.

Common misreadings๏ƒ

  1. comparing ASD and PSD as if they were the same observable

  2. adding or subtracting to_db() values as though they were linear amplitudes

  3. reading wrapped phase as a physical jump

  4. interpreting linewidth or resonance Q without checking df and averaging setup

Where to go next๏ƒ

Pickle / shelve portability๏ƒ

Warning

Never unpickle data from untrusted sources. pickle/shelve can execute arbitrary code on load.

gwexpy pickling prioritizes portability: unpickling returns GWpy types so that loading does not require gwexpy to be installed.