Skip to main content

frizzle

Combine spectra by forward modeling (Hogg & Casey, 20xx).

Test Status Coverage Status Documentation Status

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)

Metadata

Release files for frizzle 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frizzle 0.2.8
File Size Uploaded
frizzle-0.2.8.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for frizzle 0.2.8
File Interpreter ABI Platform
frizzle-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / frizzle-0.2.8.tar.gz

Download URL frizzle-0.2.8.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cdfc20ef832cc2021a97941e27c3182fa0e2c8eae116cbc236c9db0c22b8e031
BLAKE2b-256 checksum
How to use checksums
9f3daaca3dcc480036115123cbe0c5e1867584dd9c0e903100f566bdd4fb0bca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 21, 2026.

Transparency log

Release files / frizzle-0.2.8-py3-none-any.whl

Download URL frizzle-0.2.8-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c1fb591998e0a7b72027004da33ee7b1c3be71c5424fb1b25ee084db2a9690
BLAKE2b-256 checksum
How to use checksums
34cf13459e5badd90c19842f8c065729053e4db92bf937584570b3bbb2e045c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page