pypeit / PypeIt-development-suite

8 stars 11 forks source link

Question about the data reduction for Keck Lris Blue. #289

Closed fgscc closed 1 year ago

fgscc commented 1 year ago

Before I reduce my own data by using pypeit code, I reduce the examples offered by the official website (https://drive.google.com/drive/folders/1115sllFpwy-hojv4EiJU9x3n1dJ2hNV3). The code works well, and I can obtain the spectrum. However, when I reduce my own data, the code reports one problem:

( File "/Users/chenchun/anaconda3/envs/pypeit/lib/python3.11/site-packages/pypeit/spectrographs/keck_lris.py", line 359, in get_rawimage msgs.error("Found {:d} files matching {:s}".format(len(fil))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: Replacement index 1 out of range for positional args tuple)

The full description is displayed in the attachment. I checked the code spectrographs/keck_lris.py and spectrographs/spectrograph.py. It seems like the code cannot find the reduction file (I guess).

I’d like to show the .pypeit file for both my own data and the example data. Since my own data is lack of bias files (and I don’t have to process the bias), I set parameters use_biasimage = False.

So, how can I solve this problem? Thanks for reading questions.

problem my_own_data example_data
kbwestfall commented 1 year ago

Hi @fgscc, I think this is tripping a bug in one of our error messages. But my guess is that the root of the problem is that you have both compressed and uncompressed versions of the file in your raw data directory. If you move or delete one of these files, the code should run.

fgscc commented 1 year ago

Great!!! The problem has been solved and I have obtained the spectrum! Thank you so much for the reply!  

------------------ 原始邮件 ------------------ 发件人: "pypeit/PypeIt-development-suite" @.>; 发送时间: 2023年9月21日(星期四) 晚上11:40 @.>; @.**@.>; 主题: Re: [pypeit/PypeIt-development-suite] Question about the data reduction for Keck Lris Blue. (Issue #289)

Hi @fgscc, I think this is tripping a bug in one of our error messages. But my guess is that the root of the problem is that you have both compressed and uncompressed versions of the file in your raw data directory. If you move or delete one of these files, the code should run.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

fgscc commented 1 year ago

Besides, may I ask one more question?

LRIS observations have been stored in multi- extension FITS files with four extensions. But when I check the .txt files from the output files, I can only find the description like det01 and det02. Does det01 means the extensions (1,2) of the original data, and det02 means the extensions (3,4) of the original data?

截屏2023-09-22 15 11 43
kbwestfall commented 1 year ago

Hi @fgscc,

The four extensions in the Keck/LRISb output files are for each amplifier, two per detector. When PypeIt reads the LRISb data, it constructs the full detector image by combining the data from each associated amplifier. In this case, yes, the DET01 data are from the combination of extensions 1,2, and DET02 data are from extensions 3,4.

fgscc commented 1 year ago

Ok, I see. And thank you so much for the answer!

发自我的iPhone

------------------ Original ------------------ From: Kyle Westfall @.> Date: Fri,Sep 22,2023 10:41 PM To: pypeit/PypeIt-development-suite @.> Cc: fgscc @.>, Mention @.> Subject: Re: [pypeit/PypeIt-development-suite] Question about the datareduction for Keck Lris Blue. (Issue #289)

Hi @fgscc,

The four extensions in the Keck/LRISb output files are for each amplifier, two per detector. When PypeIt reads the LRISb data, it constructs the full detector image by combining the data from each associated amplifier. In this case, yes, the DET01 data are from the combination of extensions 1,2, and DET02 data are from extensions 3,4.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

kbwestfall commented 1 year ago

Happy to help!