Skip to main content

midas-distortion

Canonical MIDAS radial-distortion model — the single source of truth for the detector distortion layout and the v1↔v2 coefficient mapping, shared by:

  • midas-calibrate-v2 — fits the distortion (v2 canonical names).
  • midas-peakfit — applies it to spot geometry (numpy).
  • midas-transforms — applies it to spot geometry (torch).

Model

Multiplicative factor on the projected radius R (with ρ = R / RhoD, η' = 90° − η):

D(ρ, η) = 1
    + iso_R2·ρ² + iso_R4·ρ⁴ + iso_R6·ρ⁶              (isotropic)
    + a1·ρ⁴·cos( η' + phi1)                           (1-fold; ρ⁴ is a v1 quirk)
    + a2·ρ²·cos(2η' + phi2)
    + a3·ρ³·cos(3η' + phi3)
    + a4·ρ⁴·cos(4η' + phi4)
    + a5·ρ⁵·cos(5η' + phi5)
    + a6·ρ⁶·cos(6η' + phi6)

The legacy v1 ordering (p0..p14, phases scattered) is v1_term_layout(); v1↔v2 reindexing is exact (v1_to_v2_coeffs / v2_to_v1_coeffs).

Backend-agnostic kernel

distortion_factor(R_norm, eta_deg, p_coeffs, terms=...) dispatches cos / ones_like on the input's own array library, so numpy and torch consumers evaluate bit-for-bit the same model (up to floating-point reassociation).

import numpy as np
from midas_distortion import distortion_factor, v1_term_layout, v1_to_v2_coeffs

p_v1 = np.zeros(15)          # legacy paramstest p0..p14
D = distortion_factor(R/RhoD, eta_deg, p_v1, terms=v1_term_layout())
# …or convert once and use the v2 layout (default):
D = distortion_factor(R/RhoD, eta_deg, v1_to_v2_coeffs(p_v1))

Download files

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

Source Distribution

midas_distortion-0.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

midas_distortion-0.2.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file midas_distortion-0.2.0.tar.gz.

File metadata

  • Download URL: midas_distortion-0.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for midas_distortion-0.2.0.tar.gz
Algorithm Hash digest
SHA256 90d03683f22a635fbd12a5ad101174b2e286f47e00b3f46269bff91b41823224
MD5 4a04a61196beba6e459945b7a9d6e16a
BLAKE2b-256 b3d092fef153d06f5cb99b4c80b60abe04acd8769418cbc72b76adcb6ea90f20

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_distortion-0.2.0.tar.gz:

Publisher: python-packages.yml on marinerhemant/MIDAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file midas_distortion-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for midas_distortion-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93b843d47241088c31fd01bb334ceed79e68a32f65db9624d24813d4686b0311
MD5 3589a52bd7bbcddc7847861053b8420e
BLAKE2b-256 9d2f52ff7244bc370f64a2595f5812693fdfce74c1d9b10f57ec85aa6a29815e

See more details on using hashes here.

Provenance

The following attestation bundles were made for midas_distortion-0.2.0-py3-none-any.whl:

Publisher: python-packages.yml on marinerhemant/MIDAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

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