Skip to main content

YTMoments

Description

YT Moments is a yt subpackage (https://yt-project.org/) to generate moment maps of simulation data, typically of galaxies.

Examples

Usage Example:

ds = yt.load(filename)

geo = ytmoments.ViewingGeometry(d_obs = [0, 1, 1])
ytmoments.add_derived_fields(ds, geo)

mommaps = ytmoments.get_moment_maps(ds, ds.all_data(), geo, width_kpc=40)
stars = ytmoments.get_stellar_mommaps(ds, geo, width_kpc=40)

Mock datacube with user-set velocity channels:

# Channels from -300 to 300 km/s, 10 km/s wide, same projection as the moment maps
cube = ytmoments.make_datacube(ds, ds.all_data(), geo,
    vmin=-300, vmax=300, dv=10, width_kpc=40, img_width=250)

cube.plot_channels(every=3)
mms = cube.to_moment_maps()        # MomentMaps from the channelised data
cube.writeto("cube.fits")          # FITS cube with velocity WCS + CHANNELS table

# Optional line broadening (thermal for HI, plus 5 km/s turbulence)
cube = ytmoments.make_datacube(ds, ds.all_data(), geo, -300, 300, 10,
    thermal_broadening=True, species_mass_amu=1.0, sigma_kms=5.0)

From the command line (same snapshot handling as gen_moments):

gen_cube TOPDIR OUTDIR DX DY DZ VMIN VMAX DV --size 250 --width 40 --tcut 10000

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

If you have any questions, feel free to reach out at harrison.souchereau@yale.edu. Feel free to submit a pull request if you have suggestions to modify or improve the code.

Metadata

Release files for ytmoments 1.0.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 ytmoments 1.0.0
File Size Uploaded Provenance Actions
ytmoments-1.0.0.tar.gz 16.2 kB Without provenance Details for ytmoments-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 35.6 kB

Release files / ytmoments-1.0.0.tar.gz

Download URL ytmoments-1.0.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3c53591a6197b82b2fde69aac5186fa708476bb0cc5765a823e985469381bf52
BLAKE2b-256 checksum
How to use checksums
e6a3ec845e738d7a3eda5d405723e98fe5d8e7083b3b119f94c7908b20d88718
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / ytmoments-1.0.0-py3-none-any.whl

Download URL ytmoments-1.0.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c778a479e635144f126691aac2b61e7eaa940a3a735aac8ed18052098b74df8
BLAKE2b-256 checksum
How to use checksums
eb6608e3f5c0224c25a52ac1b6c572a7dda2c77e5900e8d4a1c812d7228b9493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for ytmoments 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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