Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iraf disptrans EXTVER error #100

Open
basriaz opened this issue Feb 28, 2020 · 6 comments
Open

iraf disptrans EXTVER error #100

basriaz opened this issue Feb 28, 2020 · 6 comments

Comments

@basriaz
Copy link

basriaz commented Feb 28, 2020

Is it possible to convert the wavelength scale to velocity scale for a MEF fits cube with dimensions [x,y,lambda] ?

When running disptrans,

disptrans diff_spec.fits test.fits angs

I get the error

Warning: Image header parameter not found (EXTVER)

I tried
hedit diff_spec.fits EXTVER 3 add+

But got the same error when running disptrans again.

@olebole
Copy link
Member

olebole commented Mar 2, 2020

This seems to be an ancient problem; see iraf.net#136539 from 2006:

My question concerned disptrans.
[…]
Input spectra (test0082):
Output spectra (vdim0082): vtest0082
Output dispersion units (km/s 2.12125 micron):
Warning: Image header parameter not found (EXTVER)As you see it crashes telling me that the image parameter EXTVER was not found.
I have no clue what that image parameter would mean or what value it should have.

The message about EXTVER is actually bogus due to the way iraf error recovery works and is masking the real error (usually a missing header keyword or parameter problem). To see the real error just add a dummy keyword EXTVER=1 to the image and run the task again, you'll then need to address the error reported which will be the real problem.
Note that EXTVER usually refers to multi-extension FITS files so the problem may just be that you need to add an extension number when calling the task (e.g. "disptrans test0082[1]"). Similar problems have also been reported when using a 2-D image, the solution there is to either SCOPY out a particular band/aperture, or use an image section. Hope this helps, I'll post a summary to a forum and you should followup there. Sorry again about the account problems, I see you have a login now.Cheers,
-Mike

Or from 1996 (iraf.net#101761):

Date: Mon, 14 Oct 96 16:13:21 MST
From: valdes (Frank Valdes)
To: hamann@c[…]u
Subject: Re: disptrans

Hello Fred,Your problem is that your data does not identify the units of the spectra; i.e. it does not know that the data is in angstroms. To fix this:

cl> wcsedit t076i222f unit angstroms 1 inter- update+

This will then define this data has being in angstroms. DISPTRANS will then know that you want to transform the angstroms to angstroms in vacuum.Let me know if you still have problems.Cheers,

Does this help you in some way?

@basriaz
Copy link
Author

basriaz commented Mar 2, 2020

I ran

cl> wcsedit diff_H2-2_12.fits unit micron 3 inter- update+

cl> disptrans diff_H2-2_12.fits[3] test.fits km/s 2.12 micron

There's no error but there's no output file created.

What am I missing? Why did it not write the output?

@olebole
Copy link
Member

olebole commented Mar 5, 2020

Can you attach the relevant header of the file?

@basriaz
Copy link
Author

basriaz commented Mar 6, 2020

header.txt

@olebole
Copy link
Member

olebole commented Mar 6, 2020

Thank you! I can't promise a schedule, but I will look into this.

@basriaz
Copy link
Author

basriaz commented Mar 11, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants