susan.project.ProjectionExtractor

class susan.project.Extractor.ProjectionExtractor(num_threads=1)[source]

Bases: object

Crop 2-D projection patches and export them with RELION-compatible metadata.

Warning

This is an experimental class. The interface and output format may change in future versions.

Uses CropProjection to extract per-particle 2-D projection stacks and writes a RELION STAR file (particles.star) inside the output folder.

Attributes

proj_cropper

Underlying cropping module. Parameters (e.g. normalize_type) can be adjusted directly on this object before calling crop_projections().

Type:

CropProjection

Methods

crop_projections(output_folder, tomos_file, ptcls_in, box_size)[source]

Crop projection patches and write a RELION STAR metadata file.

Projection stacks are written by proj_cropper as stack_NN.txt files in output_folder. These are then assembled into a single RELION 3.1 STAR file <output_folder>/particles.star with data_optics and data_particles blocks.

Parameters:
  • output_folder (str) – Directory where the cropped stacks and STAR file are written.

  • tomos_file (str) – Path to the .tomostxt file describing the tomogram stack.

  • ptcls_in (str) – Path to the input .ptclsraw particles file.

  • box_size (int) – Side length of the 2-D crop box in pixels.