View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

How to copy fits binary table

Guest wrote on Mar 23, 2009

Dear all,

I want to copy a fits binary table made up of image header and spectral data. If I do:

ttools> cp filename.fit test1

It copies only the table entries without the image header.
If I do:

ttools> imcopy filename.fit test2

It copies only the image header without the table entries. Is there another way to do this?
Thanks.
Siti :)

Mike Fitzpatrick wrote on Mar 23, 2009

If it's a basic FITS binary table, try the TCOPY task in TABLES.TTOOLS.

-Mike

Guest wrote on Mar 23, 2009

HI Mike,

Since 'tcopy' task copies file extensions, I did

ttools>  tcopy filename.fit[1] test1 or
ttools>  tcopy filename.fit test2

It only copies the 1st extension that is the table entries. The image header is not copied even when I do:

ttools>  tcopy filename.fit[0]  test0

The image header is in extension 0.

I think I will just have to copy the unpacked filename.gz to whatever directory I want and gunzip it there. Thanks anyway.

Siti

Francisco Valdes wrote on Mar 23, 2009

A plain unix or IRAF copy should copy any file verbatim. The thing I notice is that you should always include the file extension with a file copy command. What may be happening is that after you copy the file without the extension then try and look at the content with some task, such as tedit, it gets confused without the appropriate extension. So the copy may be correct but when you are examining it may seem as if something is missing. So


unix> cp filename.fit test1.fit
iraf> copy filename.fit test1.fit


I would be nervous about using .fit instead of .fits because the latter is more standard.

There may be more to it that this but that is my reading of your mail.

Frank

Guest wrote on Mar 23, 2009

Hi Frank,

1. You are absolutely correct! :D I should have written "test1.fit" instead of just "test1". Now everything is copied as expected.

2. As for the "fit", it is not my choice as the files come with that extension. So far it does what it is supposed to do. I am afraid if doing a "imrename" would mess it up.

3. Since I am talking to you, I might as well say this. I noticed that you sometimes advice the user eg in
http://iraf.net/phpBB2/viewtopic.php?t=88487
not to do any rejection even if there are cosmic rays. Even though I have gone through basic Iraf course, we didn't cover any "cleaning/rejection" so everything I do by trial and error. From my previous discussion with you, I know when to use avsigclip/ccdclip/crreject that is based on noise parameters. Is there some guideline in terms of astronomy applications when to use different combinations of average with minmax or median with minmax or median with none etc.? It would be good if the help pages say something about the astronomy as well. Sorry if this sounds trivial 2 you.

Thanks.

Learning astronomy

Francisco Valdes wrote on Mar 23, 2009

Hello Siti,

It would be nice to put more usage discussion in the documentation but the limitations of our time require us to basically document only the algorithms and leave it to the scientist to decide what is best for their data.

The way we have tried to help new scientists is with a help desk and, now, with this public forum that others, like you, can search.

So I sympathize but ...

Yours,
Frank

Guest wrote on Mar 23, 2009

Hello Frank et al.,

Good news is that my noisy Iraf spectra has become some sort of a beautiful swan after smoothing with some other software. It does better with the theory than I expected. Thanks to all of you...

Siti :D

Last post on Mar 23, 2009