Perform Fourier de-noising of supernova spectra (Liu et al., 2016). Follows Finneran et al. (2024). See: https://arxiv.org/abs/2411.12574.
Project description
pyspecdenoise documentation
Python library for removing noise from supernova spectra using a Fourier method. Implemented by Gabriel Finneran at University College Dublin, Ireland.
Here is an example showing the input and result for a spectrum of SN2004gq (spectrum taken from WISeREP).
A full description of the tool is given here. Further information may be found in Finneran et al. (2024) (see below for details on how to cite this work!).
This algorithm is based on the procedure presented in Liu et al. (2016) (see their Appendix B). This is the first publicly available implementation of this algorithm written in Python.
An IDL version of this code is available from the original developers.
This package can be installed from PyPI using pip:
pip install pyspecdenoise
Full documentation is available here.
Issues can be logged here.
You can also contact me via email.
Basic description
- Rebin the spectrum on a log-wavelength axis.
- Resample spectrum into equal-width bins. Uses the smallest dispersion as the bin width.
- Take the FFT of the flux.
- Define the range of wavenumbers/velocities for spectral features (see notes); the FFT indices are determined using
k_lowandk_high. - Fit the magnitude (M) spectrum with a power law between
k_lowandk_high. - Compute
MEAN(M). k_noiseis the point of intersection between the power law fit andMEAN(M).- Set
M = 0fork > k_noise. - Invert FFT.
- Resample spectrum to the original linear grid.
Here is an example image showing the procedure used to determine k_noise (using the same spectrum of SN2004gq from WISeREP):
Notes:
kis related to the velocity of spectral features in the SN spectrum byk = c/v.kcan be chosen to exclude high and low velocity features that are likely not due to the SN.- The default values of
karek=300(3000 km/s) andk=3(100000 km/s) (Liu et al. 2016).
How to cite this code in your work
If you use pyspecdenoise in your work, please consider citing Finneran et al. (2024) (see below for bibtex).
I would also appreciate it if you could add an acknowledgment such as:
To remove noise from supernova spectra, this work has made use of \texttt{pyspecdenoise},
implemented by Gabriel Finneran and available at: \url{https://github.com/GabrielF98/fouriersmooth}.
@ARTICLE{2024arXiv241112574F,
author = {{Finneran}, Gabriel and {Martin-Carrillo}, Antonio},
title = "{Measuring the expansion velocities of broad-line Ic supernovae: An investigation of neglected sources of error in two popular methods}",
journal = {arXiv e-prints},
keywords = {Astrophysics - High Energy Astrophysical Phenomena},
year = 2024,
month = nov,
eid = {arXiv:2411.12574},
pages = {arXiv:2411.12574},
doi = {10.48550/arXiv.2411.12574},
archivePrefix = {arXiv},
eprint = {2411.12574},
primaryClass = {astro-ph.HE},
adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv241112574F},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
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 pyspecdenoise-1.0.4.tar.gz.
File metadata
- Download URL: pyspecdenoise-1.0.4.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4b979a5de4a49181450ddfdb8b7a9f72ef3d3681323cb2c71551961011086b4
|
|
| MD5 |
ee87d2c9ecda7fdb6a7347082b415dbc
|
|
| BLAKE2b-256 |
2149e606231f2d57f2eb97a641560932e40c6b16e2ba51eca580a84f059a1838
|
Provenance
The following attestation bundles were made for pyspecdenoise-1.0.4.tar.gz:
Publisher:
python-publish.yml on GabrielF98/fouriersmooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyspecdenoise-1.0.4.tar.gz -
Subject digest:
d4b979a5de4a49181450ddfdb8b7a9f72ef3d3681323cb2c71551961011086b4 - Sigstore transparency entry: 154288625
- Sigstore integration time:
-
Permalink:
GabrielF98/fouriersmooth@1300d1b828d60b5fad3b44d9b08770fa31100eda -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/GabrielF98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1300d1b828d60b5fad3b44d9b08770fa31100eda -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyspecdenoise-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pyspecdenoise-1.0.4-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4954dbf4b58d1ff570615b470e556787a447e86c63985e90a91292aa68828752
|
|
| MD5 |
97a2d2a2ae8bfe5a627c0c2d555975d0
|
|
| BLAKE2b-256 |
fa6d4534575a0163f62a9da6733e0e9bc11fcbad5bc711ab16c846acbc2707d7
|
Provenance
The following attestation bundles were made for pyspecdenoise-1.0.4-py3-none-any.whl:
Publisher:
python-publish.yml on GabrielF98/fouriersmooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyspecdenoise-1.0.4-py3-none-any.whl -
Subject digest:
4954dbf4b58d1ff570615b470e556787a447e86c63985e90a91292aa68828752 - Sigstore transparency entry: 154288626
- Sigstore integration time:
-
Permalink:
GabrielF98/fouriersmooth@1300d1b828d60b5fad3b44d9b08770fa31100eda -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/GabrielF98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1300d1b828d60b5fad3b44d9b08770fa31100eda -
Trigger Event:
release
-
Statement type: