Keck-DataReductionPipelines / MosfireDRP

http://keck-datareductionpipelines.github.io/MosfireDRP
10 stars 13 forks source link

Background Subtraction Step Crashing #71

Closed theinfinitypoint closed 7 years ago

theinfinitypoint commented 7 years ago

Hi,

I'm running the current MOSFIRE DRP code (circa 2016) and it's crashing on the background subtraction step:

Background.handle_background(obsfiles,Wavelength_file,maskname,band,waveops)

I do know that this slit contains a bright star since it was my telluric. Here is the output from my terminal:

jasonchu@Gluon.local > mospy Driver_COSMOS_2_v2_H.py 
2017-03-23 15:22:23,290 -   Background.   handle_background - INFO: Combining observation files listed in Offset_1.5.txt
2017-03-23 15:22:30,947 -   Background.           imcombine - INFO: Sigclip CRR
2017-03-23 15:22:43,357 -   Background.           imcombine - INFO: dropping: 706079
2017-03-23 15:22:44,238 -           IO.           writefits - INFO: Wrote to 'eps_Offset_1.5.txt.fits'
2017-03-23 15:22:45,173 -           IO.           writefits - INFO: Wrote to 'var_Offset_1.5.txt.fits'
2017-03-23 15:22:49,617 -           IO.           writefits - INFO: Wrote to 'itimes_Offset_1.5.txt.fits'
2017-03-23 15:22:50,827 -   Background.   handle_background - INFO: Combining observation files listed in Offset_-1.5.txt
2017-03-23 15:22:58,626 -   Background.           imcombine - INFO: Sigclip CRR
2017-03-23 15:23:11,335 -   Background.           imcombine - INFO: dropping: 737775
2017-03-23 15:23:12,255 -           IO.           writefits - INFO: Wrote to 'eps_Offset_-1.5.txt.fits'
2017-03-23 15:23:13,153 -           IO.           writefits - INFO: Wrote to 'var_Offset_-1.5.txt.fits'
2017-03-23 15:23:17,515 -           IO.           writefits - INFO: Wrote to 'itimes_Offset_-1.5.txt.fits'
2017-03-23 15:23:19,020 -   Background.   handle_background - INFO: Handling A - B
2017-03-23 15:23:19,136 -   Background.background_subtract_helper - INFO: Background subtracting slit 0 [2034,1993]
2017-03-23 15:23:19,136 -   Background.background_subtract_helper - INFO: Background subtracting slit 1 [1989,1949]
2017-03-23 15:23:19,136 -   Background.background_subtract_helper - INFO: Background subtracting slit 2 [1941,1858]
2017-03-23 15:23:19,137 -   Background.background_subtract_helper - INFO: Background subtracting slit 3 [1853,1770]
2017-03-23 15:23:19,137 -   Background.background_subtract_helper - INFO: Background subtracting slit 4 [1763,1680]
2017-03-23 15:23:19,137 -   Background.background_subtract_helper - INFO: Background subtracting slit 5 [1674,1592]
2017-03-23 15:23:19,137 -   Background.background_subtract_helper - INFO: Background subtracting slit 6 [1588,1504]
2017-03-23 15:23:19,138 -   Background.background_subtract_helper - INFO: Background subtracting slit 7 [1497,1415]
Traceback (most recent call last):
  File "Driver_COSMOS_2_v2_H.py", line 41, in <module>
    Background.handle_background(obsfiles,Wavelength_file,maskname,band,waveops)
  File "/Users/jasonchu/anaconda/lib/python2.7/site-packages/MOSFIRE-1.0.dev0-py2.7.egg/MOSFIRE/Background.py", line 488, in handle_background
2017-03-23 15:23:19,326 -   Background.background_subtract_helper - INFO: Background subtracting slit 8 [1411,1327]
    solutions = p.map(background_subtract_helper, xrange(len(bs.ssl)))
  File "/Users/jasonchu/anaconda/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/Users/jasonchu/anaconda/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
NameError: global name 'Error' is not defined

Is it possible to still compute the background? Or if not, is there a way to bypass this slit in the data reduction (I have 2 telluric star slits, and the other one seems to work). Thanks!

KeckDRP commented 7 years ago

Hi

Could you make your data available to us ?

Maybe limit only to the telluric standard that you cannot reduce. We need flats, arcs and the science frames

Thank you Luca

On Mar 23, 2017, at 4:03 PM, theinfinitypoint notifications@github.com wrote:

Hi,

I'm running the current MOSFIRE DRP code (circa 2016) and it's crashing on the background subtraction step:

Background.handle_background(obsfiles,Wavelength_file,maskname,band,waveops) I do know that this slit contains a bright star since it was my telluric. Here is the output from my terminal:

jasonchu@Gluon.local > mospy Driver_COSMOS_2_v2_H.py 2017-03-23 15:22:23,290 - Background. handle_background - INFO: Combining observation files listed in Offset_1.5.txt 2017-03-23 15:22:30,947 - Background. imcombine - INFO: Sigclip CRR 2017-03-23 15:22:43,357 - Background. imcombine - INFO: dropping: 706079 2017-03-23 15:22:44,238 - IO. writefits - INFO: Wrote to 'eps_Offset_1.5.txt.fits' 2017-03-23 15:22:45,173 - IO. writefits - INFO: Wrote to 'var_Offset_1.5.txt.fits' 2017-03-23 15:22:49,617 - IO. writefits - INFO: Wrote to 'itimes_Offset_1.5.txt.fits' 2017-03-23 15:22:50,827 - Background. handlebackground - INFO: Combining observation files listed in Offset-1.5.txt 2017-03-23 15:22:58,626 - Background. imcombine - INFO: Sigclip CRR 2017-03-23 15:23:11,335 - Background. imcombine - INFO: dropping: 737775 2017-03-23 15:23:12,255 - IO. writefits - INFO: Wrote to 'epsOffset-1.5.txt.fits' 2017-03-23 15:23:13,153 - IO. writefits - INFO: Wrote to 'varOffset-1.5.txt.fits' 2017-03-23 15:23:17,515 - IO. writefits - INFO: Wrote to 'itimesOffset-1.5.txt.fits' 2017-03-23 15:23:19,020 - Background. handle_background - INFO: Handling A - B 2017-03-23 15:23:19,136 - Background.background_subtract_helper - INFO: Background subtracting slit 0 [2034,1993] 2017-03-23 15:23:19,136 - Background.background_subtract_helper - INFO: Background subtracting slit 1 [1989,1949] 2017-03-23 15:23:19,136 - Background.background_subtract_helper - INFO: Background subtracting slit 2 [1941,1858] 2017-03-23 15:23:19,137 - Background.background_subtract_helper - INFO: Background subtracting slit 3 [1853,1770] 2017-03-23 15:23:19,137 - Background.background_subtract_helper - INFO: Background subtracting slit 4 [1763,1680] 2017-03-23 15:23:19,137 - Background.background_subtract_helper - INFO: Background subtracting slit 5 [1674,1592] 2017-03-23 15:23:19,137 - Background.background_subtract_helper - INFO: Background subtracting slit 6 [1588,1504] 2017-03-23 15:23:19,138 - Background.background_subtract_helper - INFO: Background subtracting slit 7 [1497,1415] Traceback (most recent call last): File "Driver_COSMOS_2_v2_H.py", line 41, in Background.handle_background(obsfiles,Wavelength_file,maskname,band,waveops) File "/Users/jasonchu/anaconda/lib/python2.7/site-packages/MOSFIRE-1.0.dev0-py2.7.egg/MOSFIRE/Background.py", line 488, in handle_background 2017-03-23 15:23:19,326 - Background.background_subtract_helper - INFO: Background subtracting slit 8 [1411,1327] solutions = p.map(background_subtract_helper, xrange(len(bs.ssl))) File "/Users/jasonchu/anaconda/lib/python2.7/multiprocessing/pool.py", line 251, in map return self.map_async(func, iterable, chunksize).get() File "/Users/jasonchu/anaconda/lib/python2.7/multiprocessing/pool.py", line 567, in get raise self._value NameError: global name 'Error' is not defined Is it possible to still compute the background? Or if not, is there a way to bypass this slit in the data reduction (I have 2 telluric star slits, and the other one seems to work). Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

theinfinitypoint commented 7 years ago

Yes, I'll send you an email with a link to the data, thanks!

lucarizzi commented 7 years ago

Hi Jason I think I found the problem. It's a unhandled exception triggered by the low level fitting routine.

I will email you the new version of Background.py separately, and if it works as it works for me, I will check-in my changes in the git repository.

Luca

lucarizzi commented 7 years ago

Closed by b4fd07ddd5daf3427d8d28399785d8d6522f2a5a