emantomo.convert.convert module

emantomo.convert.convert.alignmentToRow(alignment, alignType)[source]
is2D == True-> matrix is 2D (2D images alignment)
otherwise matrix is 3D (3D volume alignment or projection)
invTransform == True -> for xmipp implies projection
-> for xmipp implies alignment
emantomo.convert.convert.calculatePhaseShift(ampcont)[source]
emantomo.convert.convert.convertImage(inputLoc, outputLoc)[source]

This function will allow us to use EMAN2 to write some formats not currently supported by the native image library (Xmipp). Underneath, it will call an script to do the job.

emantomo.convert.convert.convertReferences(refSet, outputFn)[source]

Simplified version of writeSetOfParticles function. Writes out an hdf stack.

emantomo.convert.convert.geometryFromMatrix(matrix, inverseTransform)[source]
emantomo.convert.convert.getImageDimensions(imageFile)[source]

This function will allow us to use EMAN2 to read some formats not currently supported by the native image library (Xmipp). Underneath, it will call a script to do the job.

emantomo.convert.convert.getLastParticlesParams(directory)[source]

Return a dictionary containing the params values of the last iteration.

Key: Particle index (int) Value: Dict[{coverage: float, score: float, alignMatrix: list[float]}]

emantomo.convert.convert.iterLstFile(filename)[source]
emantomo.convert.convert.iterSubtomogramsByVol(subtomogramSet)[source]

Iterate subtomograms ordered by tomogram

emantomo.convert.convert.jsonToCtfModel(ctfJsonFn, ctfModel)[source]

Create a CTFModel from a json file

emantomo.convert.convert.jsons2SetCoords3D(protocol, setTomograms, outPath)[source]
emantomo.convert.convert.loadJson(jsonFn)[source]

This function loads the Json dictionary into memory

emantomo.convert.convert.matrixFromGeometry(shifts, angles, inverseTransform)[source]

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

emantomo.convert.convert.readCTFModel(ctfModel, filename)[source]
emantomo.convert.convert.readCoordinate3D(box, inputTomo, origin=<function <lambda>>, scale=1)[source]
emantomo.convert.convert.readSetOfCoordinates3D(jsonBoxDict, coord3DSetDict, inputTomo, updateItem=None, origin=<function <lambda>>, scale=1)[source]
emantomo.convert.convert.rowToAlignment(alignmentList, alignType)[source]
is2D == True-> matrix is 2D (2D images alignment)
otherwise matrix is 3D (3D volume alignment or projection)

invTransform == True -> for xmipp implies projection

emantomo.convert.convert.setCoords3D2Jsons(setTomograms, setCoords, path)[source]
emantomo.convert.convert.setWrongDefocus(ctfModel)[source]
emantomo.convert.convert.updateSetOfSubTomograms(inputSetOfSubTomograms, outputSetOfSubTomograms, particlesParams)[source]

Update a set of subtomograms from a template and copy attributes coverage/score/transform

emantomo.convert.convert.writeCTFModel(ctfObj, filename)[source]

Write a CTFModel object as Xmipp .ctfparam

emantomo.convert.convert.writeJson(jsonDict, jsonFn)[source]

This function write a Json dictionary

emantomo.convert.convert.writeSetOfSubTomograms(subtomogramSet, path, **kwargs)[source]

Convert the imgSet particles to .hdf files as expected by Eman. This function should be called from a current dir where the images in the set are available.