sphire.convert module¶
-
class
sphire.convert.
CoordBoxReader
(boxSize, yFlipHeight=None, boxSizeEstimated=False)[source]¶ Bases:
object
Helper class to read coordinates from .BOX files.
-
class
sphire.convert.
CoordBoxWriter
(boxSize, yFlipHeight=None)[source]¶ Bases:
object
Helper class to write a .BOX file for cryolo.
-
sphire.convert.
convertMicrographs
(micList, micDir)[source]¶ Convert (or simply link) input micrographs into the given directory in a format that is compatible with crYOLO.
-
sphire.convert.
getFlipYHeight
(filename)[source]¶ Return y-Height if flipping is needed, None otherwise
-
sphire.convert.
getMicIdName
(mic, suffix='')[source]¶ Return a name for the micrograph based on its IDs.
-
sphire.convert.
readMicrographCoords
(mic, coordSet, coordsFile, boxSize, yFlipHeight=None, boxSizeEstimated=False)[source]¶
-
sphire.convert.
roundInputSize
(inputSize)[source]¶ Returns the closest value to inputSize th is multiple of 32
-
sphire.convert.
roundTo
(number, base=1.0)[source]¶ Returns the closest int value to number that is multiple of base
-
sphire.convert.
writeSetOfCoordinates
(boxDir, coordSet, micList=None)[source]¶ Convert a SetOfCoordinates to Cryolo box files. Params:
boxDir: the output directory where to generate the files. coordSet: the input SetOfCoordinates that will be converted. micList: if not None, only coordinates from this micrographs
will be written.