Skip to content

CopickAlignmentFile

copick.models.CopickAlignmentFile

Bases: BaseModel

An alignment of a tilt series: per-section rigid projection parameters and where they apply.

Stored as {run}/Alignments/{name}.json, CETS-shaped (see copick.util.cets).

Attributes:

  • name (str) –

    Name of the alignment, unique within its run.

  • run_name (Optional[str]) –

    Name of the run.

  • tilt_series (Optional[str]) –

    Type of the tilt series the alignment aligns.

  • tilt_series_portal_id (Optional[int]) –

    CryoET Data Portal identifier of that tilt series, if it is one.

  • linked_tomograms (List[str]) –

    Read-only tomograms reconstructed with this alignment that do not record it themselves, as "{tomo_type}@{voxel_size:.3f}".

  • alignment_type (Literal['GLOBAL', 'LOCAL']) –

    GLOBAL or LOCAL. Of a local alignment only the rigid (global) part is stored.

  • method (Optional[str]) –

    Method that computed the alignment (e.g. patch_tracking).

  • source_format (Optional[str]) –

    Format the alignment was imported from (e.g. ARETOMO3).

  • native_frame (Dict[str, str]) –

    Centre conventions of the source (image_center, volume_center: half or floor).

  • status (Literal['author', 'portal_default', 'no_per_section', 'inconsistent']) –

    author for an alignment from its author; portal_default for a CryoET Data Portal placeholder alignment, no_per_section for another alignment without per-section parameters, inconsistent for one that does not fit its tilt series.

  • is_portal_standard (Optional[bool]) –

    Whether the CryoET Data Portal marks the alignment as its standard.

  • preferred (bool) –

    Whether the alignment is preferred over others of its tilt series.

  • rigid_part_of_local (bool) –

    Whether this is the rigid part of a local alignment.

  • reference_volume (Optional[CopickReferenceVolume]) –

    The volume the positions refer to.

  • sections (List[CopickSectionAlignment]) –

    Per-section parameters, ordered by section.

  • excluded_sections (List[CopickExcludedSection]) –

    Sections not aligned.

  • tilt_offset (Optional[float]) –

    Tilt-angle offset reported by the source in degrees; included in tilt_angle.

  • x_rotation_offset (Optional[float]) –

    Offset of the rotation about x reported by the source in degrees.

  • warnings (List[str]) –

    Losses or assumptions of the import.

  • provenance (Dict[str, Any]) –

    Where the alignment came from (program, files, portal identifiers).

name

name: str

run_name

run_name: Optional[str] = None

tilt_series

tilt_series: Optional[str] = None

tilt_series_portal_id

tilt_series_portal_id: Optional[int] = None

linked_tomograms

linked_tomograms: List[str] = Field(default_factory=list)

alignment_type

alignment_type: Literal['GLOBAL', 'LOCAL'] = 'GLOBAL'

method

method: Optional[str] = None

source_format

source_format: Optional[str] = None

native_frame

native_frame: Dict[str, str] = Field(default_factory=lambda: {'image_center': 'floor', 'volume_center': 'floor'})

status

status: Literal['author', 'portal_default', 'no_per_section', 'inconsistent'] = 'author'

is_portal_standard

is_portal_standard: Optional[bool] = None

preferred

preferred: bool = False

rigid_part_of_local

rigid_part_of_local: bool = False

reference_volume

reference_volume: Optional[CopickReferenceVolume] = None

sections

sections: List[CopickSectionAlignment] = Field(default_factory=list)

excluded_sections

excluded_sections: List[CopickExcludedSection] = Field(default_factory=list)

tilt_offset

tilt_offset: Optional[float] = None

x_rotation_offset

x_rotation_offset: Optional[float] = None

warnings

warnings: List[str] = Field(default_factory=list)

provenance

provenance: Dict[str, Any] = Field(default_factory=dict)

is_valid

is_valid: bool

Whether the alignment comes from its author and has per-section parameters.

portal_alignment_id

portal_alignment_id: Optional[int]

CryoET Data Portal identifier of the alignment, if it is one.