Welcome to iraf.net Wednesday, May 08 2024 @ 11:21 PM GMT


 Forum Index > Archives > Sitemail Archives
  32 bit real data FITS images
   
Anonymous: Guest
 06/27/1990 04:47PM (Read 518 times)  



I am a student working at the Harvard/Smithsonian Center for
Astrophysics this summer. I have to read many FITS images into
iraf on a network of suns here. The FITS data is apparenty 32-bit
floating data, according to the image headers. However, when I use
rfits, I seem to always get an error after reading the file:
ERROR: Fatal error while closing magtape file
Nevertheless a file is read into my image directory. The header
created states that the minimum data value is -2.147481E9,
and the max=2.147481E9. The FITS header quotes datamax and
datamin values like 3.081981E4, 6.253827E0. When I try to
display the image with z1 and z2 that I set, I on a SUN IMTOOL
a field of values z1, with images of stars at z2, with no
intermediate values. When I allow display to scale values, I get
an image on the IMTOOL that makes sense, but the numbers are
nonsensical and only vary in the least significant displayed
digit (I believe with an E6 tacked on to the end).
I also used minmax to check the data in the file read by
rfits, and likewise get the min and max quoted above with the
exponent of 9.
I have tried all acceptable types in the datatype field
of rfits with no change in result. First, is the "double"
datatype 32-bit floating? Second, what could I be doing wrong
in trying to read these files into iraf? And, finally, what can
I do to get iraf to handle these data? Thank you very much for your
time and effort. I hope to hear from you soon.
Murray Silverstone
murray@cfa209.harvard.edu

 
Anonymous: Guest
 06/27/1990 04:47PM  



Hello Murray, The error you report when running RFITS could indicate a real tape
error. What sort of device are you reading from? Is it a 1/2" magtape or
perhaps an Exabyte cartridge? Are you reading multiple files when you see
the error or only a single file? I think this error is extraneous to the
scaling problem in the data, but we should try to understand it. From the minmax values in the output image, it seems that the values
on tape are not getting scaled when read from the tape. Rather they span the
full range of 32 bit integers. I suspect the FITS tape has 32 bit integers
and you are disabling scaling when you read the tape. Look at the FITS
header; you can specify "make=no" when running RFITS and the output image
won't be created as the header is printed. The FITS header contains a
keyword BITPIX. Is this keyword equal to 32 or -32? What about BSCALE and
BZERO? If the RFITS parameter "scale=yes", these scaling parameters will be
applied to the FITS data. You can reset the RFITS task to default parameters
with:
cl> unlearn rfits
Then, if you have a 32 bit integer FITS tape, the default RFITS parameters
will create a 32-bit real IRAF image on output applying the scaling as
indicated with BSCALE and BZERO. If you'd like to continue this discussion, please send me a copy of the
FITS header and a list of the RFITS parameters you are using. You can
get the parameter list with the command:
cl> dpar rfits > rfits.dparI'd also like to know what version of IRAF you're running - V2.9? The
"show version" CL command will give you this information.Suzanne

 
Anonymous: Guest
 06/27/1990 04:47PM  



Murray, Thanks for sending the FITS header, it tells alot. When you WROTE
the FITS tape with WFITS, your data were scaled such that:
real_datavalue = tape_datavalue * BSCALE + BZERO
Scaling the data is the default; the scaling scaling parameters BSCALE and
BZERO get recorded in the FITS header so the scaling can be reversed when
the data are subsequently read from tape. This scaling is done very precisely,
so that the original data values can be recovered within the machine precision.
The data are scaled so they span the full range of a 32-bit integer. Integers
are much more portable than floating point values and until recently were
the only format allowed by the FITS standard. The RFITS task reads the integer FITS data, applies the scaling
parameters and writes out an IRAF image (in your case with a 32-bit real
pixels). If you turn off scaling, RFITS doesn't apply BSCALE and BZERO and
so doesn't reverse the scaling done when you wrote the tape. So, you wrote
a very standard FITS tape and RFITS handles it correctly with the default
parameters. While BSCALE and BZERO appear in the FITS header, they are
not written by RFITS into the IRAF image header user area. I don't know why you are getting the error about closing the tape file.
This shouldn't be happening with a standard 1/2" tape drive. You could have
your IRAF site manager contact the IRAF group and we'll try to track this
down. You should also upgrade from the V2.9 BETA release to V2.9 EXPORT.
Your BETA release was last updated on March 14th, and several changes went
into the system after that date.Anyway, your RFITS problems are understood. Thanks for supplying all the
information.Suzanne

 
   

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login