Keck-DataReductionPipelines / MosfireDRP

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

nmpfit problem in numpy 1.9 #26

Closed followthesheep closed 9 years ago

followthesheep commented 9 years ago

There is a problem when using nmpfit from numpy 1.9 when the routine goes through the interactive wavelength fit. The error is as follows:

/group/ureka/Ureka/variants/common/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in put(a, ind, v, mode)
    442 
    443     """
--> 444     return a.put(ind, v, mode)
    445 
    446 

ValueError: put: output array is read-only

This can be traced to nmpfit.py:

   1919         ## Permute the components of z back to components of x
-> 1920         numpy.put(x, ipvt, wa)
   1921         return(r, x, sdiag)

I've copied nmpfit.py to nmpfit_mos.py and edited so this bug no longer happens. However, this means that MOSFIRE will need to use a different version of nmpfit for now until stsci fixes theirs.

I've fixed this in my branch 'install_update'. This is the repackaging branch. I had to do it in this branch because it was the only way for me to test it in my python environment. However, you can apply the fix to the main branch by just copying over three files from my branch:

Fit.py nmpfit_mos.py numerixenv.py

into the MOSFIRE directory

From: https://github.com/Keck-DataReductionPipelines/MosfireDRP/tree/install_update/MOSFIRE

I've tested it and the interactive wavelength fitting seems to run. I haven't gone through the entire interactive fitting process though. The bypass=True mode does run completely.

KeckDRP commented 9 years ago

Duplicate of #20