- changed status to resolved
FM class not working with single SCI frame
Issue #54
resolved
Error message follows below. Issue is caused by some np functions returning arrays of a different shape if a list with only one instead of multiple elements is passed.
Begin align and scale images for each wavelength
Align and scale finished
Starting KLIP for sector 1/1 with an area of 1286780.4387556168 pix^2
Time spent on last sector: 0s
Time spent since beginning: 0s
First sector: Can't predict remaining time
Traceback (most recent call last):
File "/Users/jkammere/Documents/JWST/1386/NIRCam/run_spaceklip.py", line 193, in <module>
AnalysisTools.extract_companions(companions=[[0.408, -0.708, 1e-4]],
File "/Users/jkammere/Documents/Code/spaceKLIP/spaceKLIP/analysistools.py", line 1276, in extract_companions
fm.klip_dataset(dataset=dataset,
File "/Users/jkammere/Documents/Code/pyklip/pyklip/fm.py", line 1961, in klip_dataset
klip_outputs = klip_parallelized(dataset.input, dataset.centers, dataset.PAs, dataset.wvs, dataset.IWA, fm_class,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jkammere/Documents/Code/pyklip/pyklip/fm.py", line 1327, in klip_parallelized
tpool_outputs += [_klip_section_multifile_perfile(file_index, sector_index, radstart, radend, phistart, phiend,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jkammere/Documents/Code/pyklip/pyklip/fm.py", line 1327, in <listcomp>
tpool_outputs += [_klip_section_multifile_perfile(file_index, sector_index, radstart, radend, phistart, phiend,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jkammere/Documents/Code/pyklip/pyklip/fm.py", line 1542, in _klip_section_multifile_perfile
corr_psfs[np.where(np.isnan(corr_psfs))] = 0
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'numpy.float64' object does not support item assignment
Comments (1)
-
reporter - Log in to comment
Fix bug in FM class when processing database with single SCI frame, fixes
#54→ <<cset 82b98298c3a2>>