Open codebreaker2 opened 3 years ago
Hi Crystal,
Hope you are doing well! Unfortunately, I am no longer working in astronomy and can’t continue support for CWITools.
I’m CC’ing two of the more experienced users of CWITools and co-developers here, Yuguang and Zeren are both also from the Caltech grad program and have used/worked on it some. Jess has used it also and may be able to help out also.
Since I’m here: a quick hack you can try is to replace the entire headers of the mcubes with the headers of the icubes - you may also want to make sure the data is float-type (not integer type). The script should be able to coadd those modified cubes as if they contained flux data.
Sorry I can't be of more help,
Best, Donal
On Wed, Jul 14, 2021 at 4:15 PM Crystal Martin @.***> wrote:
(1) How do I ask cwi_coadd to use the masked cubes? (Page 9 of O'Sullivan & Chen says this is possible.)
(2) Is it possible to coadd the mcubes so that I have a mask for the coadded cube? (I tried to combine the cropped mcubes, but the absence of BUNIT keyword causes errors. Manually adding a fake BUNIT keyword resolves the error in reduction.py, but then I got this error:
Aligning wavelength axes... Mapping pixels from input-->sky-->output frames. 50%|████████████████████████████████████████████████████████████████████████████████████████▎ | 10065/20160 [01:08<00:58, 173.66it/s]Traceback (most recent call last): File "/Users/cmartin/Software/kcwi/cwitools/cwitools/scripts/cwi_coadd.py", line 133, in if name=="main": main() File "/Users/cmartin/Software/kcwi/cwitools/cwitools/scripts/cwi_coadd.py", line 120, in main verbose=args.v File "/Users/cmartin/Software/kcwi/CWITools/cwitools/reduction.py", line 758, in coadd if "electrons" in f[0].header["BUNIT"]: File "/Users/cmartin/Software/anaconda/envs/astroconda37/lib/python3.7/site-packages/astropy/io/fits/header.py", line 156, in getitem card = self._cards[self._cardindex(key)] File "/Users/cmartin/Software/anaconda/envs/astroconda37/lib/python3.7/site-packages/astropy/io/fits/header.py", line 1716, in _cardindex raise KeyError(f"Keyword {keyword!r} not found.") KeyError: "Keyword 'BUNIT' not found."
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dbosul/cwitools/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELXHSG44GBY26EKFCQSIRTTXYK7LANCNFSM5AMMRUSA .
(1) How do I ask cwi_coadd to use the masked cubes? (Page 9 of O'Sullivan & Chen says this is possible.)
(2) Is it possible to coadd the mcubes so that I have a mask for the coadded cube? (I tried to combine the cropped mcubes, but the absence of BUNIT keyword causes errors. Manually adding a fake BUNIT keyword resolves the error in reduction.py, but then I got this error:
Aligning wavelength axes... Mapping pixels from input-->sky-->output frames. 50%|████████████████████████████████████████████████████████████████████████████████████████▎ | 10065/20160 [01:08<00:58, 173.66it/s]Traceback (most recent call last): File "/Users/cmartin/Software/kcwi/cwitools/cwitools/scripts/cwi_coadd.py", line 133, in
if name=="main": main()
File "/Users/cmartin/Software/kcwi/cwitools/cwitools/scripts/cwi_coadd.py", line 120, in main
verbose=args.v
File "/Users/cmartin/Software/kcwi/CWITools/cwitools/reduction.py", line 758, in coadd
if "electrons" in f[0].header["BUNIT"]:
File "/Users/cmartin/Software/anaconda/envs/astroconda37/lib/python3.7/site-packages/astropy/io/fits/header.py", line 156, in getitem
card = self._cards[self._cardindex(key)]
File "/Users/cmartin/Software/anaconda/envs/astroconda37/lib/python3.7/site-packages/astropy/io/fits/header.py", line 1716, in _cardindex
raise KeyError(f"Keyword {keyword!r} not found.")
KeyError: "Keyword 'BUNIT' not found."