loop_spe_multiprocessing continuum subtraction.
The loop_spe_multiprocessing function is not working correctly for me after updating the mpdaf package from version 2.4 to 2.5. I am performing continuum subtraction on a subcube from a source object using the following code taken from the documentation:
cont = source.cubes['MUSE'].loop_spe_multiprocessing(f=Spectrum.poly_spec, deg=5)
I have tried this with various datacubes and I have issues with them all except for a cropped test cube I have created (using mpdaf) from a larger original one (that is now not working).
My code functions correctly until it gets to the multiprocessing stage and then I receive the following error:
Process ForkPoolWorker-1:
Traceback (most recent call last):
File "/home/anaconda3/lib/python3.6/multiprocessing/process.py", line 258,
in _bootstrap self.run()
File "/home/anaconda3/lib/python3.6/multiprocessing/process.py", line 93,
in run self._target(*self._args, **self._kwargs)
File "/home/anaconda3/lib/python3.6/multiprocessing/pool.py", line 108, in
worker task = get()
File "/home/anaconda3/lib/python3.6/multiprocessing/queues.py", line 337,
in get return _ForkingPickler.loads(res)
File "/home/anaconda3/lib/python3.6/site-packages/mpdaf/obj/data.py", line
410, in __setstate__ self._compute_wcs_from_header()
File "/home/anaconda3/lib/python3.6/site-packages/mpdaf/obj/data.py", line
435, in _compute_wcs_from_header self.wave = WaveCoord(hdr)
File "/home/anaconda3/lib/python3.6/site-packages/mpdaf/obj/coords.py",
line 1562, in __init__ self.wcs = _wcs_from_header(hdr).sub([axis])
File "/home/anaconda3/lib/python3.6/site-packages/mpdaf/obj/coords.py",
line 202, in _wcs_from_header return pywcs.WCS(hdr, naxis=naxis)
File "/home/anaconda3/lib/python3.6/site-packages/astropy/wcs/wcs.py",
line 506, in __init__ self.wcs.set()
astropy.wcs._wcs.InconsistentAxisTypesError: ERROR 4 in wcs_types() at line
2521 of file cextern/wcslib/C/wcs.c: Unmatched celestial axes.
Edited by Simon Conseil