Combine spectra by forward modelling
Project description
Install
To get frizzy wit it:
uv add frizzle
Getting Started
You should see the documentation for a worked example with plots, the most useful keyword arguments, and for why forward modeling beats interpolation.
If you want a quick crash course, here we will combine eight Doppler-shifted spectra of the same source onto a common output grid:
import numpy as np
from frizzle import frizzle
from frizzle.test_utils import make_one_dataset
R = 1.35e5
x_min, x_max = 8.7000, 8.7025
# generate eight synthetic spectra at slightly different Doppler shifts
xs, ys, ivars, bs, delta_xs, _ = make_one_dataset(
dx=1 / R, snr=12, random_seed=17, x_min=x_min, x_max=x_max,
)
# output wavelength grid
λ_out = np.arange(x_min + 1 / R, x_max, 1 / R)
# concatenate everything into 1-D arrays for frizzle
λ = np.hstack([xs - dx for dx in delta_xs])
flux = np.hstack(ys)
ivar = np.hstack(ivars)
mask = ~np.hstack(bs).astype(bool) # True = drop this pixel
# combine
y_star, C_star, flags, meta = frizzle(λ_out, λ, flux, ivar, mask)
Authors
- David W Hogg (NYU) (MPIA) (Flatiron)
- Andy Casey (Monash) (Flatiron)
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 frizzle-0.2.7.tar.gz.
File metadata
- Download URL: frizzle-0.2.7.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66f3143bcddc65313a14038a328623cc159a7c1c8c0fd4de54ef3407d370770a
|
|
| MD5 |
570cab592ae8c2359603349141fb1e85
|
|
| BLAKE2b-256 |
1225f366463c24500196ee681d5153d1d19c848aa9ca864dd98f4ade4e7e6e42
|
Provenance
The following attestation bundles were made for frizzle-0.2.7.tar.gz:
Publisher:
publish.yml on davidwhogg/frizzle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frizzle-0.2.7.tar.gz -
Subject digest:
66f3143bcddc65313a14038a328623cc159a7c1c8c0fd4de54ef3407d370770a - Sigstore transparency entry: 1418053055
- Sigstore integration time:
-
Permalink:
davidwhogg/frizzle@6131541f78df77321ddc99c7a81ad83be7a6d9f2 -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/davidwhogg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6131541f78df77321ddc99c7a81ad83be7a6d9f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file frizzle-0.2.7-py3-none-any.whl.
File metadata
- Download URL: frizzle-0.2.7-py3-none-any.whl
- Upload date:
- Size: 8.7 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 |
e3c949289eecd8dd794c48a4afa7a20d1f46e07ab68ac950a533cd96a8f7eedd
|
|
| MD5 |
a06fd7ba11245af357bcce535d73c03a
|
|
| BLAKE2b-256 |
e9d94a77ea4e36fc9e9aa77290ed1a31a2126887155ad59c8dc4272a28dd80d4
|
Provenance
The following attestation bundles were made for frizzle-0.2.7-py3-none-any.whl:
Publisher:
publish.yml on davidwhogg/frizzle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frizzle-0.2.7-py3-none-any.whl -
Subject digest:
e3c949289eecd8dd794c48a4afa7a20d1f46e07ab68ac950a533cd96a8f7eedd - Sigstore transparency entry: 1418053058
- Sigstore integration time:
-
Permalink:
davidwhogg/frizzle@6131541f78df77321ddc99c7a81ad83be7a6d9f2 -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/davidwhogg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6131541f78df77321ddc99c7a81ad83be7a6d9f2 -
Trigger Event:
push
-
Statement type: