Code Monkey home page Code Monkey logo

pvextractor's Introduction

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

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

Build and coverage status

Build Status Coverage Status Bitdeli badge

pvextractor's People

Contributors

keflavich avatar astrofrog avatar adamginsburg avatar bitdeli-chef avatar bsipocz avatar low-sky avatar bluescarni avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.