tomo.protocols.protocol_ts_import module

class tomo.protocols.protocol_ts_import.MDoc(fileName, voltage=None, magnification=None, samplingRate=None, doseProvidedByUser=None, tiltAngleProvidedByUser=None)[source]

Bases: object

getFileName()[source]
getMagnification()[source]
getSamplingRate()[source]
getTiltAxisAngle()[source]
getTiltsMetadata()[source]
getTsId()[source]
getVoltage()[source]
read(isImportingTsMovies=True, ignoreFilesValidation=False)[source]
class tomo.protocols.protocol_ts_import.ProtImportTs(**args)[source]

Bases: tomo.protocols.protocol_ts_import.ProtImportTsBase

Protocol to import tilt series.

class tomo.protocols.protocol_ts_import.ProtImportTsBase(**args)[source]

Bases: pwem.protocols.protocol_import.base.ProtImport, tomo.protocols.protocol_base.ProtTomoBase

Base class for Tilt-Series and Tilt-SeriesMovies import protocols.

ANGLES_FROM_FILENAME = 'Filename'
ANGLES_FROM_HEADER = 'Header'
ANGLES_FROM_MDOC = 'Mdoc'
ANGLES_FROM_RANGE = 'Range'
ANGLES_FROM_TLT = 'Tlt'
IMPORT_COPY_FILES = 0
IMPORT_FROM_FILES = 0
MDOC_DATA_SOURCE = False
NOT_MDOC_GUI_COND = 'filesPattern is None or (filesPattern is not None and ".mdoc" not in filesPattern)'
accumDoses = None
acquisitions = None

Calls the copy or link method chosen by the user in importAction option

fileModified(fileName, fileTimeout)[source]

Check if the fileName modification time is less than a given timeout. Params:

fileName: input filename that will be checked. fileTimeout: timeout
getActions()[source]

This method will allow that the ‘Stop import’ action to appears in the GUI when the user right-click in the protocol import box. It will allow a user to manually stop the streaming.

getMatchingFiles(fileTimeOut=None, isValidation=False)[source]

Return an ordered dict with TiltSeries found in the files as key and a list of all tilt images of that series as value.

importStep()[source]

Copy images matching the filename pattern Register other parameters.

incomingDose = None
isBlacklisted(fileName)[source]

Overwrite in subclasses

isInStreaming()[source]
meanDosesPerFrame = None
sRates = None
stopImport()[source]

Since the actual protocol that is running is in a different process that the one that this method will be invoked from the GUI, we will use a simple mechanism to place an special file to stop the streaming.

streamingHasFinished()[source]
classmethod worksInStreaming()[source]
class tomo.protocols.protocol_ts_import.ProtImportTsMovies(**args)[source]

Bases: tomo.protocols.protocol_ts_import.ProtImportTsBase

Protocol to import tilt series movies.

class tomo.protocols.protocol_ts_import.TiltMetadata(angle=None, angleFile=None, acqOrder=None, accumDose=None, incomingDose=None)[source]

Bases: object

getAccumDose()[source]
getAcqOrder()[source]
getAngleMovieFile()[source]
getIncomingDose()[source]
getTiltAngle()[source]
setAccumDose(accumDose)[source]
setAcqOorder(order)[source]
setAngleMovieFile(angleMovieFile)[source]
setIncomingDose(incDose)[source]
setTiltAngle(tiltAngle)[source]
tomo.protocols.protocol_ts_import.normalizeTSId(rawTSId)[source]

Normalizes the name of a TS to prevent sqlite errors, it ends up as a table in a set