Skip to content

Commit

Permalink
Merge pull request #876 from I2PC/dmt_maxshift_tolerance
Browse files Browse the repository at this point in the history
Max shift protocol: tolerate movies without micrographs associated
  • Loading branch information
albertmena authored Jan 20, 2025
2 parents 2cc7272 + ee1eea3 commit d2b0f31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xmipp3/protocols/protocol_movie_max_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,16 @@ def tryToAppend(outSet, micOut):

inputMovies = self._loadInputSet(self.movsFn)
inputMics = self._loadMicAssociatedInputSet()
inputMicsIds = inputMics.getIdSet()

for movieId in newDoneList:
movie = inputMovies.getItem("id", movieId).clone()
mic = inputMics.getItem("id", movieId).clone()
tryToAppend(movieSet, movie)
tryToAppend(micsSet, mic)
if movieId in inputMicsIds:
mic = inputMics.getItem("id", movieId).clone()
tryToAppend(micsSet, mic)
else:
self.info("Movie with id %d has not a micrograph associated" %movieId)

if movieSet.getSize() > 0:
self._updateOutputSet(OUTPUT_MOVIES + suffix, movieSet,
Expand Down

0 comments on commit d2b0f31

Please sign in to comment.