Commit 9051002e0da28c409f5dea59ad071519c1db6acf
1 parent
81d9de6d
ctfindvar now always outputs a model definition file
Showing
2 changed files
with
15 additions
and
20 deletions
src/ctfindvar/ctfindvar.cpp
| ... | ... | @@ -293,19 +293,14 @@ void ctfindvar::save(void) |
| 293 | 293 | // Log saving |
| 294 | 294 | log_value(TERSE, "Saving output map", outmap); |
| 295 | 295 | |
| 296 | - // Save the model definition file | |
| 297 | - if (m_model_above_thr.size() > 2) { | |
| 296 | + // Get output model definition file filename | |
| 297 | + GFilename outmodel = (*this)["outmodel"].filename(); | |
| 298 | 298 | |
| 299 | - // Get model output filename | |
| 300 | - GFilename outmodel = (*this)["outmodel"].filename(); | |
| 299 | + // Save model | |
| 300 | + m_model_above_thr.save(outmodel); | |
| 301 | 301 | |
| 302 | - // Save model | |
| 303 | - m_model_above_thr.save(outmodel); | |
| 304 | - | |
| 305 | - // Log saving | |
| 306 | - log_value(TERSE, "Saving output model", outmodel); | |
| 307 | - | |
| 308 | - } | |
| 302 | + // Log saving | |
| 303 | + log_value(TERSE, "Saving output model", outmodel); | |
| 309 | 304 | |
| 310 | 305 | // Return |
| 311 | 306 | return; | ... | ... |
test/test_ctfindvar.py
| ... | ... | @@ -155,16 +155,16 @@ class Test(test): |
| 155 | 155 | self._check_result_file('ctfindvar_py1.fits') |
| 156 | 156 | |
| 157 | 157 | # Copy ctfindvar tool |
| 158 | - cpy_tool = ctfindvar | |
| 159 | - | |
| 160 | - # Run copy of ctfindvar tool again | |
| 161 | - cpy_tool['outmap'] = 'ctfindvar_py2.fits' | |
| 162 | - cpy_tool['outmodel'] = 'ctfindvar_py2.xml' | |
| 163 | - cpy_tool['logfile'] = 'ctfindvar_py2.log' | |
| 164 | - cpy_tool['chatter'] = 3 | |
| 158 | + cpy_tool = ctfindvar.copy() | |
| 159 | + | |
| 160 | + # Run copy of ctfindvar tool again with lower threshold | |
| 161 | + cpy_tool['threshold'] = 1.0 | |
| 162 | + cpy_tool['outmap'] = 'ctfindvar_py2.fits' | |
| 163 | + cpy_tool['outmodel'] = 'ctfindvar_py2.xml' | |
| 164 | + cpy_tool['logfile'] = 'ctfindvar_py2.log' | |
| 165 | + cpy_tool['chatter'] = 3 | |
| 165 | 166 | cpy_tool.logFileOpen() |
| 166 | - cpy_tool.run() | |
| 167 | - cpy_tool.save() | |
| 167 | + cpy_tool.execute() | |
| 168 | 168 | |
| 169 | 169 | # Check result |
| 170 | 170 | self._check_result_file('ctfindvar_py2.fits') | ... | ... |