diff --git a/src/mvesuvio/analysis_reduction.py b/src/mvesuvio/analysis_reduction.py index bcacb862..f896c0c5 100644 --- a/src/mvesuvio/analysis_reduction.py +++ b/src/mvesuvio/analysis_reduction.py @@ -814,8 +814,7 @@ def _replace_zero_columns_with_ncp_fit(self): OutputWorkspace=self._workspace_for_corrections.name() + "_CorrectionsInput" ) for row in range(self._workspace_for_corrections.getNumberHistograms()): - # TODO: Once the option to change point to hist is removed, remove [:len(ncp)] - self._workspace_for_corrections.dataY(row)[self._zero_columns_boolean_mask] = ncp[row, self._zero_columns_boolean_mask[:len(ncp[row])]] + self._workspace_for_corrections.dataY(row)[self._zero_columns_boolean_mask] = ncp[row, self._zero_columns_boolean_mask] SumSpectra( InputWorkspace=self._workspace_for_corrections.name(), @@ -1069,14 +1068,6 @@ def _set_results(self): def _save_results(self): """Saves all of the arrays stored in this object""" - maskedDetectorIdx = np.array(self._mask_spectra) - min(self._workspace_being_fit.getSpectrumNumbers()) - - # TODO: Take out nans next time when running original results - # Because original results were recently saved with nans, mask spectra with nans - self.all_spec_best_par_chi_nit[:, maskedDetectorIdx, :] = np.nan - self.all_ncp_for_each_mass[:, maskedDetectorIdx, :, :] = np.nan - self.all_tot_ncp[:, maskedDetectorIdx, :] = np.nan - if not self._save_results_path: return diff --git a/tests/data/analysis/benchmark/stored_spec_144-182_iter_3_GC_MS.npz b/tests/data/analysis/benchmark/stored_spec_144-182_iter_3_GC_MS.npz index eccf87d0..433fda56 100644 Binary files a/tests/data/analysis/benchmark/stored_spec_144-182_iter_3_GC_MS.npz and b/tests/data/analysis/benchmark/stored_spec_144-182_iter_3_GC_MS.npz differ diff --git a/tests/data/analysis/inputs/sample_test/output_files/spec_144-182_iter_3_GC_MS.npz b/tests/data/analysis/inputs/sample_test/output_files/spec_144-182_iter_3_GC_MS.npz index eccf87d0..433fda56 100644 Binary files a/tests/data/analysis/inputs/sample_test/output_files/spec_144-182_iter_3_GC_MS.npz and b/tests/data/analysis/inputs/sample_test/output_files/spec_144-182_iter_3_GC_MS.npz differ diff --git a/tests/system/analysis/test_analysis.py b/tests/system/analysis/test_analysis.py index c5b10eb5..90484ca1 100644 --- a/tests/system/analysis/test_analysis.py +++ b/tests/system/analysis/test_analysis.py @@ -117,14 +117,10 @@ def setUpClass(cls): def setUp(self): self.orincp = self.benchmarkResults["all_tot_ncp"] - self.optncp = self.currentResults.all_tot_ncp def test_ncp(self): - correctNansOri = np.where( - (self.orincp == 0) & np.isnan(self.optncp), np.nan, self.orincp - ) - nptest.assert_almost_equal(correctNansOri, self.optncp, decimal=5) + nptest.assert_almost_equal(self.orincp, self.optncp, decimal=5) class TestMeanWidths(unittest.TestCase):