Skip to main content

This package aims to extend any quasi-circular waveform with complex features.

Project description

qcextender

qcextender is a Python package for extending and unifying gravitational waveform generation across libraries such as PyCBC, lalsimulation, and SXS.
It provides a shared interface for handling metadata, performing unit conversions between dimensionless and physical (SI) representations, and managing consistent waveform transformations and match calculations.

The goal is to make it straightforward to load, compare, and analyze waveforms from different sources under a consistent, physically meaningful framework.


Installation

Using uv

uv pip install git+https://github.com/aminrouanserik/qcextender.git

Quick Example

import matplotlib.pyplot as plt
from qcextender.waveform import Waveform
from qcextender.dimensionlesswaveform import DimensionlessWaveform

# Waveform parameters
mass1 = mass2 = 25
distance = 10
f_lower = 20
inclination, coa_phase = 0, 0
kwargs = {
    "mass1": mass1,
    "mass2": mass2,
    "inclination": inclination,
    "coa_phase": coa_phase,
    "delta_t": 1.0 / 4096,
    "f_lower": f_lower,
    "f_ref": 25,
    "distance": distance,
}

phenom = Waveform.from_model("IMRPhenomD", [(2, 2)], **kwargs)

# Load simulation and scale to SI units
sim = DimensionlessWaveform.from_sim("SXS:BBH:1155")
sim10sm = sim.to_Waveform(f_lower, mass1 + mass2, distance, inclination, coa_phase)

# Plot strain
plt.plot(phenom.time, phenom[2, 2], label="IMRPhenomD")
plt.plot(sim10sm.time, sim10sm[2, 2], label="SXS:BBH:1155")
plt.xlabel("Time (s)")
plt.ylabel("Strain (m)")
plt.legend()
plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qcextender-0.4.7.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qcextender-0.4.7-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file qcextender-0.4.7.tar.gz.

File metadata

  • Download URL: qcextender-0.4.7.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for qcextender-0.4.7.tar.gz
Algorithm Hash digest
SHA256 7de6b478f2b5cf1f40b6be404c764d2b8d9da4bca15031dcdb71acea562114ea
MD5 4236bfc6b854cf9ba279f9a5c163b0c6
BLAKE2b-256 b0bb100c3e6be86504aedf303c6c9385ce422324e7a408357ec0164dfc645c52

See more details on using hashes here.

File details

Details for the file qcextender-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: qcextender-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for qcextender-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3623a60c2ac375f41dfdf2e61b22b615f0315b9768253cd9e84c8ed139c2f25d
MD5 a6b9510a4fde8587543f420692263a3d
BLAKE2b-256 f8654dee40bdaae84b6aa9dabf1f259ec98d6a3c2715c1ce2a04b9b66696f261

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page