Development documentation · 0.2.3 30c2f8ba · Intro examples tested with 0.2.3 · Version details · Known limitations

GWexpy#

GWexpy

Analyze experimental data with units, timestamps, and channel names.

Compare multiple channels and save figures with the code and settings needed to reproduce them. GWexpy extends GWpy with matrix and field containers, noise generation, fitting, and connections to scientific Python libraries.

Start Here →

Start from your background#

Choose a route that uses what you already know. Each first lesson states its prerequisites and the result you will produce.

Beginner

New to Python or signal analysis? Run a script, understand its variables, and read your first time-series and ASD plots.

Your first analysis
GW Experimentalist

Know channels, sampling, and spectra? Map familiar experimental concepts to Python objects, then analyze a pair of channels.

Familiar concepts in Python
Commissioner (DiagGUI · ndscope · Virgo dataDisplay)

Bring an interactive analysis workflow into a reproducible script: read channels, select a time span, plot ASD and coherence, and save the settings.

Commissioner: from GUI to a saved analysis
Scientific Python User

Start with NumPy arrays and dictionaries. Attach sampling, start time, and units, then calculate spectra for all channels together.

From scientific Python to GWexpy
GWpy User

Use familiar GWpy concepts and explore the added containers, analysis methods, and I/O through concrete migration examples.

GWexpy for GWpy Users
GWexpy User

Go directly to a task recipe, a case study, or the API reference for your next analysis.

How-to guides

Try a multi-channel ASD#

After installation, this complete example generates two synthetic channels and saves asd.png. It needs no data download or optional packages.

from gwexpy.noise.wave import gaussian, sine
from gwexpy.timeseries import TimeSeriesDict

settings = dict(duration=16, sample_rate=512, t0=0, unit="V")
tone = sine(frequency=40, **settings)
channels = TimeSeriesDict(
    {
        "Sensor A": tone + gaussian(std=0.3, seed=10, **settings),
        "Sensor B": tone + gaussian(std=0.8, seed=20, **settings),
    }
)
spectra = channels.asd(fftlength=2, overlap=1, window="hann", method="welch")
plot = spectra.plot(xlim=(1, 256), ylabel=r"ASD [V/$\sqrt{\mathrm{Hz}}$]")
plot.gca().legend()
plot.savefig("asd.png")

Run the example and see the expected figure.

Browse the documentation#

The documentation follows Diátaxis: lessons for learning, recipes for tasks, reference for lookup, and explanation for context.

Tutorials

Follow a guided lesson and produce a working analysis.

Tutorials
How-to guides

Solve a specific analysis problem or adapt a case study.

How-to guides
Reference

Look up containers, methods, parameters, and supported file formats.

Reference
Explanation

Understand the data model, analysis conventions, and design decisions.

Explanation

For corresponding GWpy APIs, default finite numerical results, sample selection, axis information, and successful completion remain GWpy-compatible. Intentional divergence from these guarantees requires explicit user opt-in, except for a named, human-approved safety exception satisfying all policy gates. See the GWpy compatibility policy.

For contribution, testing, and release information, use the Developer guide.