bsoft.convert module

bsoft.convert.createBsoftInputParticles(imgSet, starFile, stackFile)[source]

Ensure that ‘starFile’ is a valid STAR files with particles. If the imgSet comes from Bsoft, just create a link. If not, then write the proper file.

bsoft.convert.readSetOfCoordinates(outputDir, micSet, coordSet)[source]

Read from Bsoft .star files. Params:

outputDir: the directory where the .star files are.

micSet: the SetOfMicrographs to associate the .star, which
name should be the same of the micrographs.

coordSet: the SetOfCoordinates that will be populated.

bsoft.convert.rowFromMd(mdata, objId)[source]
bsoft.convert.rowToCoordinate(coordRow)[source]

Create a Coordinate from a row of a metadata.

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

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

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

row MDLabels in Bsoft (values).
bsoft.convert.writeSetOfParticles(imgSet, starFile, stackFile)[source]

This function will write a SetOfImages as Bsoft metadata. Params:

imgSet: the SetOfImages instance. starFile: the filename where to write the metadata.