Open calvarez17 opened 5 years ago
Carlos
Regarding this point, we don’t use templates anymore. The pipeline generates the driver files automatically
Luca
From: calvarez17 notifications@github.com Reply-To: Keck-DataReductionPipelines/MosfireDRP reply@reply.github.com Date: Sunday, November 25, 2018 at 9:21 PM To: Keck-DataReductionPipelines/MosfireDRP MosfireDRP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Keck-DataReductionPipelines/MosfireDRP] Longslit reduction issues (#128)
There is not K-band longslit driver template file with the pipeline distribution. Need to add TkAgg on the longslit template for Mac compatibility: matplotlib.use('TkAgg') Need to add Extract module to the longslit driver file: from MOSFIRE import Background, Combine, Detector, Flats, IO, Options, Rectify, Wavelength, Extract Need to add Extract at the end of longslit driver file: Extract.extract_spectra(maskname, band, width=3, interactive=(not noninteractiveflag)) Extraction does not work with longslit because maksname is of byte type b'long' and this makes it into the EPS filename: LONGSLIT-3x0.7_K_b'long'_eps.fits. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi Luca,
Thank you for the prompt reply.
I think the option AutoDriver does not work for K-band long slit in my case:
(mospy_2018_macos) mac-alvarez:K calvarez$ ls
Offset_-6_hd193193.txt Offset_-8_hd195500.txt Offset_-8_hip94663.txt Offset_6_hd193193.txt Offset_8_hd195500.txt Offset_8_hip94663.txt
(mospy_2018_macos) mac-alvarez:K calvarez$ mospy AutoDriver
2018-11-25 22:04:23,058 - MosfireDrpLog. <module> - INFO: 3.6.3 |Anaconda, Inc.| (default, Dec 5 2017, 17:30:25)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
2018-11-25 22:04:23,058 - MosfireDrpLog. <module> - INFO: python version = 3.6.3
2018-11-25 22:04:23,059 - MosfireDrpLog. <module> - INFO: numpy version = 1.13.3
2018-11-25 22:04:23,129 - MosfireDrpLog. <module> - INFO: matplotlib version = 2.1.1
2018-11-25 22:04:23,130 - MosfireDrpLog. <module> - INFO: astropy version = 2.0.3
2018-11-25 22:04:23,130 - MosfireDrpLog. <module> - INFO: ccdproc version = 1.3.0
longslit mode
Generating automatic driver file Longslit_hip13917.py
Traceback (most recent call last):
File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/bin/AutoDriver.py", line 4, in <module> __import__('pkg_resources').run_script('MOSFIRE==1.0.dev0', 'AutoDriver.py')
File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/pkg_resources/__init__.py", line 748, in run_script self.require(requires)[0].run_script(script_name, ns)
File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1517, in run_script exec(code, namespace, namespace)
File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/EGG-INFO/scripts/AutoDriver.py", line 465, in <module> mydriver.printFlat()
File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/EGG-INFO/scripts/AutoDriver.py", line 115, in printFlat self.addLine(flatLine)
UnboundLocalError: local variable 'flatLine' referenced before assignment
No driver file is generated in this case. However, if I run "mospy AutoDriver" on the H-band longslit directory, the pipeline crashes with the same error, but it does generate a driver file.
The way I created a driver file for K-band longslit data was to copy the driver file for H-band longslit and then to add manually the lines specific to K-band spectroscopy based on K-band slitmask driver files.
If I run "mospy AutoDriver" on K-band slitmask data, it generates the correct driver file automatically with no errors.
Hi Carlos
Then there is a bug in the generation of the driver and I am glad you found it so we can fix it but still the templates are quite heavily out of date by now because we have stopped using them and they are missing important information as you pointed out.
We’ll find out why the k band longslit autodriver doesn’t work
Luca
On Nov 25, 2018, at 10:36 PM, calvarez17 notifications@github.com wrote:
Hi Luca,
Thank you for the prompt reply.
I think the option AutoDriver does not work for K-band long slit in my case:
(mospy_2018macos) mac-alvarez:K calvarez$ ls Offset-6hd193193.txt Offset-8hd195500.txt Offset-8_hip94663.txt Offset_6_hd193193.txt Offset_8_hd195500.txt Offset_8_hip94663.txt
(mospy_2018_macos) mac-alvarez:K calvarez$ mospy AutoDriver 2018-11-25 22:04:23,058 - MosfireDrpLog.
- INFO: 3.6.3 |Anaconda, Inc.| (default, Dec 5 2017, 17:30:25) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] 2018-11-25 22:04:23,058 - MosfireDrpLog. - INFO: python version = 3.6.3 2018-11-25 22:04:23,059 - MosfireDrpLog. - INFO: numpy version = 1.13.3 2018-11-25 22:04:23,129 - MosfireDrpLog. - INFO: matplotlib version = 2.1.1 2018-11-25 22:04:23,130 - MosfireDrpLog. - INFO: astropy version = 2.0.3 2018-11-25 22:04:23,130 - MosfireDrpLog. - INFO: ccdproc version = 1.3.0 longslit mode Generating automatic driver file Longslit_hip13917.py Traceback (most recent call last): File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/bin/AutoDriver.py", line 4, in import('pkg_resources').run_script('MOSFIRE==1.0.dev0', 'AutoDriver.py') File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/pkg_resources/init.py", line 748, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/pkg_resources/init.py", line 1517, in run_script exec(code, namespace, namespace) File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/EGG-INFO/scripts/AutoDriver.py", line 465, in mydriver.printFlat() File "/Users/calvarez/anaconda3/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/EGG-INFO/scripts/AutoDriver.py", line 115, in printFlat self.addLine(flatLine) UnboundLocalError: local variable 'flatLine' referenced before assignment No driver file is generated in this case. However, if I run "mospy AutoDriver" on the H-band longslit directory, the pipeline crashes with the same error, but it does generate a driver file.
The way I created a driver file for K-band longslit data was to copy the driver file for H-band longslit and then to add manually the lines specific to K-band spectroscopy based on K-band slitmask driver files.
If I run "mospy AutoDriver" on K-band slitmask data, it generates the correct driver file automatically with no errors.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
There is not K-band longslit driver template file with the pipeline distribution.
Need to add TkAgg on the longslit template for Mac compatibility:
matplotlib.use('TkAgg')
from MOSFIRE import Background, Combine, Detector, Flats, IO, Options, Rectify, Wavelength, Extract
Extract.extract_spectra(maskname, band, width=3, interactive=(not noninteractiveflag))