- class tomo.convert.mdoc.MDoc(fileName, voltage=None, magnification=None, samplingRate=None, doseProvidedByUser=None, tiltAngleProvidedByUser=None)¶
class to interact with the IMOD “autodoc” files used by serialEM. This format consists of keyword-value pairs organized into blocks called sections. A section begins with a bracketed key-value pair:
[sectionType = name]
where the section “name” or value will typically be unique. Lines below a section header of the form
key = value
provide data associated with that section.
In addition, key-value pairs can occur at the beginning of the file, before any section header, and these are referred to as global values. Files with extension “.mdoc” provides data about an MRC file and has the same name as the image file, with the additional extension “.mdoc”. In these files, the main section type is “ZValue” and the name for each section is the Z value of the image in the file, numbered from 0. A description of each key is available at URL: https://bio3d.colorado.edu/SerialEM/hlp/html/about_formats.htm
Additional information may be stored in section headers of the type “T” (i.e. [T a = b ]). In theory these information in also stored in the “titles” of the MRC files.
Example of mdoc file
DataMode = 6 # MRC type ImageSize = 4096 4096 # x, y dim ImageFile = 20211130_PKV_tomo_01.mrc # image with tilt series PixelSpacing = 3.64 # A/px Voltage = 200.00 # kvolt
[T = Tomography: TALOS-D3558 21-Nov-30 17:42:06] [T = TiltAxisAngle = -91.81 Binning = 1 SpotSize = 7]
[ZValue = 0] # first movie TiltAngle = -0.01 … [ZValue = 1] # second movie TiltAngle = -10.00 …
- read(isImportingTsMovies=True, ignoreFilesValidation=False)¶
Parse mdoc file. There is a collection of getters that may be used to access this information:
- class tomo.convert.mdoc.TiltMetadata(angle=None, angleFile=None, acqOrder=None, accumDose=None, incomingDose=None)¶
Normalizes the name of a TS to prevent sqlite errors, it ends up as a table in a set