diff --git a/src/ctfindvar/ctfindvar.cpp b/src/ctfindvar/ctfindvar.cpp index dbb97ca..9642541 100644 --- a/src/ctfindvar/ctfindvar.cpp +++ b/src/ctfindvar/ctfindvar.cpp @@ -293,19 +293,14 @@ void ctfindvar::save(void) // Log saving log_value(TERSE, "Saving output map", outmap); - // Save the model definition file - if (m_model_above_thr.size() > 2) { + // Get output model definition file filename + GFilename outmodel = (*this)["outmodel"].filename(); - // Get model output filename - GFilename outmodel = (*this)["outmodel"].filename(); + // Save model + m_model_above_thr.save(outmodel); - // Save model - m_model_above_thr.save(outmodel); - - // Log saving - log_value(TERSE, "Saving output model", outmodel); - - } + // Log saving + log_value(TERSE, "Saving output model", outmodel); // Return return; diff --git a/test/test_ctfindvar.py b/test/test_ctfindvar.py index b0980b5..00a076b 100755 --- a/test/test_ctfindvar.py +++ b/test/test_ctfindvar.py @@ -155,16 +155,16 @@ class Test(test): self._check_result_file('ctfindvar_py1.fits') # Copy ctfindvar tool - cpy_tool = ctfindvar - - # Run copy of ctfindvar tool again - cpy_tool['outmap'] = 'ctfindvar_py2.fits' - cpy_tool['outmodel'] = 'ctfindvar_py2.xml' - cpy_tool['logfile'] = 'ctfindvar_py2.log' - cpy_tool['chatter'] = 3 + cpy_tool = ctfindvar.copy() + + # Run copy of ctfindvar tool again with lower threshold + cpy_tool['threshold'] = 1.0 + cpy_tool['outmap'] = 'ctfindvar_py2.fits' + cpy_tool['outmodel'] = 'ctfindvar_py2.xml' + cpy_tool['logfile'] = 'ctfindvar_py2.log' + cpy_tool['chatter'] = 3 cpy_tool.logFileOpen() - cpy_tool.run() - cpy_tool.save() + cpy_tool.execute() # Check result self._check_result_file('ctfindvar_py2.fits')