relion.convert.convert_deprecated module

relion.convert.convert_deprecated.acquisitionToRow(acquisition, ctfRow)[source]

Set labels values from acquisition to md row.

relion.convert.convert_deprecated.alignmentToRow(alignment, alignmentRow, 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

relion.convert.convert_deprecated.coordinateToRow(coord, coordRow, copyId=True)[source]

Set labels values from Coordinate coord to md row.

relion.convert.convert_deprecated.copyOrLinkFileName(imgRow, prefixDir, outputDir, copyFiles=False)[source]
relion.convert.convert_deprecated.ctfModelToRow(ctfModel, ctfRow)[source]

Set labels values from ctfModel to md row.

relion.convert.convert_deprecated.geometryFromMatrix(matrix, inverseTransform)[source]
relion.convert.convert_deprecated.imageToRow(img, imgRow, imgLabel=447, **kwargs)[source]
relion.convert.convert_deprecated.matrixFromGeometry(shifts, angles, inverseTransform)[source]

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

relion.convert.convert_deprecated.objectToRow(obj, row, attrDict, extraLabels=[])[source]

This function will convert an EMObject into a XmippMdRow. Params:

obj: the EMObject instance (input) row: the XmippMdRow instance (output) attrDict: dictionary with the map between obj attributes(keys) and

row MDLabels in Xmipp (values).

extraLabels: a list with extra labels that could be included

as _xmipp_labelName

relion.convert.convert_deprecated.particleToRow(part, partRow, **kwargs)[source]

Set labels values from Particle to md row.

relion.convert.convert_deprecated.readCoordinates(mic, fileName, coordsSet)[source]
relion.convert.convert_deprecated.readSetOfCoordinates(coordSet, coordFiles, micList=None)[source]

Read a set of coordinates from given coordinate files associated to some SetOfMicrographs. Params:

micSet and coordFiles should have same length and same order. coordSet: empty SetOfCoordinates to be populated.

relion.convert.convert_deprecated.readSetOfParticles(filename, imgSet, rowToFunc=<function rowToParticle>, **kwargs)[source]

read from Relion image meta filename: The metadata filename where the image are. imgSet: the SetOfParticles that will be populated. rowToParticle: this function will be used to convert the row to Object

relion.convert.convert_deprecated.rowToAcquisition(acquisitionRow)[source]

Create an acquisition from a row of a meta

relion.convert.convert_deprecated.rowToAlignment(alignmentRow, 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

relion.convert.convert_deprecated.rowToCoordinate(coordRow)[source]

Create a Coordinate from a row of a meta

relion.convert.convert_deprecated.rowToCtfModel(ctfRow)[source]

Create a CTFModel from a row of a meta

relion.convert.convert_deprecated.rowToObject(row, obj, attrDict, extraLabels=[])[source]

This function will convert from a XmippMdRow to an EMObject. Params:

row: the XmippMdRow instance (input) obj: the EMObject instance (output) attrDict: dictionary with the map between obj attributes(keys) and

row MDLabels in Xmipp (values).

extraLabels: a list with extra labels that could be included

as properties with the label name such as: _rlnSomeThing

relion.convert.convert_deprecated.rowToParticle(partRow, particleClass=<class 'pwem.objects.data.Particle'>, **kwargs)[source]

Create a Particle from a row of a meta

relion.convert.convert_deprecated.rowToVolume(volRow, **kwargs)[source]

Create a Volume object from a row of metadata.

relion.convert.convert_deprecated.setObjId(obj, mdRow, label=449)[source]
relion.convert.convert_deprecated.setOfImagesToMd(imgSet, imgMd, imgToFunc, **kwargs)[source]

This function will fill Relion metadata from a SetOfMicrographs Params:

imgSet: the set of images to be converted to metadata md: metadata to be filled rowFunc: this function can be used to setup the row before

adding to meta

relion.convert.convert_deprecated.setPsdFiles(ctfModel, ctfRow)[source]

Set the PSD files of CTF estimation related to this ctfModel. The values will be read from the ctfRow if present.

relion.convert.convert_deprecated.setRowId(mdRow, obj, label=449)[source]
relion.convert.convert_deprecated.setupCTF(imgRow, sampling)[source]

Do some validations and set some values for Relion import.

relion.convert.convert_deprecated.volumeToRow(vol, volRow, **kwargs)[source]

Set labels values from Micrograph mic to md row.

relion.convert.convert_deprecated.writeReferences(inputSet, outputRoot, useBasename=False, **kwargs)[source]

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

inputSet: the input SetOfParticles to be converted outputRoot: where to write the output files. basename: If True, use the basename of the stack for setting path.

relion.convert.convert_deprecated.writeSetOfImages(imgSet, filename, imgToFunc, blockName='Images', **kwargs)[source]

This function will write a SetOfImages as metadata. Params:

imgSet: the set of images to be written (particles, micrographs or volumes) filename: the filename where to write the metadata.` rowFunc: this function can be used to setup the row before

adding to metadata.

relion.convert.convert_deprecated.writeSetOfVolumes(volSet, filename, blockName='Volumes', **kwargs)[source]