Any way to make ds9 save *complete* RGB image?
Ray Butler wrote on Apr 28, 2009
Hi,
I have discovered that I can automatically make perfectly colour-balanced RGB composites in ds9 - much better than even my old statistics-based scripts which used color.rgbsun. For my particular data, setting scale to (sqrt, 98%) for all 3 channels gets the result I want. The problem is that ds9's "save image" only saves what's visible on screen - so I either lose all my resolution (zoom = "to fit") or most of my field of view (zoom = 1).
My question is, is there any way to get the RGB output to a file for the *complete* image at its full resolution? I fiddled with ds9 command line options...no joy. Does XPA offer any way? This would be FANTASTIC if it were possible.
Thanks,
Ray
I have discovered that I can automatically make perfectly colour-balanced RGB composites in ds9 - much better than even my old statistics-based scripts which used color.rgbsun. For my particular data, setting scale to (sqrt, 98%) for all 3 channels gets the result I want. The problem is that ds9's "save image" only saves what's visible on screen - so I either lose all my resolution (zoom = "to fit") or most of my field of view (zoom = 1).
My question is, is there any way to get the RGB output to a file for the *complete* image at its full resolution? I fiddled with ds9 command line options...no joy. Does XPA offer any way? This would be FANTASTIC if it were possible.
Thanks,
Ray
Mike Fitzpatrick wrote on Apr 28, 2009
AFAIK, ds9 provides a 'saveimage' XPA point that lets you save the visible part of the screen in a variety of formats, and a 'savefits' access point to save the entire frame buffer as a FITS file (however it flips the image when it does it). The latter is equivalent to using TVMARK to read back the frame buffer and specifying an 'outimage' parameter in that the saved pixel values are the 0-200 colormap index values and there is no colormap information. You can contact Bill Joye (wjoye@cfa.harvard.edu) to request adding this feature, but I don't think you can do it currently.
An alternative to look at is the EXPORT task in the DATAIO package. It will allow you to apply functions such as sqrt to the pixels and weight various colors when creating an output image (e.g. you could save a colormapped GIF or a 24-bit Sun rasterfile). The advantage is it works on the entire image, but you'll probably need to play with the scaling to get the same effect. See the help page (and especially examples) for details.
-Mike
An alternative to look at is the EXPORT task in the DATAIO package. It will allow you to apply functions such as sqrt to the pixels and weight various colors when creating an output image (e.g. you could save a colormapped GIF or a 24-bit Sun rasterfile). The advantage is it works on the entire image, but you'll probably need to play with the scaling to get the same effect. See the help page (and especially examples) for details.
-Mike
Ray Butler wrote on Apr 28, 2009
Thanks, Mike. So ds9/XPA can't do it - I was almost resigned to that before I posted.
I did consider the EXPORT task too - the sqrt option does part of what I need (or
IMFUNCTION could do this too), but what about the automatic percentile scaling (98% etc. in ds9)? Perhaps Bill Joye might give me the scaling algorithm he uses in ds9, so that I can script that part myself, and let EXPORT do the rest. I'll ask him.
Ray
I did consider the EXPORT task too - the sqrt option does part of what I need (or
IMFUNCTION could do this too), but what about the automatic percentile scaling (98% etc. in ds9)? Perhaps Bill Joye might give me the scaling algorithm he uses in ds9, so that I can script that part myself, and let EXPORT do the rest. I'll ask him.
Ray
James Long wrote on Apr 28, 2009
If you have photoshop, check out the "Fits Liberator" from the ESA. That is what I use to make all of my pretty pictures.
http://www.spacetelescope.org/projects/fits_liberator/download_v22.html
http://www.spacetelescope.org/projects/fits_liberator/download_v22.html
Frank Winkler wrote on Apr 28, 2009
Hi,
I'm not certain that I understand what you want to do, but if it is simply to capture at high resolution a larger image than you can display on your screen, you can define a larger display size in ds9: Frame --> Frame parameters --> Set display size. This will allow you to define a bigger frame than you actually see, and then you can save the resulting image using Print (to file) to get a .ps image. (I think you can do save the image other ways as well.)
good luck! Paco
I'm not certain that I understand what you want to do, but if it is simply to capture at high resolution a larger image than you can display on your screen, you can define a larger display size in ds9: Frame --> Frame parameters --> Set display size. This will allow you to define a bigger frame than you actually see, and then you can save the resulting image using Print (to file) to get a .ps image. (I think you can do save the image other ways as well.)
good luck! Paco
Last post on Apr 28, 2009