Пример #1
0
    def _argsSummovie(self, movieNameMrc, movieFolder, movieId, numberOfFrames):
        args = {}

        args['movieName'] = movieNameMrc
        args['numberOfFramesPerMovie'] = numberOfFrames
        args['micFnName'] = relpath(self._getMicName(movieNameMrc), movieFolder)
        args['shiftFnName'] = self._getShiftFnName(movieId)
        args['samplingRate'] = self.samplingRate
        args['voltage'] = self.inputMovies.get().getAcquisition().getVoltage()
        args['fscFn'] = self._getFSCFnName(movieId)
        args['Bfactor'] = self.Bfactor.get()
        args['doApplyDoseFilter'] = 'YES' if self.doApplyDoseFilter else 'NO'
        args['doRestoreNoisePower'] = 'YES' if self.doRestoreNoisePower else 'NO'
        args['doVerboseOutput'] = 'YES' if self.doVerboseOutput else 'NO'
        args['exposurePerFrame'] = self.exposurePerFrame.get()

        self._program = 'export OMP_NUM_THREADS=1; ' + SUMMOVIE_PATH
        self._args = """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(fscFn)s
1
%(numberOfFramesPerMovie)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
0
%(doRestoreNoisePower)s
eof
""" % args
Пример #2
0
    def _argsUnblur(self, movieNameMrc, movieFolder, movieId, numberOfFrames):
        """ Format argument for call unblur program. """
        args = {}

        args['movieName'] = movieNameMrc
        args['numberOfFramesPerMovie'] = numberOfFrames
        args['micFnName'] = relpath(self._getMicName(movieNameMrc),
                                    movieFolder)
        args['shiftFnName'] = self._getShiftFnName(movieId)
        args['samplingRate'] = self.samplingRate
        args['voltage'] = self.inputMovies.get().getAcquisition().getVoltage()
        args['fscFn'] = self._getFSCFnName(movieId)
        args['Bfactor'] = self.Bfactor.get()
        args['minShiftInitSearch'] = self.minShiftInitSearch.get()
        args['OutRadShiftLimit'] = self.OutRadShiftLimit.get()
        args['HWVertFourMask'] = self.HWVertFourMask.get()
        args['HWHoriFourMask'] = self.HWHoriFourMask.get()
        args['terminationShiftThreshold'] = self.terminationShiftThreshold.get(
        )
        args['maximumNumberIterations'] = self.maximumNumberIterations.get()
        args['doApplyDoseFilter'] = 'YES' if self.doApplyDoseFilter else 'NO'
        args[
            'doRestoreNoisePower'] = 'YES' if self.doRestoreNoisePower else 'NO'
        args['doVerboseOutput'] = 'YES' if self.doVerboseOutput else 'NO'
        args['exposurePerFrame'] = self.exposurePerFrame.get()

        self._program = 'export OMP_NUM_THREADS=1; ' + UNBLUR_PATH
        self._args = """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
YES
%(fscFn)s
%(minShiftInitSearch)f
%(OutRadShiftLimit)f
%(Bfactor)f
%(HWVertFourMask)d
%(HWHoriFourMask)d
%(terminationShiftThreshold)f
%(maximumNumberIterations)d
%(doRestoreNoisePower)s
%(doVerboseOutput)s
eof
""" % args
Пример #3
0
    def _argsSummovie(
        self, movieName, movieFolder, movieId, numberOfFramesPerMovie, doApplyDoseFilter, exposurePerFrame
    ):
        """format input as Summovie likes it"""
        args = {}

        args["movieName"] = movieName
        args["numberOfFramesPerMovie"] = numberOfFramesPerMovie
        ##args['micFnName'] = self._getMicFnName(movieId,movieFolder)
        args["micFnName"] = relpath(self._getExtraPath(self._getNameExt(movieName, "", "mrc")), movieFolder)
        args["shiftFnName"] = self._getShiftFnName(movieId)
        args["samplingRate"] = self.samplingRate
        args["voltage"] = self.inputMovies.get().getAcquisition().getVoltage()
        args["fscFn"] = self._getFSCFnName(movieId)
        args["Bfactor"] = self.Bfactor.get()
        doRestoreNoisePower = self.doRestoreNoisePower.get()

        if doApplyDoseFilter:
            args["doApplyDoseFilter"] = "YES"
        else:
            args["doApplyDoseFilter"] = "NO"
        if doRestoreNoisePower:
            args["doRestoreNoisePower"] = "YES"
        else:
            args["doRestoreNoisePower"] = "NO"

        args["exposurePerFrame"] = exposurePerFrame

        self._program = "export OMP_NUM_THREADS=1; " + SUMMOVIE_PATH
        self._args = (
            """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(fscFn)s
1
%(numberOfFramesPerMovie)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
0
%(doRestoreNoisePower)s
eof
"""
            % args
        )
Пример #4
0
    def _argsUnblur(self, movieNameMrc, movieFolder, movieId, numberOfFrames):
        """ Format argument for call unblur program. """
        args = {}

        args['movieName'] = movieNameMrc
        args['numberOfFramesPerMovie'] = numberOfFrames
        args['micFnName'] = relpath(self._getMicName(movieNameMrc), movieFolder)
        args['shiftFnName'] = self._getShiftFnName(movieId)
        args['samplingRate'] = self.samplingRate
        args['voltage'] = self.inputMovies.get().getAcquisition().getVoltage()
        args['fscFn'] = self._getFSCFnName(movieId)
        args['Bfactor'] = self.Bfactor.get()
        args['minShiftInitSearch'] = self.minShiftInitSearch.get()
        args['OutRadShiftLimit'] = self.OutRadShiftLimit.get()
        args['HWVertFourMask'] = self.HWVertFourMask.get()
        args['HWHoriFourMask'] = self.HWHoriFourMask.get()
        args['terminationShiftThreshold'] = self.terminationShiftThreshold.get()
        args['maximumNumberIterations'] = self.maximumNumberIterations.get()
        args['doApplyDoseFilter'] = 'YES' if self.doApplyDoseFilter else 'NO'
        args['doRestoreNoisePower'] = 'YES' if self.doRestoreNoisePower else 'NO'
        args['doVerboseOutput'] = 'YES' if self.doVerboseOutput else 'NO'
        args['exposurePerFrame'] = self.exposurePerFrame.get()

        self._program = 'export OMP_NUM_THREADS=1; ' + UNBLUR_PATH
        self._args = """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
YES
%(fscFn)s
%(minShiftInitSearch)f
%(OutRadShiftLimit)f
%(Bfactor)f
%(HWVertFourMask)d
%(HWHoriFourMask)d
%(terminationShiftThreshold)f
%(maximumNumberIterations)d
%(doRestoreNoisePower)s
%(doVerboseOutput)s
eof
""" % args
Пример #5
0
    def _argsSummovie(self, movieNameMrc, movieFolder, movieId,
                      numberOfFrames):
        args = {}

        args['movieName'] = movieNameMrc
        args['numberOfFramesPerMovie'] = numberOfFrames
        args['micFnName'] = relpath(self._getMicName(movieNameMrc),
                                    movieFolder)
        args['shiftFnName'] = self._getShiftFnName(movieId)
        args['samplingRate'] = self.samplingRate
        args['voltage'] = self.inputMovies.get().getAcquisition().getVoltage()
        args['fscFn'] = self._getFSCFnName(movieId)
        args['Bfactor'] = self.Bfactor.get()
        args['doApplyDoseFilter'] = 'YES' if self.doApplyDoseFilter else 'NO'
        args[
            'doRestoreNoisePower'] = 'YES' if self.doRestoreNoisePower else 'NO'
        args['doVerboseOutput'] = 'YES' if self.doVerboseOutput else 'NO'
        args['exposurePerFrame'] = self.exposurePerFrame.get()

        self._program = 'export OMP_NUM_THREADS=1; ' + SUMMOVIE_PATH
        self._args = """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(fscFn)s
1
%(numberOfFramesPerMovie)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
0
%(doRestoreNoisePower)s
eof
""" % args
Пример #6
0
 def _getMicFnName(self, movieId, movieFolder):
     return relpath(self._getExtraPath("aligned_sum_%06d.mrc" % movieId), movieFolder)
Пример #7
0
 def _getMicFnName(self, movieId, movieFolder):
     return relpath(self._getExtraPath('aligned_sum_%06d.mrc' % movieId),
                    movieFolder)
Пример #8
0
    def _argsUnblur(self
                    , movieName
                    , movieFolder
                    , movieId
                    , numberOfFramesPerMovie
                    , doApplyDoseFilter
                    , exposurePerFrame):
        """format input as unblur likes it"""
        args = {}

        args['movieName'] = movieName
        args['numberOfFramesPerMovie'] = numberOfFramesPerMovie
        args['micFnName'] = relpath(self._getExtraPath(self._getNameExt(movieName,'', 'mrc')),movieFolder)
        #args['micFnName'] = self._getMicFnName(movieId,movieFolder)
        args['shiftFnName'] = self._getShiftFnName(movieId)
        args['samplingRate'] = self.samplingRate
        args['voltage'] = self.inputMovies.get().getAcquisition().getVoltage()
        args['fscFn'] = self._getFSCFnName(movieId)
        args['Bfactor'] = self.Bfactor.get()
        args['minShiftInitSearch'] = self.minShiftInitSearch.get()
        args['OutRadShiftLimit'] = self.OutRadShiftLimit.get()
        args['HWVertFourMask'] = self.HWVertFourMask.get()
        args['HWHoriFourMask'] = self.HWHoriFourMask.get()
        args['terminationShiftThreshold'] = self.terminationShiftThreshold.get()
        args['maximumNumberIterations'] = self.maximumNumberIterations.get()
        doRestoreNoisePower = self.doRestoreNoisePower.get()
        doVerboseOutput = self.doVerboseOutput.get()

        args['HWVertFourMask'] = self.HWVertFourMask.get()

        args['HWVertFourMask'] = self.HWVertFourMask.get()

        if doApplyDoseFilter:
            args['doApplyDoseFilter'] = 'YES'
        else:
            args['doApplyDoseFilter'] = 'NO'
        if doRestoreNoisePower:
            args['doRestoreNoisePower'] = 'YES'
        else:
            args['doRestoreNoisePower'] = 'NO'
        if doVerboseOutput:
            args['doVerboseOutput'] = 'YES'
        else:
            args['doVerboseOutput'] = 'NO'

        args['exposurePerFrame'] = exposurePerFrame

        self._program = 'export OMP_NUM_THREADS=1; ' + UNBLUR_PATH
        self._args = """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
YES
%(fscFn)s
%(minShiftInitSearch)f
%(OutRadShiftLimit)f
%(Bfactor)f
%(HWVertFourMask)d
%(HWHoriFourMask)d
%(terminationShiftThreshold)f
%(maximumNumberIterations)d
%(doRestoreNoisePower)s
%(doVerboseOutput)s
eof
"""%args
Пример #9
0
    def _argsUnblur(self, movieName, movieFolder, movieId, numberOfFramesPerMovie, doApplyDoseFilter, exposurePerFrame):
        """format input as unblur likes it"""
        args = {}

        args["movieName"] = movieName
        args["numberOfFramesPerMovie"] = numberOfFramesPerMovie
        args["micFnName"] = relpath(self._getExtraPath(self._getNameExt(movieName, "", "mrc")), movieFolder)
        # args['micFnName'] = self._getMicFnName(movieId,movieFolder)
        args["shiftFnName"] = self._getShiftFnName(movieId)
        args["samplingRate"] = self.samplingRate
        args["voltage"] = self.inputMovies.get().getAcquisition().getVoltage()
        args["fscFn"] = self._getFSCFnName(movieId)
        args["Bfactor"] = self.Bfactor.get()
        args["minShiftInitSearch"] = self.minShiftInitSearch.get()
        args["OutRadShiftLimit"] = self.OutRadShiftLimit.get()
        args["HWVertFourMask"] = self.HWVertFourMask.get()
        args["HWHoriFourMask"] = self.HWHoriFourMask.get()
        args["terminationShiftThreshold"] = self.terminationShiftThreshold.get()
        args["maximumNumberIterations"] = self.maximumNumberIterations.get()
        doRestoreNoisePower = self.doRestoreNoisePower.get()
        doVerboseOutput = self.doVerboseOutput.get()

        args["HWVertFourMask"] = self.HWVertFourMask.get()

        args["HWVertFourMask"] = self.HWVertFourMask.get()

        if doApplyDoseFilter:
            args["doApplyDoseFilter"] = "YES"
        else:
            args["doApplyDoseFilter"] = "NO"
        if doRestoreNoisePower:
            args["doRestoreNoisePower"] = "YES"
        else:
            args["doRestoreNoisePower"] = "NO"
        if doVerboseOutput:
            args["doVerboseOutput"] = "YES"
        else:
            args["doVerboseOutput"] = "NO"

        args["exposurePerFrame"] = exposurePerFrame

        self._program = "export OMP_NUM_THREADS=1; " + UNBLUR_PATH
        self._args = (
            """ << eof
%(movieName)s
%(numberOfFramesPerMovie)s
%(micFnName)s
%(shiftFnName)s
%(samplingRate)f
%(doApplyDoseFilter)s
%(exposurePerFrame)f
%(voltage)f
YES
%(fscFn)s
%(minShiftInitSearch)f
%(OutRadShiftLimit)f
%(Bfactor)f
%(HWVertFourMask)d
%(HWHoriFourMask)d
%(terminationShiftThreshold)f
%(maximumNumberIterations)d
%(doRestoreNoisePower)s
%(doVerboseOutput)s
eof
"""
            % args
        )