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

many bizarre errors running a fresh install of the DRP- here is one: #150

Open
csteidel opened this issue Sep 28, 2021 · 7 comments
Open

Comments

@csteidel
Copy link

This one may have to do with Macosx (I am running 10.14.6) - is there any easy way to turn off the use of multiple processors for this step? I cannot get past this point for some reason:
2021-09-28 10:42:53,917 - Wavelength. fit_lambda_helper - INFO: S18] TOOK: 162 s
2021-09-28 10:43:06,694 - Wavelength. fit_lambda_helper - INFO: S20] TOOK: 151 s
2021-09-28 10:43:25,730 - Wavelength. fit_lambda_helper - INFO: S21] TOOK: 135 s
2021-09-28 10:43:26,290 - Wavelength. fit_lambda_helper - INFO: S23] TOOK: 109 s
2021-09-28 10:43:37,241 - Wavelength. fit_lambda_helper - INFO: S24] TOOK: 113 s
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/ccs/anaconda3/envs/mospy/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/ccs/anaconda3/envs/mospy/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/Users/ccs/anaconda3/envs/mospy/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 36, in
Wavelength.fit_lambda(maskname, band, obsfiles, obsfiles,waveops)
File "/Users/ccs/anaconda3/envs/mospy/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/ccs/anaconda3/envs/mospy/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/ccs/anaconda3/envs/mospy/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
TypeError: 'int' object is not subscriptable

@joshwalawender
Copy link
Contributor

@csteidel My guess is that this has to do with a failure of the wavelength fit rather than a multiprocessing problem. Are you reducing long slit data or mask? If you point me to the data, I can take a look.

If you want to turn off multicore processing, you can edit one line in the Wavelength.py file. Set multicore = False here:

    if multicore:
        p = Pool()
        solutions = p.map(fit_lambda_helper, list(range(len(bs.ssl))))
        p.close()
    else:
        solutions = map(fit_lambda_helper, list(range(len(bs.ssl))))

I believe this is line 361 or thereabouts.

@csteidel
Copy link
Author

csteidel commented Sep 28, 2021 via email

@csteidel
Copy link
Author

csteidel commented Sep 28, 2021 via email

@csteidel
Copy link
Author

csteidel commented Sep 29, 2021 via email

@nickkonidaris
Copy link

It looks like there's a bookkeeping error. Could you take a look at the FITS header with the mask design and see if there's something weird in the header? I reckon the problem would be obvious (like, a chunk of the header was not properly written).

@csteidel
Copy link
Author

csteidel commented Sep 29, 2021 via email

@CallumWitten
Copy link

I have the same error for a different set of observations. Is there any update on how this was solved?

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

4 participants