Functions to measure the height of optically thick emission, or photosphere, using the method presented in Pinte et al. (2018), then use this information to reproject images into arbitrary angles. Very much a work in progress.
Currently the only way to install this is by cloning the repository then installing a local version.
$ git clone https://github.com/richteague/diskprojection.git
$ cd diskprojection
$ pip install .
This has a couple of dependencies, namely astropy and GoFish, which should be installed automatically if you don't have them.
# import the package
from diskprojection import disk_observation
# load up the observations
disk = disk_observation('path/to/imagecube.fits')
# grab the emission surface
r, z, Fnu, v = disk.get_emission_surface(inc=30.0, PA=35.0)
# make some cuts to get rid of poor points
r, z, Fnu, v = disk.clip_emission_surface(r, z, Fnu, v, min_Fnu=0.05)
# apply an iterative sigma clipping to remove noise
r, z, Fnu, v = disk.iterative_clip_emission_surface(r, z, Fnu, v)
A more comprehensive document will be coming soon.
Part of the code uses detect_peaks.py
from Marcos Duarte.