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.appendJson(jsonDict, jsonFn, indent=None)[source]

Append a new dictionary to a already existing Json file

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.ctf2Json(json_files, ctfSeries, mode='w')[source]
emantomo.convert.convert.geometryFromMatrix(matrix, inverseTransform, axes='szyz')[source]

Convert the transformation matrix to shifts and angles.

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.jsonFilesFromSet(setScipion, path)[source]
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 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, groupId=None)[source]
emantomo.convert.convert.recoverTSFromObj(child_obj, protocol)[source]
emantomo.convert.convert.refinement2Json(protocol, subTomos, mode='w')[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(json_files, setCoords, mode='w')[source]
emantomo.convert.convert.setWrongDefocus(ctfModel)[source]
emantomo.convert.convert.tltParams2Json(json_files, tltSeries, mode='w')[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, indent=None)[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.