Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1141 from I2PC/release-1.1.facilities-dash_in_fil…
Browse files Browse the repository at this point in the history
…ename_#1073

Release 1.1.facilities dash in filename #1073
  • Loading branch information
delarosatrevin committed Aug 9, 2017
2 parents 71ea0af + 515f27d commit ba45eb1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions pyworkflow/em/packages/xmipp3/protocol_movie_correlation.py
Expand Up @@ -115,8 +115,8 @@ def _processMovie(self, movie):
inputMd = os.path.join(movieFolder, 'input_movie.xmd')
writeMovieMd(movie, inputMd, a0, aN, useAlignment=False)

args = '-i %s ' % inputMd
args += '-o %s ' % self._getShiftsFile(movie)
args = '-i "%s" ' % inputMd
args += '-o "%s" ' % self._getShiftsFile(movie)
args += '--sampling %f ' % movie.getSamplingRate()
args += '--max_freq %f ' % self.maxFreq
args += '--Bspline %d ' % self.INTERP_MAP[self.splineOrder.get()]
Expand Down Expand Up @@ -157,10 +157,10 @@ def _processMovie(self, movie):

if self.doSaveAveMic or self.doComputePSD:
fnAvg = self._getExtraPath(self._getOutputMicName(movie))
args += ' --oavg %s' % fnAvg
args += ' --oavg "%s"' % fnAvg

if self.doComputePSD:
fnInitial = os.path.join(movieFolder,"initialMic.mrc")
fnInitial = os.path.join(movieFolder, "initialMic.mrc")
args += ' --oavgInitial %s' % fnInitial

if self.doSaveMovie:
Expand Down
4 changes: 2 additions & 2 deletions pyworkflow/em/packages/xmipp3/protocol_movie_opticalflow.py
Expand Up @@ -140,7 +140,7 @@ def _processMovie(self, movie):
writeMovieMd(movie, inputMd, a0, aN, useAlignment=self.useAlignment)

args = '-i %s ' % inputMd
args += '-o %s ' % self._getOutputShifts(movie)
args += '-o "%s" ' % self._getOutputShifts(movie)
args += ' --frameRange %d %d ' % (0, aN - a0)

if dark:
Expand All @@ -161,7 +161,7 @@ def _processMovie(self, movie):
# We should save the movie either if the user selected it (default)
# or if the PSD is going to be computed
if self.doSaveAveMic or self.doComputePSD:
args += '--oavg %s ' % outMicFn
args += '--oavg "%s" ' % outMicFn

if self.doComputePSD:
args += '--oavgInitial %s ' % aveMic
Expand Down
2 changes: 1 addition & 1 deletion pyworkflow/em/protocol/protocol_align_movies.py
Expand Up @@ -506,7 +506,7 @@ def averageMovie(self, movie, inputFn, outputMicFn, binFactor=1, roi=None,
self.__runXmippProgram('xmipp_movie_alignment_correlation', args)

def computePSD(self, inputMic, oroot, dim=400, overlap=0.7):
args = '--micrograph %s --oroot %s ' % (inputMic, oroot)
args = '--micrograph "%s" --oroot %s ' % (inputMic, oroot)
args += '--dont_estimate_ctf --pieceDim %d --overlap %f' % (dim, overlap)

self.__runXmippProgram('xmipp_ctf_estimate_from_micrograph', args)
Expand Down
6 changes: 0 additions & 6 deletions pyworkflow/em/protocol/protocol_import/base.py
Expand Up @@ -136,12 +136,6 @@ def _defineParams(self, form):
label="File timeout (secs)",
help="Interval of time (in seconds) after which, if a file \n"
"has not changed, we consider it as a new file. \n")

form.addParam('endTokenFile', params.StringParam, default=None,
condition='dataStreaming',
label="End token file",
help="Specify an ending file if you want to have more control\n"
"about when to stop importing files.")

def _defineImportParams(self, form):
""" Override to add options related to the different types
Expand Down
7 changes: 7 additions & 0 deletions pyworkflow/em/protocol/protocol_import/images.py
Expand Up @@ -132,9 +132,16 @@ def importImagesStep(self, pattern, voltage, sphericalAberration,
img.setAcquisition(acquisition)
n = 1
copyOrLink = self.getCopyOrLink()
alreadyWarned = False # Use this flag to warn only once

for i, (fileName, fileId) in enumerate(self.iterFiles()):
dst = self._getExtraPath(basename(fileName))
if ' ' in dst:
if not alreadyWarned:
self.warning('Warning: your file names have white spaces!')
self.warning('Removing white spaces from copies/symlinks.')
alreadyWarned = True
dst = dst.replace(' ', '')
copyOrLink(fileName, dst)
# Handle special case of Imagic images, copying also .img or .hed
self.handleImgHed(copyOrLink, fileName, dst)
Expand Down

0 comments on commit ba45eb1

Please sign in to comment.