Subject: Negative bitpix values and SAOIMAGE

From: gottsch at mikro.ee.tu-berlin.de (Gert Gottschalk)
Date: 8 Mar 1993 15:46:34 GMT

Hi there,

I am using saoimage (under X11r5) to view fitsimages. Now it seems that
the 16 Bit that saoimage reads are signed (-32768 ... +32767). This gives
me some trouble with colormaps and their manipulation. (I can't get to
a Backgroundsignal of 0) 

Is there a simple tool that eats fits format tells me the pixelrange and
transforms this range into a usersupplied new range (preferrably linear) 
and writes out a new fits file with the new range ?

greetings,

Gert Gottschalk

---

From: alberto at cfa203.HARVARD.EDU (Alberto Accomazzi)
Date: 9 Mar 93 18:44:50 GMT

> me some trouble with colormaps and their manipulation. (I can't get to

Did you try
$ saoimage -fits -min 0 -max 32767 -linear file.fits
(you can make the max be whatever you want to be).
If you want to interpret the data as unsigned (overriding the standard
FITS interpretation) you can try:
$  saoimage -u2 cols rows -min min_val -max max_val -skip header_size file.fits
where header_size is a multiple of 2880.

> and writes out a new fits file with the new range ?

IRAF can do that.  Look at the help pages on imstatistics and imarith
in the images package.

 - Alberto

==========
Alberto Accomazzi              Harvard-Smithsonian Center for Astrophysics
alberto at cfa.harvard.edu        60 Garden Street, MS 39
(617) 495-7076                 Cambridge, MA  02138  USA