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

Problem with wavelength calibration #12

Open
sousasag opened this issue Feb 15, 2017 · 3 comments
Open

Problem with wavelength calibration #12

sousasag opened this issue Feb 15, 2017 · 3 comments

Comments

@sousasag
Copy link

Wavelength solution of ThAr calibration spectra:

Traceback (most recent call last):
File "ferospipe.py", line 569, in
fref = ThAr_Ne_ref[sorted_ThAr_Ne_dates[0]]
IndexError: index 0 is out of bounds for axis 0 with size 0

I was trying to reduce some rather old FEROS data (Sep 2004). And from what I debugged from the code, it seems that the problem is connected with the WAVE files that I have for this data.

dfits *.fits | fitsort OBJECT "HIERARCH ESO DPR TYPE" "HIERARCH ESO INS CALMIRR2 ID" DATE | grep WAVE
FEROS.2004-09-20T19:40:45.367.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:40:49.888	
FEROS.2004-09-20T19:41:43.175.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:41:47.732	
FEROS.2004-09-20T19:42:47.432.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:43:04.059	
FEROS.2004-09-20T19:43:56.876.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:44:13.519	
FEROS.2004-09-20T19:45:16.194.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:45:47.588	
FEROS.2004-09-20T19:46:43.151.fits	WAVE         	WAVE                 	LAMP1                       	2004-09-20T19:47:14.934

During the classification of the files, it seems these WAVEs are stored some where, but then the wavelenght calibration seems to be only working when you have WAVEs with LAMP3.

Is this something that can be easily fixed?

@rabrahm
Copy link
Owner

rabrahm commented Feb 15, 2017

The default LAMP for FEROS is LAMP3 and LAMP1 is almost not used anymore. However, I think a possible workaround will be to slightly modify lines 234 and 238 of ferosutils.py:

if h[0].header['HIERARCH ESO INS CALMIRR2 ID'] == 'LAMP1':
to
if h[0].header['HIERARCH ESO INS CALMIRR2 ID'] == 'LAMP3':

and

elif h[0].header['HIERARCH ESO INS CALMIRR2 ID'] == 'LAMP3':
to
elif h[0].header['HIERARCH ESO INS CALMIRR2 ID'] == 'LAMP1':

@sousasag
Copy link
Author

Hi,

That did the trick. I wasn't sure if these different WAVE would required different procedure. Apparently not, which leads me to the question, why make the distinction on the file selection? I guess, for a given dataset you will either have LAMP1 or LAMP3.

And on another subject. Some question/sugestions:

  • Do you plan in the near future to produce a 1D spec, where you merge all the orders together
  • It would be nice to add an option to extract all the orders in FEROS, not only be stuck up to ~7000A.

Thanks!

@sousasag sousasag reopened this Feb 15, 2017
@ganesh1076
Copy link

Wavelength Calibration for PFS is not working properly or I am missing something.
I have a Lamp spectrum with binning '1x1' and 64 orders whereas in the ceres line list it has 66 orders.
Also, the orders in my data start from the 0th order 3896-3938 A and 63rd order from 6540-6611A. This is inverse in the line list for a lamp.
Can you please suggest to me how to get a proper wavelength solution?
Thanks.

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

No branches or pull requests

3 participants