Skip to main content

Meteoroid Ablation Models

metablate provides meteoroid ablation and atmospheric-entry models, MSIS atmospheres, material presets, and plasma-density calculations.

Install

Install the latest published release:

pip install metablate

The bleeding-edge version is available with:

pip install git+https://github.com/danielk333/ablate.git

or trough cloning this repo.

Minimal ablation example

Run the Kero–Szasz (2008) model with a cometary meteoroid and the default AtmPymsis atmosphere:

import numpy as np
from spacecoords import frames

import metablate.material as mat
import metablate.models.kero_szasz_2008 as ks

lat, lon = 67.0, 20.0
position = frames.geodetic_wgs84_to_ecef(lat, lon, 100e3, degrees=True)
direction = frames.azel_to_ecef(lat, lon, az=10, el=-45, degrees=True)

model = ks.KeroSzasz2008(
    options=ks.KeroSzaszOptions(
        material=mat.cometary,
        atmosphere_kwargs=dict(as_dataset=False),
    ),
)
result = model.run(
    parameters=ks.KeroSzaszInitialState(
        epoch=np.datetime64("2018-06-28T12:45:33"),
        position_ecef=position,
        velocity_ecef=direction * 60e3,
        mass=1e-6,
    ),
)
print(f"Runtime: {result.runtime:.3f} s")

Positions and velocities use ECEF coordinates in metres and metres per second; mass is in kilograms. Results include time, mass, velocity, temperature and position.

Atmospheres and computation

AtmPymsis calls the Fortran extensions supplied by pymsis, with MSIS 2.1 by default. ODE models use atmosphere.total_density(...), which returns a NumPy array of total mass density in kg/m^3. density(...) also provides species data and temperature; e.g. sputtering calculation uses this full output. Historical solar and geomagnetic indices are downloaded when needed and cached within their three-hour interval. Custom atmospheres can override total_density for speed; its default implementation extracts "Total" from density.

AtmMSISE00 is optional and requires the separate msise00 package and a Fortran compiler; see its installation instructions.

Some functions use Numba to speed up subsequent calls. The first call compiles the kernels, which are cached for subsequent runs. Set NUMBA_DISABLE_JIT=1 to run the same formulas in Python for debugging.

Examples

See docs/examples for e.g. ablation, fireball, alpha–beta and plasma examples. For example, after a repository checkout, generate an ablation sweep with:

python docs/examples/ablation_sweep.py --output ablation_sweep.png

Which produces this plot:

Kero-Szasz ablation sweep

Development

From a repository checkout:

pip install -e .[tests]
# or pip install -e .[develop] for all dev packages
pytest

Metadata

Release files for metablate 0.7.0

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

Source distribution (sdist)

Source distribution for metablate 0.7.0
File Size Uploaded Provenance Actions
metablate-0.7.0.tar.gz 81.2 kB Without provenance Details for metablate-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 160.1 kB

Release files / metablate-0.7.0.tar.gz

Download URL metablate-0.7.0.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b3e1c96a076ad8594614eba97bd60d31caa68dab7d10e4f5cb1d334acb2b81bb
BLAKE2b-256 checksum
How to use checksums
3de809cdbd7d87772c7e9f927cc1bb78a4f6da5168aa0cf3d5a244545c96229a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / metablate-0.7.0-py3-none-any.whl

Download URL metablate-0.7.0-py3-none-any.whl
Size 78.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5df0a896840341dc4eb557822807c213cb871004a81dde03af3d1fdd427c3d9
BLAKE2b-256 checksum
How to use checksums
3a48aee1b613d5f95faea71bc5623475ecb404b5e4a8e5a51d4526df1375033a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for metablate 0.7.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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