Keck-DataReductionPipelines / MosfireDRP

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

Issue during wavelength.fit_lambda #120

Closed jsbridge closed 6 years ago

jsbridge commented 6 years ago

I'm reducing some data and have the following error when running wavelength.fit_lambda (see below). If it makes any difference, I'm running the DRP version from Josh, rather than what is currently publicly available (I believe). In any case, I'm really not sure what is going on here and don't want to mess with anything too much. Any ideas? Thanks!

(mospy_2018_macos) bash-3.2$ mospy Driver.py 2018-06-04 19:30:02,022 - 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-06-04 19:30:02,022 - MosfireDrpLog. - INFO: python version = 3.6.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: numpy version = 1.13.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: matplotlib version = 2.1.1 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: astropy version = 2.0.3 2018-06-04 19:30:02,024 - MosfireDrpLog. - INFO: ccdproc version = 1.3.0 2018-06-04 19:30:02,263 - Wavelength. fit_lambda - INFO: borg_1152] Writing to: lambda_coeffs_wave_stack_Y_m180521_0048-0133.npy 2018-06-04 19:30:02,594 - Wavelength. fit_lambda_helper - INFO: Fitting Slit borg_1152+3402_912 from 1909 to 2032 2018-06-04 19:30:02,597 - Wavelength. fit_outwards_refit - INFO: Computing 0 spectrum at 1968 2018-06-04 19:33:00,625 - Wavelength. fit_lambda_helper - INFO: S01] TOOK: 178 s multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(args, *kwds)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 392, in fit_lambda_helper sol_1d = center_solutions[slitidx]["sol_1d"] TypeError: 'int' object is not subscriptable """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "Driver.py", line 37, in Wavelength.fit_lambda(maskname, band, obsfiles, obsfiles,waveops) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 365, in fit_lambda solutions = p.map(fit_lambda_helper, list(range(len(bs.ssl)))) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value TypeError: 'int' object is not subscriptable

lucarizzi commented 6 years ago

How did the interactive fitting go? Did you find a good solution for each of your slits?

Because this sounds a lot like one of the initial solutions are missing, like if you pressed “q” on the interactive fitting before all the slits had been processed.

From: Joanna Bridge notifications@github.com Reply-To: Keck-DataReductionPipelines/MosfireDRP reply@reply.github.com Date: Monday, June 4, 2018 at 1:41 PM To: Keck-DataReductionPipelines/MosfireDRP MosfireDRP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Keck-DataReductionPipelines/MosfireDRP] Issue during wavelength.fit_lambda (#120)

I'm reducing some data and have the following error when running wavelength.fit_lambda (see below). If it makes any difference, I'm running the DRP version from Josh, rather than what is currently publicly available (I believe). In any case, I'm really not sure what is going on here and don't want to mess with anything too much. Any ideas? Thanks!

(mospy_2018_macos) bash-3.2$ mospy Driver.py 2018-06-04 19:30:02,022 - 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-06-04 19:30:02,022 - MosfireDrpLog. - INFO: python version = 3.6.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: numpy version = 1.13.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: matplotlib version = 2.1.1 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: astropy version = 2.0.3 2018-06-04 19:30:02,024 - MosfireDrpLog. - INFO: ccdproc version = 1.3.0 2018-06-04 19:30:02,263 - Wavelength. fit_lambda - INFO: borg_1152] Writing to: lambda_coeffs_wave_stack_Y_m180521_0048-0133.npy 2018-06-04 19:30:02,594 - Wavelength. fit_lambda_helper - INFO: Fitting Slit borg_1152+3402_912 from 1909 to 2032 2018-06-04 19:30:02,597 - Wavelength. fit_outwards_refit - INFO: Computing 0 spectrum at 1968 2018-06-04 19:33:00,625 - Wavelength. fit_lambda_helper - INFO: S01] TOOK: 178 s multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(args, *kwds)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 392, in fit_lambda_helper sol_1d = center_solutions[slitidx]["sol_1d"] TypeError: 'int' object is not subscriptable """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "Driver.py", line 37, in Wavelength.fit_lambda(maskname, band, obsfiles, obsfiles,waveops) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 365, in fit_lambda solutions = p.map(fit_lambda_helper, list(range(len(bs.ssl)))) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value TypeError: 'int' object is not subscriptable

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

jsbridge commented 6 years ago

Oh goodness, yes, I got a little trigger happy with the ‘q’ instead of using ’n’ to move the next source. Thanks for the quick reply!

On Jun 4, 2018, at 8:05 PM, lucarizzi notifications@github.com wrote:

How did the interactive fitting go? Did you find a good solution for each of your slits?

Because this sounds a lot like one of the initial solutions are missing, like if you pressed “q” on the interactive fitting before all the slits had been processed.

From: Joanna Bridge notifications@github.com Reply-To: Keck-DataReductionPipelines/MosfireDRP reply@reply.github.com Date: Monday, June 4, 2018 at 1:41 PM To: Keck-DataReductionPipelines/MosfireDRP MosfireDRP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Keck-DataReductionPipelines/MosfireDRP] Issue during wavelength.fit_lambda (#120)

I'm reducing some data and have the following error when running wavelength.fit_lambda (see below). If it makes any difference, I'm running the DRP version from Josh, rather than what is currently publicly available (I believe). In any case, I'm really not sure what is going on here and don't want to mess with anything too much. Any ideas? Thanks!

(mospy_2018_macos) bash-3.2$ mospy Driver.py 2018-06-04 19:30:02,022 - 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-06-04 19:30:02,022 - MosfireDrpLog. - INFO: python version = 3.6.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: numpy version = 1.13.3 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: matplotlib version = 2.1.1 2018-06-04 19:30:02,023 - MosfireDrpLog. - INFO: astropy version = 2.0.3 2018-06-04 19:30:02,024 - MosfireDrpLog. - INFO: ccdproc version = 1.3.0 2018-06-04 19:30:02,263 - Wavelength. fit_lambda - INFO: borg_1152] Writing to: lambda_coeffs_wave_stack_Y_m180521_0048-0133.npy 2018-06-04 19:30:02,594 - Wavelength. fit_lambda_helper - INFO: Fitting Slit borg_1152+3402_912 from 1909 to 2032 2018-06-04 19:30:02,597 - Wavelength. fit_outwards_refit - INFO: Computing 0 spectrum at 1968 2018-06-04 19:33:00,625 - Wavelength. fit_lambda_helper - INFO: S01] TOOK: 178 s multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(args, *kwds)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 392, in fit_lambda_helper sol_1d = center_solutions[slitidx]["sol_1d"] TypeError: 'int' object is not subscriptable """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "Driver.py", line 37, in Wavelength.fit_lambda(maskname, band, obsfiles, obsfiles,waveops) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/site-packages/MOSFIRE-1.0.dev0-py3.6.egg/MOSFIRE/Wavelength.py", line 365, in fit_lambda solutions = p.map(fit_lambda_helper, list(range(len(bs.ssl)))) File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/Users/joanna/anaconda/envs/mospy_2018_macos/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value TypeError: 'int' object is not subscriptable

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Keck-DataReductionPipelines/MosfireDRP/issues/120#issuecomment-394538241, or mute the thread https://github.com/notifications/unsubscribe-auth/AKcOqT78q9AmPaCGCKDICAvfPORkSDb-ks5t5ctHgaJpZM4UZ8J9.

joshwalawender commented 6 years ago

hmmm ... I thought I had fixed this before and sure enough, I had made PR #75, but when I reorganized our branches to clean up dev and master, I apparently stranded that code. I will fix this and in future releases, this should generate a useful message to the user in the log rather than fail opaquely as it does now.