pip install git+https://github.com/AlexKurek/ds9crop
in not working!
Install using pip:
git clone https://github.com/AlexKurek/ds9crop.git
cd ds9crop/
sudo pip install .
or manually (deprecated but working):
git clone https://github.com/AlexKurek/ds9crop.git
cd ds9crop/
sudo python setup.py install
and add it to DS9 like any other analysis commands (http://ds9.si.edu/doc/ref/analysis.html).
git clone https://github.com/AlexKurek/ds9crop.git
cd ds9crop/
pip install .
Note that the .ds9 file is copied to ~/.local/ds9/
instead of /usr/local/ds9/
.
Start DS9 e.g. like this:
ds9 /patchToFITSfile/file.fits -xpa unix -regions shape box -scale limits -0.001 0.01 &
Create a box- or circle shaped region and simply press 'x' to save it as both FITS and 16-bit png files. ds9crop will try to connect to the DS9 instance via the XPA server to get the current scale limits. If this doesn't work, <-0.001, 0.01> will be set in the saved png file and in both popup windows.