cistem.convert.convert module

class cistem.convert.convert.FrealignParFile(filename, mode='r')[source]

Bases: object

Handler class to read/write frealign metadata.

close()[source]
cistem.convert.convert.geometryFromMatrix(matrix)[source]
cistem.convert.convert.matrixFromGeometry(shifts, angles)[source]

Create the transformation matrix from a given 2D shifts in X and Y…and the 3 euler angles.

cistem.convert.convert.parseCtffind4Output(filename)[source]

Retrieve defocus U, V and angle from the output file of the ctffind4 execution.

cistem.convert.convert.readCoordinates(mic, fn, coordsSet)[source]
cistem.convert.convert.readCtfModel(ctfModel, filename)[source]
cistem.convert.convert.readSetOfCoordinates(workDir, micSet, coordSet)[source]

Read from cisTEM .plt files.

cistem.convert.convert.readSetOfParticles(inputSet, outputSet, parFileName)[source]

Iterate through the inputSet and the parFile lines and populate the outputSet with the same particles of inputSet, but with the angles and shift (3d alignment) updated from the parFile info. It is assumed that the order of iteration of the particles and the lines match and have the same number.

cistem.convert.convert.readShiftsMovieAlignment(shiftFn)[source]
cistem.convert.convert.rowToAlignment(alignmentRow, samplingRate)[source]

Return an Transform object representing the Alignment from a given parFile row.

cistem.convert.convert.rowToCtfModel(ctfRow, ctfModel)[source]
cistem.convert.convert.setWrongDefocus(ctfModel)[source]
cistem.convert.convert.writeReferences(inputSet, outputFn)[source]

Write references star and stack files from SetOfAverages or SetOfClasses2D. Params:

inputSet: the input SetOfParticles to be converted outputFn: where to write the output files.
cistem.convert.convert.writeShiftsMovieAlignment(movie, shiftsFn, s0, sN)[source]