A fast and robust Python package for fitting quasar spectra
Project description
qsospec
qsospec fits UV, optical, and near-infrared quasar spectra. It provides
coverage-aware emission-line recipes, continuum decomposition, optional pPXF
host subtraction, QA figures, and resumable Parquet run bundles.
Installation
python -m pip install qsospec
For host-galaxy decomposition:
python -m pip install "qsospec[host]"
Minimal example
import qsospec
spectrum = qsospec.Spectrum.from_arrays(
wavelength,
flux,
err=uncertainty,
z=redshift,
wave_frame="observed",
flux_unit="cgs",
ra=ra,
dec=dec,
)
result = qsospec.fit_object_to_store(
spectrum,
"runs/my-quasar",
object_id="my-quasar",
global_config=qsospec.GlobalContinuumConfig(
power_law=qsospec.PowerLawConfig(mode="auto"),
),
write_qa=True,
)
result.show_qa()
Uncorrected spectra are dereddened by default with Planck GNILC and the
Fitzpatrick (1999) law. This requires locally configured
dustmaps
data; already-corrected spectra can be declared with
galactic_extinction_corrected=True.
Features
- Single or automatically selected broken power-law continua, Fe II, and a continuous Balmer pseudo-continuum.
- Lyα/N V, C IV, C III], Mg II, Balmer, optical, and NIR line complexes.
- Optional pPXF host decomposition for quasars at
z < 1.2. - Notebook-friendly and saved QA figures.
- Shared single-object and parallel batch run format.
See the documentation for setup, workflows, model definitions, examples, and API reference.
qsospec is distributed under the
GPLv3 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qsospec-0.1.1.tar.gz.
File metadata
- Download URL: qsospec-0.1.1.tar.gz
- Upload date:
- Size: 851.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a8e2573a256163505708cb3899c7d9a0eb4acaeae0a055d14e5f45b92192706
|
|
| MD5 |
e62f034d34fb945c59cb4af433a2fa42
|
|
| BLAKE2b-256 |
d65476edb8c7e4e40bc46a5ce6da48c1db7d8d275868f63df0ef6a9beddeb98a
|
Provenance
The following attestation bundles were made for qsospec-0.1.1.tar.gz:
Publisher:
python-publish.yml on rudolffu/qsospec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qsospec-0.1.1.tar.gz -
Subject digest:
0a8e2573a256163505708cb3899c7d9a0eb4acaeae0a055d14e5f45b92192706 - Sigstore transparency entry: 1909672881
- Sigstore integration time:
-
Permalink:
rudolffu/qsospec@d1176f77b6b98cf6d025d255c4b0a6d6b55140f7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rudolffu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d1176f77b6b98cf6d025d255c4b0a6d6b55140f7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qsospec-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qsospec-0.1.1-py3-none-any.whl
- Upload date:
- Size: 346.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a66cfc60c96c1491f0a9d01ffb02cd3f3d9669e314f1c90709ed6bef7129768
|
|
| MD5 |
420ede96e313797ec7ec776e1bff954a
|
|
| BLAKE2b-256 |
12c45ea02d35521d5ca96928634ed89ae305cc73f6400ffcc7f1e3e47a49b55c
|
Provenance
The following attestation bundles were made for qsospec-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on rudolffu/qsospec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qsospec-0.1.1-py3-none-any.whl -
Subject digest:
8a66cfc60c96c1491f0a9d01ffb02cd3f3d9669e314f1c90709ed6bef7129768 - Sigstore transparency entry: 1909673006
- Sigstore integration time:
-
Permalink:
rudolffu/qsospec@d1176f77b6b98cf6d025d255c4b0a6d6b55140f7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rudolffu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d1176f77b6b98cf6d025d255c4b0a6d6b55140f7 -
Trigger Event:
release
-
Statement type: