A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Astronomy and Astrophysics » FITS
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

question about imcopy.c



 
 
Thread Tools Display Modes
  #1  
Old August 26th 08, 05:31 PM posted to sci.astro.fits
[email protected]
external usenet poster
 
Posts: 3
Default question about imcopy.c

Hi all,
I am a brand new user of CFITSIO and still in the learning stage.
I got confused when I tried to use the imcopy.c

According to Page 46 of CFITSIO reference guide from
http://heasarc.gsfc.nasa.gov/FTP/sof...o/c/cfitsio.ps

imcopy infile.fit ’outfile.fit[compress R 100,100; q 10.0]’

should use tile compression and quantization scale of 10.
However when I try the above on the imcopy provided in

http://heasarc.gsfc.nasa.gov/docs/so...mples/imcopy.c
the above does not work.
I get the error
"FITSIO status = 125: parse error in input file URL"
It works when get rid of "q" , but this assumes noise bits = 10 rather
than the quantization scale.
This means that I am looking at either outdated reference manual or
the using the outdated
version of imcopy.c? Could someone let me know where is the latest
version of imcopy.c
and the CFITSIO reference manual?
Thanks
Shantanu
  #2  
Old August 27th 08, 02:45 PM posted to sci.astro.fits
William Pence[_2_]
external usenet poster
 
Posts: 44
Default [fitsbits] question about imcopy.c

I think the problem is that you are using an old version of CFITSIO.
The 'q' syntax was added fairly recently, so get the new 3.100 version
of CFITSIO and try again. If you still have problems send me a private
email.

In addition, the old imcopy program is obsolete and has been replaced by
a new pair of FITS image compression/uncompression programs called fpack
and funpack. These utility programs are analogous to gzip and gunzip,
but are optimized for astronomical images so they are faster and produce
smaller compressed files. These utilities were developed in
collaboration with Rob Seaman (NOAO) and Rick White (STScI). They are
available at http://heasarc.gsfc.nasa.gov/docs/so.../fitsio/fpack/
and are also bundled in with the CFITSIO 3.100 distribution.

Bill Pence

wrote:
Hi all,
I am a brand new user of CFITSIO and still in the learning stage.
I got confused when I tried to use the imcopy.c

According to Page 46 of CFITSIO reference guide from
http://heasarc.gsfc.nasa.gov/FTP/sof...o/c/cfitsio.ps

imcopy infile.fit ’outfile.fit[compress R 100,100; q 10.0]’

should use tile compression and quantization scale of 10.
However when I try the above on the imcopy provided in

http://heasarc.gsfc.nasa.gov/docs/so...mples/imcopy.c
the above does not work.
I get the error
"FITSIO status = 125: parse error in input file URL"
It works when get rid of "q" , but this assumes noise bits = 10 rather
than the quantization scale.
This means that I am looking at either outdated reference manual or
the using the outdated
version of imcopy.c? Could someone let me know where is the latest
version of imcopy.c
and the CFITSIO reference manual?
Thanks
Shantanu

  #3  
Old August 27th 08, 10:23 PM posted to sci.astro.fits
[email protected]
external usenet poster
 
Posts: 3
Default question about imcopy.c

Thanks for the info. I have one question. When I look at the tile
compressed
image file with fv , how do I find out the value of ZSCALE and ZZERO
for each pixel?
In the original image the values of the pixels are 500.296875,
494.3046875
etc when I use fv to look at the image.
When I looked at the tiled compressed image, the vales for the same
are
-32267.6708622559 and -32273.7009830322. Obviously these have been
scaled from the original pixel values using ZSCALE and ZZERO. How do I
find out these values?
Here is what the header fir the tiled compressed image says :
TFIELDS = 4 / number of fields in each row
TTYPE1 = 'COMPRESSED_DATA' / label for field 1
TFORM1 = '1PB(10726)' / data format of field: variable length
array
TTYPE2 = 'UNCOMPRESSED_DATA' / label for field 2
TFORM2 = '1PE(0) ' / data format of field: variable length
array
TTYPE3 = 'ZSCALE ' / label for field 3
TFORM3 = '1D ' / data format of field: 8-byte DOUBLE
TTYPE4 = 'ZZERO ' / label for field 4
So presumably the values of ZSCALE and ZZERO are in the third and
fourth
field. But how do/can I get these values for each pixel?
Any information on this will be appreciated.
Thanks
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISS question John Doe Space Station 0 October 19th 07 09:46 AM
Celestron CG-5 GT question (GEM question in general) Paul Murphy Amateur Astronomy 10 December 13th 05 06:58 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good OM History 0 April 22nd 05 08:37 AM
Question... Allen Misc 5 January 26th 05 12:04 AM
Question Steve Austin History 26 May 24th 04 07:18 AM


All times are GMT +1. The time now is 03:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 SpaceBanter.com.
The comments are property of their posters.