Closed NiloofarSharei closed 10 months ago
Hi @NiloofarSharei . Very strange. A few questions for you (apologies if these are very trivial):
VERSPYP
, and you can get the version of the code by typing pypeit_version
on the command line.pypeit_show_2dspec
?HDUList.info
output? Something like
% python
Python 3.9.15 (main, Oct 11 2022, 22:25:13)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from astropy.io import fits
>>> hdu = fits.open('spec2d_b24-Feige66_KASTb_20150520T041246.960.fits')
>>> hdu.info()
Filename: spec2d_b24-Feige66_KASTb_20150520T041246.960.fits
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 213 ()
1 DET01-SCIIMG 1 ImageHDU 29 (350, 2048) float32
2 DET01-IVARRAW 1 ImageHDU 27 (350, 2048) float32
3 DET01-SKYMODEL 1 ImageHDU 27 (350, 2048) float32
4 DET01-OBJMODEL 1 ImageHDU 27 (350, 2048) float32
5 DET01-IVARMODEL 1 ImageHDU 27 (350, 2048) float32
6 DET01-TILTS 1 ImageHDU 27 (350, 2048) float64
7 DET01-SCALEIMG 1 ImageHDU 26 (1,) float32
8 DET01-WAVEIMG 1 ImageHDU 27 (350, 2048) float64
9 DET01-BPMMASK 1 ImageHDU 29 (350, 2048) int16
10 DET01-SLITS 1 BinTableHDU 52 1R x 10C [1K, 2048D, 2048D, 2048D, 2048D, 2048D, 1I, 1I, 1D, 1D]
11 DET01-WAVESOL 1 BinTableHDU 50 1R x 11C [K, K, D, D, D, D, K, 21A, D, D, D]
12 DET01-SCI_SPEC_FLEXURE 1 BinTableHDU 32 1R x 2C [K, D]
13 DET01-MED_CHIS 1 ImageHDU 26 (1,) float32
14 DET01-STD_CHIS 1 ImageHDU 26 (1,) float32
15 DET01-DETECTOR 1 BinTableHDU 61 1R x 19C [K, K, L, L, D, D, D, D, D, D, D, D, K, 2D, 2D, 28A, 28A, K, 3A]
>>>
Thanks!
Hi @kbwestfall . Thanks for getting back to me. The answer to your questions are: 1) Not sure. But in the first few days it was working and I had this warning: [WARNING] :: datamodel.py 1438 from_hdu() - Current version of SpecObj object in code (1.1.10) does not match version used to write your HDU(s)! I still have the same warning, but it does not show me anything and I get a blank page. But before that I was getting images. 2) yes. I am using pypeit_show_2dspec 3) yes it opens with astropy and here is the output:
from astropy.io import fits ...: ...: hdu = fits.open('/Users/neal/Documents/PhD/RESEARCH/spectra-inspection/Keck/H22A05/spec2d_d0618_0055-d0618_0071-EDFN_gc12687.fit ...: s') ...:
In [7]: hdu.info()
Filename: /Users/neal/Documents/PhD/RESEARCH/spectra-inspection/Keck/H22A05/spec2d_d0618_0055-d0618_0071-EDFN_gc12687.fits
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 515 ()
1 MSC01-SCIIMG 1 ImageHDU 17 (2097, 8549) float32
2 MSC01-IVARRAW 1 ImageHDU 17 (2097, 8549) float32
3 MSC01-SKYMODEL 1 ImageHDU 17 (2097, 8549) float32
4 MSC01-OBJMODEL 1 ImageHDU 17 (2097, 8549) float32
5 MSC01-IVARMODEL 1 ImageHDU 17 (2097, 8549) float32
6 MSC01-TILTS 1 ImageHDU 17 (2097, 8549) float64
7 MSC01-SCALEIMG 1 ImageHDU 16 (1,) float32
8 MSC01-WAVEIMG 1 ImageHDU 17 (2097, 8549) float64
9 MSC01-BPMMASK 1 ImageHDU 29 (2097, 8549) int16
10 MSC01-SLITS 1 BinTableHDU 52 17R x 11C [1K, 1K, 1D, 8549D, 8549D, 8549D, 8549D, 1I, 1I, 1D, 1D]
11 MSC01-MASKDEF_DESIGNTAB 1 BinTableHDU 70 17R x 16C [K, K, D, D, D, D, D, I, K, D, D, 32A, D, 32A, D, D]
12 MSC01-DETECTOR 1 BinTableHDU 60 2R x 17C [K, K, L, L, D, D, D, D, D, K, D, D, K, 3A, 2D, D, 9D]
13 MSC02-SCIIMG 1 ImageHDU 17 (2175, 8168) float32
14 MSC02-IVARRAW 1 ImageHDU 17 (2175, 8168) float32
15 MSC02-SKYMODEL 1 ImageHDU 17 (2175, 8168) float32
16 MSC02-OBJMODEL 1 ImageHDU 17 (2175, 8168) float32
17 MSC02-IVARMODEL 1 ImageHDU 17 (2175, 8168) float32
18 MSC02-TILTS 1 ImageHDU 17 (2175, 8168) float64
19 MSC02-SCALEIMG 1 ImageHDU 16 (1,) float32
20 MSC02-WAVEIMG 1 ImageHDU 17 (2175, 8168) float64
21 MSC02-BPMMASK 1 ImageHDU 29 (2175, 8168) int16
22 MSC02-SLITS 1 BinTableHDU 52 18R x 11C [1K, 1K, 1D, 8168D, 8168D, 8168D, 8168D, 1I, 1I, 1D, 1D]
23 MSC02-MASKDEF_DESIGNTAB 1 BinTableHDU 70 18R x 16C [K, K, D, D, D, D, D, I, K, D, D, 32A, D, 32A, D, D]
24 MSC02-DETECTOR 1 BinTableHDU 60 2R x 17C [K, K, L, L, D, D, D, D, D, K, D, D, K, 3A, 2D, D, 9D]
25 MSC03-SCIIMG 1 ImageHDU 17 (2117, 8305) float32
26 MSC03-IVARRAW 1 ImageHDU 17 (2117, 8305) float32
27 MSC03-SKYMODEL 1 ImageHDU 17 (2117, 8305) float32
28 MSC03-OBJMODEL 1 ImageHDU 17 (2117, 8305) float32
29 MSC03-IVARMODEL 1 ImageHDU 17 (2117, 8305) float32
30 MSC03-TILTS 1 ImageHDU 17 (2117, 8305) float64
31 MSC03-SCALEIMG 1 ImageHDU 16 (1,) float32
32 MSC03-WAVEIMG 1 ImageHDU 17 (2117, 8305) float64
33 MSC03-BPMMASK 1 ImageHDU 29 (2117, 8305) int16
34 MSC03-SLITS 1 BinTableHDU 52 17R x 11C [1K, 1K, 1D, 8305D, 8305D, 8305D, 8305D, 1I, 1I, 1D, 1D]
35 MSC03-MASKDEF_DESIGNTAB 1 BinTableHDU 70 17R x 16C [K, K, D, D, D, D, D, I, K, D, D, 32A, D, 32A, D, D]
36 MSC03-DETECTOR 1 BinTableHDU 60 2R x 17C [K, K, L, L, D, D, D, D, D, K, D, D, K, 3A, 2D, D, 9D]
37 MSC04-SCIIMG 1 ImageHDU 17 (1821, 8204) float32
38 MSC04-IVARRAW 1 ImageHDU 17 (1821, 8204) float32
39 MSC04-SKYMODEL 1 ImageHDU 17 (1821, 8204) float32
40 MSC04-OBJMODEL 1 ImageHDU 17 (1821, 8204) float32
41 MSC04-IVARMODEL 1 ImageHDU 17 (1821, 8204) float32
42 MSC04-TILTS 1 ImageHDU 17 (1821, 8204) float64
43 MSC04-SCALEIMG 1 ImageHDU 16 (1,) float32
44 MSC04-WAVEIMG 1 ImageHDU 17 (1821, 8204) float64
45 MSC04-BPMMASK 1 ImageHDU 29 (1821, 8204) int16
46 MSC04-SLITS 1 BinTableHDU 52 13R x 11C [1K, 1K, 1D, 8204D, 8204D, 8204D, 8204D, 1I, 1I, 1D, 1D]
47 MSC04-MASKDEF_DESIGNTAB 1 BinTableHDU 70 13R x 16C [K, K, D, D, D, D, D, I, K, D, D, 32A, D, 32A, D, D]
48 MSC04-DETECTOR 1 BinTableHDU 60 2R x 17C [K, K, L, L, D, D, D, D, D, K, D, D, K, 3A, 2D, D, 9D]
Hi @NiloofarSharei
Based on this:
1. Not sure. But in the first few days it was working and I had this warning: [WARNING] :: datamodel.py 1438 from_hdu() - Current version of SpecObj object in code (1.1.10) does not match version used to write your HDU(s)! I still have the same warning, but it does not show me anything and I get a blank page. But before that I was getting images.
I expect it's a version issue. I would first try to revert your pypeit version to the one used to reduce the data. Using the same approach you used to print the contents of your spec 2d file, you should be able to get the version by printing hdu[0].header['VERSPYP']
. If the version is, say, 1.12.2
, you should be able to revert your version by running pip install pypeit==1.12.2
.
The other option is to keep the current pypeit version and re-reduce the data. We always encourage people to re-reduce their data when they install a new version of pypeit, both to avoid these backwards compatibility issues and so that the reduction benefits from code improvements.
Please let us know if you try either of these and you still have problems!
Thanks @kbwestfall . So I used this: hdu[0].header['VERSPYP']. The version was 1.13.0 Then i used : pip install pypeit==1.13.0 to revert my version. The problem is still there and I get a blank page when trying to open 2d spectra.
Hmm... Odd. Do you still get the warning about the SpecObj
version? Regardless, I think you're only option now is to re-reduce the data.
No I dont get that warning any more, but still does not show me anything. Ok. Thanks . I try that
Hi @NiloofarSharei . I'm going to close this issue, but please re-open if you're still having issues after re-reducing the data.
I have a macbook with M2pro chip and macos:14.1.1 I have installed pypeit with pip and it was working fine and I was working with 2d spectras. Suddenly, it stopped working though! and just opens a blank page with no error. I tried uninstalling it and installing it again with conda. It was installed succesfully and even opens the test file as mentioned in the instructions. But still shows a blank page when I want to open 2d spec.(I am attaching a picture of this blank page). I even tried installing previous version of pypeit, but did not solve the problem.