Skip to content
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

Longslit reduction issues #128

Open
calvarez17 opened this issue Nov 26, 2018 · 3 comments
Open

Longslit reduction issues #128

calvarez17 opened this issue Nov 26, 2018 · 3 comments

Comments

@calvarez17
Copy link

  • 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.
@lucarizzi
Copy link

lucarizzi commented Nov 26, 2018 via email

@calvarez17
Copy link
Author

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.

@lucarizzi
Copy link

lucarizzi commented Nov 26, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants