Skip to main content

Position-velocity diagram extractor.

Project description

Position-Velocity Diagram Extractor

Full docs are available here

Tool to slice through data cubes and extract position-velocity (or other) slices.

There are a few utilities related to header trimming & parsing. Otherwise, there’s one main function, pvextractor, that takes a data cube and a series of points and returns a PV array. It is based on scipy’s map_coordinates but also has .

For an example use case, see [this notebook] ( (for a permanent, compiled version, look here)

Powered by Astropy Badge

Powered by Astropy Badge

Minimal Install Instructions

pip install
pip install
pip install

The pvextractor GUI

Run it like this:

from pvextractor.gui import PVSlicer
pv = PVSlicer('L1448_13CO.fits')

Click to select “control points” along the path, then press “enter” to expand the width of the slice, then click. Optionally, “y” will show the exact regions extracted.

Using pvextractor in ds9

There is a python script that will be installed along with pvextractor. You can invoke it from the command line, but the preferred approach is to load the tool into ds9. First, determine the path to ds9_pvextract.ans; it is in scripts/ds9_pvextract.ans. Then start up ds9 with the analysis tool loaded

ds9 -analysis load /path/to/pvextractor/scripts/ds9_pvextract.ans  &

Then load any cube in ds9, draw a line, and press ‘x’ or press “PV Extractor” in the menu.

Example DS9 use

Example DS9 use

Build and coverage status

Build Status Coverage Status Bitdeli badge

Project details

Download files

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

Files for pvextractor, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pvextractor-0.2-py3-none-any.whl (31.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pvextractor-0.2.tar.gz (1.5 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page