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] (http://nbviewer.ipython.org/urls/raw.github.com/keflavich/pvextractor/master/examples/IRAS05358Slicing.ipynb) (for a permanent, compiled version, look here)

Powered by Astropy Badge

Powered by Astropy Badge

Minimal Install Instructions

pip install https://github.com/ericmandel/pyds9/archive/master.zip
pip install https://github.com/radio-astro-tools/spectral-cube/archive/master.zip
pip install https://github.com/radio-astro-tools/pvextractor/archive/master.zip

The pvextractor GUI

Run it like this:

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

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.

Source Distribution

pvextractor-0.3.tar.gz (1.5 MB view details)

Uploaded Source

File details

Details for the file pvextractor-0.3.tar.gz.

File metadata

  • Download URL: pvextractor-0.3.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.63.0 importlib-metadata/3.10.0 keyring/23.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0

File hashes

Hashes for pvextractor-0.3.tar.gz
Algorithm Hash digest
SHA256 a54e986760cef6b186e02d1c3d98d7e1c18e4e75c5d0b71343b5ff59fd9c09c3
MD5 10ea0f356c9f7b196a31d6fb01828646
BLAKE2b-256 279d923db2956a4c23d4b16c4ba64c9d295b9c9e594cc08d043616a2c5c1738b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page