session

Contents

session#

Classes:

DataManagementStat

Statistics about a specific set of session data and associated storage statuses

DataManagementStats

Statistics and storage statuses for data available in a session

ExposureGroup

Full exposure group defintion, not all properties are externally editable

ExposureGroupUpdate

Public editable properties for exposure group

LiveComputeResources

Details about a Live session's scheduler compute resource allocation

LiveVolumeInfo

Information about a volume generated during Live Ab-Initio Reconstruction or Streaming Refinement

Phase2ParticleOutputInfo

Information about particle output from 2D classification

PickingThresholds

Picking thresholds for various particle picking statistics

RangeThreshold

Picking range threshold parameters

RtpChild

Information about a Live worker job

RtpWorkerState

Session

SessionAttribute

Information about a session attribute, used for filtering and display

SessionBuildError

SessionLastAccessed

Details about the last time a session was accessed by a user

SessionStats

Statistics about the session's processing progress

TemplateClassInfo

Information about a template class used in 2D classification

TemplateSelectionThreshold

Threshold definition when selecting template classes from 2D classification results

Threshold

Statistics-based threshold details

class DataManagementStat#

Statistics about a specific set of session data and associated storage statuses

Attributes:

prev_status: Literal['active', 'archiving', 'archived', 'deleted', 'deleting', 'missing', 'calculating'] | None#
size: int#
status: Literal['active', 'archiving', 'archived', 'deleted', 'deleting', 'missing', 'calculating']#
class DataManagementStats#

Statistics and storage statuses for data available in a session

Attributes:

metadata: DataManagementStat#
micrographs: DataManagementStat#
particles: DataManagementStat#
raw: DataManagementStat#
thumbnails: DataManagementStat#
class ExposureGroup#

Full exposure group defintion, not all properties are externally editable

Attributes:

defect_path

Path to defect file for exposures in this group

exp_group_id

Assigned unique ID for this exposure group within the session

file_engine_enable

Whether to enable looking for new exposures in this group

file_engine_filter

Glob pattern to filter files when looking for new exposures

file_engine_interval

Interval in seconds between checks for new exposure files

file_engine_min_file_size

Minimum file size in bytes for new exposure files

file_engine_min_modified_time_delta

Ignore new exposure files that have been modified within this many seconds.

file_engine_recursive

Whether to recursively watch subdirectories when looking for new exposures

file_engine_strategy

Strategy for detecting new exposures within this group

file_engine_watch_path_abs

Absolute path to directory to watch for new exposure files

final

Whether this exposure group is finalized and cannot be edited further

gainref_path

Path to gain reference file for exposures in this group

ignore_exposures

Set to disable new incoming exposures in this group from being processed

is_any_eer

Whether this exposure group contains any EER exposures

num_exposures_found

Number of exposures found in this group so far

defect_path: str | None#

Path to defect file for exposures in this group

exp_group_id: int#

Assigned unique ID for this exposure group within the session

file_engine_enable: bool#

Whether to enable looking for new exposures in this group

file_engine_filter: str#

Glob pattern to filter files when looking for new exposures

file_engine_interval: int#

Interval in seconds between checks for new exposure files

file_engine_min_file_size: int#

Minimum file size in bytes for new exposure files

file_engine_min_modified_time_delta: int#

Ignore new exposure files that have been modified within this many seconds. Set to prevent processing from starting on incomplete files.

file_engine_recursive: bool#

Whether to recursively watch subdirectories when looking for new exposures

file_engine_strategy: Literal['entity', 'timestamp', 'eclathena']#

Strategy for detecting new exposures within this group

file_engine_watch_path_abs: str#

Absolute path to directory to watch for new exposure files

final: bool#

Whether this exposure group is finalized and cannot be edited further

gainref_path: str | None#

Path to gain reference file for exposures in this group

ignore_exposures: bool#

Set to disable new incoming exposures in this group from being processed

is_any_eer: bool#

Whether this exposure group contains any EER exposures

num_exposures_found: int#

Number of exposures found in this group so far

class ExposureGroupUpdate#

Public editable properties for exposure group

Attributes:

defect_path

Path to defect file for exposures in this group

file_engine_enable

Whether to enable looking for new exposures in this group

file_engine_filter

Glob pattern to filter files when looking for new exposures

file_engine_interval

Interval in seconds between checks for new exposure files

file_engine_min_file_size

Minimum file size in bytes for new exposure files

file_engine_min_modified_time_delta

Ignore new exposure files that have been modified within this many seconds.

file_engine_recursive

Whether to recursively watch subdirectories when looking for new exposures

file_engine_watch_path_abs

Absolute path to directory to watch for new exposure files

gainref_path

Path to gain reference file for exposures in this group

ignore_exposures

Set to disable new incoming exposures in this group from being processed

defect_path: str | None#

Path to defect file for exposures in this group

file_engine_enable: bool#

Whether to enable looking for new exposures in this group

file_engine_filter: str#

Glob pattern to filter files when looking for new exposures

file_engine_interval: int#

Interval in seconds between checks for new exposure files

file_engine_min_file_size: int#

Minimum file size in bytes for new exposure files

file_engine_min_modified_time_delta: int#

Ignore new exposure files that have been modified within this many seconds. Set to prevent processing from starting on incomplete files.

file_engine_recursive: bool#

Whether to recursively watch subdirectories when looking for new exposures

file_engine_watch_path_abs: str#

Absolute path to directory to watch for new exposure files

gainref_path: str | None#

Path to gain reference file for exposures in this group

ignore_exposures: bool#

Set to disable new incoming exposures in this group from being processed

class LiveComputeResources#

Details about a Live session’s scheduler compute resource allocation

Attributes:

auxiliary_gpus

auxiliary_lane

auxiliary_ssd

phase_one_gpus

phase_one_lane

phase_one_workers_per_gpu

Number of preprocessing workers that can share the same GPU

phase_two_gpus

phase_two_lane

phase_two_ssd

priority

Priority of the session's jobs in the scheduler queue (0-100).

auxiliary_gpus: int#
auxiliary_lane: str | None#
auxiliary_ssd: bool#
phase_one_gpus: int#
phase_one_lane: str | None#
phase_one_workers_per_gpu: int#

Number of preprocessing workers that can share the same GPU

phase_two_gpus: int#
phase_two_lane: str | None#
phase_two_ssd: bool#
priority: int#

Priority of the session’s jobs in the scheduler queue (0-100). Higher values indicate higher priority.

class LiveVolumeInfo#

Information about a volume generated during Live Ab-Initio Reconstruction or Streaming Refinement

Attributes:

fileid: str | None#
num_particles: int | None#
selected: bool#
vol_gname: str#
class Phase2ParticleOutputInfo#

Information about particle output from 2D classification

Attributes:

count: int#
fields: List[str]#
path: str | None#
class PickingThresholds#

Picking thresholds for various particle picking statistics

Attributes:

blob_ncc_score: Threshold#
blob_power: RangeThreshold#
manual_ncc_score: Threshold#
manual_power: RangeThreshold#
template_ncc_score: Threshold#
template_power: RangeThreshold#
class RangeThreshold#

Picking range threshold parameters

Attributes:

max: float | None#
max_value: float | None#
min: float | None#
min_value: float | None#
value: float | None#
class RtpChild#

Information about a Live worker job

Attributes:

rtp_handle_func: Literal['handle_template_creation_class2D', 'phase2_class2D_handle', 'phase2_abinit_handle', 'phase2_refine_handle']#
status: Literal['building', 'queued', 'launched', 'started', 'running', 'waiting', 'completed', 'killed', 'failed']#
uid: str#
class RtpWorkerState#

Attributes:

errors: List[RunError]#
status: Literal['building', 'queued', 'launched', 'started', 'running', 'waiting', 'completed', 'killed', 'failed']#
class Session#

Attributes:

attributes

List of available session attributes for filtering and display

auto_pause

Auto-pause behavior of the session

auto_pause_after_idle_minutes

Number of idle minutes before auto-pausing the session

cleared_at

when experiment was last cleared

compacted_exposures_count

completed_at

when all jobs inside session are either completed, failed, or killed (i.e. no running/building/waiting).

compute_resources

Scheduler compute resource allocation for this session

computed_stats_last_run_time

created_at

When this object was first created.

created_by_job_uid

created_by_user_id

User ID that created the workspace.

data_management

deleted

deleting

description

dumped_at

When the model was last dumped to disk

ecl

elapsed_time

Amount of time (in seconds) the session spent in running state.

errors

Errors found in the session configuration.

exposure_groups

Exposure groups configured in this session

exposure_processing_priority

Strategy to use when determining which exposures to process first

exposure_summary

Summary statistics of exposures processed in this session

failed_at

when session entered failed state

file_engine_last_run

Timestamp of the last time the file engine ran

file_engine_status

Current status of the file engine, which searches for new exposures.

groups

id

import_signatures

imported_at

is_gracefully_pausing

If True, there are no more exposures to process and the session will pause once current processing is complete.

last_accessed

last_compacted_amount

last_compacted_at

last_compacted_version

last_dumped_version

The version of CryoSPARC last dumped at

last_processed_exposure_priority

last_restored_amount

last_restored_at

live_session_job_uid

UID of the Live session job associated with this session

max_timestamps

Set by the file engine to track the most recent modification timestamps seen in each exposure group

notes

User-provided notes about the session

notes_lock

Username of user who has locked the notes for editing

parameter_version

Version of session parameters in use.

params

Session parameters for preprocessing.

paused_at

times when session was paused

phase2_abinit_info

phase2_abinit_job

phase2_abinit_num_particles_in

phase2_abinit_params_spec

phase2_abinit_ready

phase2_abinit_restart

phase2_class2D_info

phase2_class2D_job

phase2_class2D_last_updated

phase2_class2D_num_particles_accepted

phase2_class2D_num_particles_in

phase2_class2D_num_particles_rejected

phase2_class2D_num_particles_seen

sum of accepted and rejected

phase2_class2D_params_spec

phase2_class2D_params_spec_used

Streaming 2D classification parameters used at last launch, must be same as phase2_class2D_params_spec to resume

phase2_class2D_particles_out

phase2_class2D_ready

phase2_class2D_ready_partial

phase2_class2D_restart

(re)start requested - set False by job when it starts

phase2_refine_job

phase2_refine_last_updated

phase2_refine_num_particles_in

phase2_refine_params_spec

Refinement parameters specified for next launch

phase2_refine_params_spec_used

Refinement parameters used at last launch, must be same as phase2_refine_params_spec_used to resume

phase2_refine_ready

phase2_refine_ready_partial

phase2_refine_restart

Indicates to the running refinement job that the session parameters have changed and a restart is required.

phase2_select2D_job

phase_one_wait_for_exposures

Whether to wait until exposures are available before queuing the session's preprocessing worker jobs.

phase_one_workers

RtpWorkerState(status=<JobStatus.BUILDING: 'building'>, errors=[]), 'J2': RtpWorkerState(status=<JobStatus.RUNNING: 'running'>, errors=[]), 'J3': RtpWorkerState(status=<JobStatus.KILLED: 'killed'>, errors=[RunError(message='Example', warning=False)])}

phase_one_workers_soft_kill

list of workers that are being signalled a "stop" request

picking_thresholds

pre_restoration_size

project_uid

Project unique ID for , e.g., 'P1'.

project_uid_num

Numeric part of the project UID.

restoration_notification_id

restoration_user_id

rtp_childs

List of Live worker jobs associated with this session

running_at

when start_session() is called (when built jobs are placed into the scheduler queue)

session_dir

Path to session directory on disk, relative to project directory.

session_uid

Unique identifier for the session within the project, e.g. 'S1'.

session_uid_num

Numeric part of the session UID

starred_by

List of user IDs who have starred the workspace.

stats

status

Current activity status of the session

tags

template_creation_info

template info for select 2D (includes gridFS image ids etc)

template_creation_job

which job is providing the templates

template_creation_num_particles_in

number of particles provided to template creation

template_creation_project

which project is the above job in

template_creation_ready

whether the templates are ready to be shown for selection

title

uid

Workspace unique ID, e.g., 'W1'.

uid_num

Numeric part of the workspace UID.

updated_at

When this object was last modified.

workspace_stats

workspace_type

Always 'live' for Live sessions

attributes: List[SessionAttribute]#

List of available session attributes for filtering and display

auto_pause: Literal['disabled', 'graceful', 'immediate']#

Auto-pause behavior of the session

auto_pause_after_idle_minutes: int#

Number of idle minutes before auto-pausing the session

cleared_at: datetime | None#

when experiment was last cleared

compacted_exposures_count: int#
completed_at: datetime | None#

when all jobs inside session are either completed, failed, or killed (i.e. no running/building/waiting). At least one job must’ve completed successfully for this field to be populated.

compute_resources: LiveComputeResources#

Scheduler compute resource allocation for this session

computed_stats_last_run_time: datetime | None#
created_at: datetime#

When this object was first created. Imported objects such as projects and jobs will retain the created time from their original CryoSPARC instance.

created_by_job_uid: str | None#
created_by_user_id: str | None#

User ID that created the workspace.

data_management: DataManagementStats#
deleted: bool#
deleting: bool#
description: str | None#
dumped_at: datetime | None#

When the model was last dumped to disk

ecl: ECLSessionProperties#
elapsed_time: float#

Amount of time (in seconds) the session spent in running state. Only updated when session is paused.

errors: List[SessionBuildError]#

Errors found in the session configuration. Session will not be able to start if any errors are present.

exposure_groups: List[ExposureGroup]#

Exposure groups configured in this session

exposure_processing_priority: Literal['normal', 'oldest', 'latest', 'alternate']#

Strategy to use when determining which exposures to process first

exposure_summary: Dict[str, Any]#

Summary statistics of exposures processed in this session

failed_at: List[datetime]#

when session entered failed state

file_engine_last_run: float | None#

Timestamp of the last time the file engine ran

file_engine_status: Literal['inactive', 'running']#

Current status of the file engine, which searches for new exposures. Inactive while session is paused.

groups: List[JobGroup]#
id: str#
import_signatures: ImportSignature#
imported_at: datetime | None#
is_gracefully_pausing: bool#

If True, there are no more exposures to process and the session will pause once current processing is complete.

last_accessed: SessionLastAccessed | None#
last_compacted_amount: int#
last_compacted_at: datetime | None#
last_compacted_version: str | None#
last_dumped_version: str | None#

The version of CryoSPARC last dumped at

last_processed_exposure_priority: Literal['normal', 'oldest', 'latest', 'alternate']#
last_restored_amount: int#
last_restored_at: datetime | None#
live_session_job_uid: str | None#

UID of the Live session job associated with this session

max_timestamps: List[Any]#

Set by the file engine to track the most recent modification timestamps seen in each exposure group

notes: str#

User-provided notes about the session

notes_lock: str | None#

Username of user who has locked the notes for editing

parameter_version: int#

Version of session parameters in use.

params: LivePreprocessingParams#

Session parameters for preprocessing. Reconstruction parameters are stored separately.

paused_at: List[datetime]#

times when session was paused

phase2_abinit_info: List[LiveVolumeInfo]#
phase2_abinit_job: str | None#
phase2_abinit_num_particles_in: int#
phase2_abinit_params_spec: LiveAbinitParams#
phase2_abinit_ready: bool#
phase2_abinit_restart: bool#
phase2_class2D_info: List[TemplateClassInfo]#
phase2_class2D_job: str | None#
phase2_class2D_last_updated: datetime | None#
phase2_class2D_num_particles_accepted: int#
phase2_class2D_num_particles_in: int#
phase2_class2D_num_particles_rejected: int#
phase2_class2D_num_particles_seen: int#

sum of accepted and rejected

phase2_class2D_params_spec: LiveClass2DParams#
phase2_class2D_params_spec_used: LiveClass2DParams | None#

Streaming 2D classification parameters used at last launch, must be same as phase2_class2D_params_spec to resume

phase2_class2D_particles_out: Phase2ParticleOutputInfo | None#
phase2_class2D_ready: bool#
phase2_class2D_ready_partial: bool#
phase2_class2D_restart: bool#

(re)start requested - set False by job when it starts

phase2_refine_job: str | None#
phase2_refine_last_updated: datetime | None#
phase2_refine_num_particles_in: int#
phase2_refine_params_spec: LiveRefineParams#

Refinement parameters specified for next launch

phase2_refine_params_spec_used: LiveRefineParams | None#

Refinement parameters used at last launch, must be same as phase2_refine_params_spec_used to resume

phase2_refine_ready: bool#
phase2_refine_ready_partial: bool#
phase2_refine_restart: bool#

Indicates to the running refinement job that the session parameters have changed and a restart is required.

phase2_select2D_job: str | None#
phase_one_wait_for_exposures: bool#

Whether to wait until exposures are available before queuing the session’s preprocessing worker jobs. Set to prevent CryoSPARC from allocating compute resources and GPU tokens to workers when the microscope has not yet acquired any data.

phase_one_workers: Dict[str, RtpWorkerState]#

RtpWorkerState(status=<JobStatus.BUILDING: ‘building’>, errors=[]), ‘J2’: RtpWorkerState(status=<JobStatus.RUNNING: ‘running’>, errors=[]), ‘J3’: RtpWorkerState(status=<JobStatus.KILLED: ‘killed’>, errors=[RunError(message=’Example’, warning=False)])}

Type:

Example

Type:

{‘J1’

phase_one_workers_soft_kill: List[str]#

list of workers that are being signalled a “stop” request

picking_thresholds: PickingThresholds#
pre_restoration_size: int#
project_uid: str#

Project unique ID for , e.g., ‘P1’.

project_uid_num: int#

Numeric part of the project UID.

restoration_notification_id: str | None#
restoration_user_id: str | None#
rtp_childs: List[RtpChild]#

List of Live worker jobs associated with this session

running_at: List[datetime]#

when start_session() is called (when built jobs are placed into the scheduler queue)

session_dir: str#

Path to session directory on disk, relative to project directory. Usually the same as session_uid.

session_uid: str#

Unique identifier for the session within the project, e.g. ‘S1’

session_uid_num: int#

Numeric part of the session UID

starred_by: List[str]#

List of user IDs who have starred the workspace.

stats: SessionStats#
status: Literal['paused', 'running', 'completed', 'compacting', 'compacted', 'restoring', 'restoration_failed']#

Current activity status of the session

tags: List[str]#
template_creation_info: List[TemplateClassInfo]#

template info for select 2D (includes gridFS image ids etc)

template_creation_job: str | None#

which job is providing the templates

template_creation_num_particles_in: int#

number of particles provided to template creation

template_creation_project: str | None#

which project is the above job in

template_creation_ready: bool#

whether the templates are ready to be shown for selection

title: str | None#
uid: str#

Workspace unique ID, e.g., ‘W1’.

uid_num: int#

Numeric part of the workspace UID.

updated_at: datetime#

When this object was last modified.

workspace_stats: WorkspaceStats#
workspace_type: Literal['live']#

Always ‘live’ for Live sessions

class SessionAttribute#

Information about a session attribute, used for filtering and display

Attributes:

max: float | None#
min: float | None#
name: str#
round: int#
title: str#
class SessionBuildError#

Attributes:

input

value of the invalid property, must be serializable

input_type

type name of the input value

loc

path to the invalid property

type

type of error, e.g. 'missing', 'invalid', etc.

input: Any#

value of the invalid property, must be serializable

input_type: str#

type name of the input value

loc: List[str | int]#

path to the invalid property

type: str#

type of error, e.g. ‘missing’, ‘invalid’, etc.

class SessionLastAccessed#

Details about the last time a session was accessed by a user

Attributes:

accessed_at

timestamp of last access

name

username of last user to access the session

accessed_at: datetime#

timestamp of last access

name: str#

username of last user to access the session

class SessionStats#

Statistics about the session’s processing progress

Attributes:

average_manual_picks: int#
avg_movies_accepted_per_hour: int#
avg_movies_found_per_hour: int#
avg_movies_ready_per_hour: int#
avg_particles_extracted_per_hour: int#
avg_particles_extracted_per_mic: int#
frames: int#
gsfsc: float | Literal['inf', '-inf', 'nan']#
manual_rejected: int#
nx: int#
ny: int#
total_accepted: int#
total_blob_picks: int#
total_deep_picks: int#
total_exposures: int#
total_extracted_particles: int#
total_extracted_particles_blob: int#
total_extracted_particles_deep: int#
total_extracted_particles_manual: int#
total_extracted_particles_template: int#
total_failed: int#
total_in_progress: int#
total_manual_picked_exposures: int#
total_manual_picks: int#
total_queued: int#
total_ready: int#
total_rejected: int#
total_seen: int#
total_template_picks: int#
total_test: int#
total_thumbs: int#
class TemplateClassInfo#

Information about a template class used in 2D classification

Attributes:

class_ess: float | Literal['inf', '-inf', 'nan']#
class_idx: int#
fileid: str#
mean_prob: float | Literal['inf', '-inf', 'nan']#
num_particles_selected: int#
num_particles_total: int#
res_A: float | Literal['inf', '-inf', 'nan']#
selected: bool#
class TemplateSelectionThreshold#

Threshold definition when selecting template classes from 2D classification results

Attributes:

direction: Literal['above', 'below']#
field: Literal['num_particles_total', 'res_A', 'class_ess']#
threshold: int | float#
class Threshold#

Statistics-based threshold details

Attributes:

max: float | None#
min: float | None#
value: float | None#