Subject: Re: Negative bitpix values and SAOIMAGE

From: [email-masked] (Alberto Accomazzi)
Date: 9 Mar 93 18:44:50 GMT

>From article <[email-masked]>, by [email-masked] (Gert Gottschalk):
> 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) 

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.

> 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 ?

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
[email-masked]        60 Garden Street, MS 39
(617) 495-7076                 Cambridge, MA  02138  USA