Skip to content

CopickPicksFile

copick.models.CopickPicksFile

Bases: BaseModel

Datamodel for a collection of locations, orientations and other metadata for one pickable object.

Attributes:

  • pickable_object_name (str) –

    Pickable object name from CopickConfig.pickable_objects[X].name

  • user_id (str) –

    Unique identifier for the user or tool name.

  • session_id (Union[str, Literal['0']]) –

    Unique identifier for the pick session (prevent race if they run multiple instances of napari, ChimeraX, etc.) If it is 0, this pick was generated by a tool.

  • run_name (Optional[str]) –

    Name of the run this pick belongs to.

  • voxel_spacing (Optional[float]) –

    Voxel spacing for the tomogram this pick belongs to.

  • unit (str) –

    Unit for the location of the pick.

  • points (List[CopickPoint]) –

    References to the points for this pick.

  • trust_orientation (Optional[bool]) –

    Flag to indicate if the angles are known for this pick or should be ignored.

pickable_object_name: str

user_id: str

session_id: Union[str, Literal['0']]

run_name: Optional[str] = None

voxel_spacing: Optional[float] = None

unit: str = 'angstrom'

points: Optional[List[CopickPoint]] = None

trust_orientation: Optional[bool] = True


copick.models.CopickPoint

Bases: BaseModel

Point in 3D space with an associated orientation, score value and instance ID.

Attributes:

location: CopickLocation

transformation_: Optional[List[List[float]]] = [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]

instance_id: Optional[int] = 0

score: Optional[float] = 1.0

model_config = {'arbitrary_types_allowed': True}

transformation: np.ndarray

The transformation necessary to transform coordinates from the object space to the tomogram space.

Returns:

  • ndarray

    np.ndarray: 4x4 transformation matrix.

validate_transformation(v) -> List[List[float]]

Validate the transformation matrix.


copick.models.CopickLocation

Bases: BaseModel

Location in 3D space.

Attributes:

  • x (float) –

    x-coordinate.

  • y (float) –

    y-coordinate.

  • z (float) –

    z-coordinate.

x: float

y: float

z: float