-
Notifications
You must be signed in to change notification settings - Fork 3
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
Error on command line option with Gemini GMOS 2D spectrum #11
Comments
Hi Karun, Thanks for providing the sample file, which helps identify the problem. It turns out that this file's SCI extension name is a string with extra spaces in it. I found out by checking its header info in DS9. So I managed to process the file successfully with the following command (note the quotation marks to include the two spaces) --
Then you should be able to check the processed file in the "cosmic_conn_output" directory --> Open as "Multiple Extension Frames" --> the CR mask is appended in a new frame with the extension "CR_PROBABILITY". If this is a common issue in other GMOS fits as well, I will make a simple update in the package to handle this. Thanks for reporting the issue! Best, |
Great, thanks a lot, CY! Given this header issue in the GMOS fits, and perhaps with fits files from other instruments too, perhaps, after reading the header of each fits extension, Cosmic-cnn could use, sci_header.strip() before comparing? I am sure you have a neater way of addressing this On a related note, why didn't the option, -e 2 for extension 2 not work? just curious? |
Great, thanks a lot, CY! Given this header issue in the GMOS fits, and perhaps with fits files from other instruments too, perhaps, after reading the header of each fits extension, Cosmic-cnn could sci_header.strip() before comparing? I am sure you have a neater way of addressing this
On a related note, why didn't the option, -e 2 for extension 2 not work? just curious?
thx
karun
…________________________________
From: CY Xu ***@***.***>
Sent: Wednesday, April 5, 2023 3:30:44 PM
To: cy-xu/cosmic-conn
Cc: Karun Thanjavur; Author
Subject: Re: [cy-xu/cosmic-conn] Error on command line option with Gemini GMOS 2D spectrum (Issue #11)
Hi Karun,
Thanks for providing the sample file, which helps identify the problem.
It turns out that this file's SCI extension name is a string with extra spaces in it. I found out by checking its header info in DS9. So I managed to process the file successfully with the following command (note the quotation marks to include the two spaces) --
cosmic-conn -i tgsqgsS20221115S0065.fits -e "SCI "
Then you should be able to check the processed file with DS9 or another software you like --> Open as "Multiple Extension Frames" --> the CR mask is appended in a new frame with the extension "CR_PROBABILITY".
[Screenshot 2023-04-05 at 3 21 02 PM]<https://user-images.githubusercontent.com/24612082/230225840-b15b4b94-2f80-4f47-83e1-ebcd15160a33.png>
If this is a common issue in other GMOS fits as well, I will make a simple update in the package to handle this.
Thanks for reporting the issue!
Best,
CY
—
Reply to this email directly, view it on GitHub<#11 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB4RODK7BQYTSWQ7RQSHUYDW7XXBJANCNFSM6AAAAAAWTTKOQQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi karun, sorry for the late reply. We had a baby girl four weeks ago, and I am behind on many things. What you suggested seems like a straightforward fix. Please feel free to make a pull request! Also please suggest other features or improvements to make the tool easier for you and other astronomers! Thanks! Best, |
Hi Chengyuan
I am testing Cosmic-Conn for CR masking on Gemini-S GMOS 2D spectrum
When I tried the command line option:
INFO:root:Initializing Cosmic-CoNN CR detection ground_imaging model...
INFO:root:...GPU or CUDA not detected, using CPU (slower).
INFO:root:...training on CPU is not recommended.
INFO:root:ground_imaging model initialized.
1 FITS found in cr_tst
ERROR:root:No valid data found in extention 0, 1 or SCI, to specify extension name: -e SCI.
GMOS fits has the SCI extension in extension 2. I tried -e 2, but still no success
I have posted the 2D spectrum at:
https://www.astro.uvic.ca/~karun/tgsqgsS20221115S0065.fits
if you wish to try
pls advise. I also embedded cosmic-conn in a py script, but am getting a different error, will post it as a separate issue
thx
karun
The text was updated successfully, but these errors were encountered: