def _createOutputMovie(self, movie):
     """ Overwrite this function to store the Relion's specific
     Motion model coefficients.
     """
     m = ProtAlignMovies._createOutputMovie(self, movie)
     # Load local motion values only if the patches are more than one
     if self.patchX.get() > 2 and self.patchY.get() > 2:
         try:
             table = md.Table(fileName=self._getMovieExtraFn(
                 movie, '.star'),
                              tableName='local_motion_model')
             coeffs = [row.rlnMotionModelCoeff for row in table]
         except:
             print("Failed to parse local motion from: %s" %
                   os.path.abspath(self._getMovieExtraFn(movie, '.star')))
             coeffs = []  # Failed to parse the local motion
         m._rlnMotionModelCoeff = pwobj.String(json.dumps(coeffs))
     return m
 def _createOutputMovie(self, movie):
     alignedMovie = ProtAlignMovies._createOutputMovie(self, movie)
     self._setAlignmentInfo(movie, alignedMovie)
     return alignedMovie