Metadata-Version: 2.4
Name: ytmoments
Version: 1.0.0
Summary: Moment Map Generations of Volumetric Simulation Data
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: astropy
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: yt==4.4.2
Dynamic: license-file

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:

.. code-block:: python

        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:

.. code-block:: python

        # 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.
