Topics
Messages in this system are sent and received using our Pigeon library.
The message definitions for each topic are listed below, and implemented in the library linked above.
These are also available on the Python package index as pigeon-tem-comms
.
- buffer.status
- camera.command
- camera.image
- camera.settings
- camera.status
- montage.finished
- montage.start
- qc.status
- scope.command
- scope.status
- stage.aperture.command
- stage.aperture.status
- stage.motion.command
- stage.motion.status
- stage.rotation.command
- stage.rotation.status
- tile.jpeg
- tile.minimap
- tile.processed
- tile.raw
- tile.statistics.focus
- tile.statistics.histogram
- tile.statistics.min_max_mean
- tile.transform
- ui.edit
- ui.run
- ui.setup
buffer.status
This message contains status information about the tile upload buffer.
Payload
- queue_length (int):
The number of tiles queued for upload.
- free_space (int):
The amount of free disk space for storing tiles in bytes.
- upload_rate (int):
The current data upload rate in bits-per-second.
Example
{
"queue_length": 11,
"free_space": 549755813888,
"upload_rate": 53687091200
}
Sender
Receivers
camera.command
This message signals that an image should be acquired by the camera.
Payload
- tile_id (string):
The tile ID.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd662914"
}
Sender
Receivers
camera.image
This message contains a path to the most recently acquired image.
Payload
- tile_id (string):
The tile ID.
- path (string):
The path to the image on disk.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd662914",
"path": "/storage/raw/69005602-15b0-4407-bf5b-4bddd6629141.tiff"
}
Sender
Receivers
camera.settings
This message is used to modify camera settings.
Payload
- exposure (float or null):
The camera exposure in microseconds, or
null
if the value should remain unchanged. - width (int or null):
The image width, or
null
if the value should remain unchanged. - height (int or null):
The current image height, or
null
if the value should remain unchanged.
Example
{
"exposure": 1000.0,
"width": 10000,
"height": 10000
}
Sender
Receivers
camera.status
This message is regularly published and includes various status information about the camera.
Payload
- exposure (float):
The current exposure time in microseconds.
- width (int):
The current image width.
- height (int):
The current image height.
- temp (float):
The current temperature of the camera.
- target_temp (float):
The target temperature for temperature control.
- device_name (string):
The camera device name.
- device_model_id (int):
The model ID of the camera.
- device_sn (string):
The camera serial number.
Example
{
"exposure": 1000.0,
"width": 10000,
"height": 10000,
"temp": 25.8,
"target_temp": 20.0,
"device_name": "XIMEA Camera",
"device_model_id": 0,
"device_sn": "alkdsjfalkj"
}
Sender
Receivers
montage.finished
This message indicated that all tiles of a montage have been captured and includes various metadata about the montage.
Payload
- montage_id (string):
The montage ID.
- num_tiles (int):
The number of tiles in the montage.
- roi (string):
The ID of the ROI that was montaged.
- specimen (string):
The ID of the specimen that was montaged.
- metadata (dict or list):
The metadata of the montage.
Example
{
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"num_tiles": 8372,
"roi": "273274",
"specimen": "192372L",
"metadata": {"session_id": "MN18_RMOp_5f", "roi": "392171"}
}
Sender
Receivers
montage.start
This message contains basic information about the montage before the first tile is captured.
Payload
- montage_id (string):
The montage ID.
- num_tiles (int):
The number of tiles in the montage.
Example
{
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"num_tiles": 8372
}
Sender
Receivers
qc.status
This message indicates the state of tile/montage QC metrics.
Payload
- state (string):
The state of the QC. Must be either “GOOD” if imaging should continue, “STOP_AT_END” if imaging should be stopped at then end of the montage, or “STOP_NOW” if imaging should be stopped immediately.
Example
{
"state": "STOP_AT_END"
}
Sender
Receivers
scope.command
This message contains commands to the microscope.
Payload
- focus (int or null):
The desired focus value, or
null
to keep current focus. - mag_mode (string or null):
The desired magnification mode. Must be either
"LM"
,"MAG1"
,"MAG2"
, ornull
to keep the current mode. Must be provided ifmag
is notnull
. - mag (int or null):
The desired magnification level, or
null
to keep current magnification. Must be provided ifmag_mode
is notnull
. - spot_size (int or null):
The desired spot size, or
null
to keep the current spot size. - beam_offset ([int, int] or null):
The desired beam offset location, or
null
to keep the current beam offset. - screen (string):
Command the screen to raise or lower. Must be either
up
ordown
.
Example
{
"focus": 19385,
"mag_mode": MAG1,
"mag": 3000,
"spot_size": 123,
"beam_offset": [54, 23],
"screen": "up"
}
Sender
Receivers
scope.status
This message contains status information about the microscope.
Payload
- focus (int):
The current focus value.
- aperture (str or null):
The current aperture state, or
null
if unknown. - mag_mode (string):
The current magnification mode.
- mag (int):
The current magnification level.
- tank_voltage (int):
The current HV tank voltage in kilovolts.
- spot_size (int):
The current spot size value.
- beam_offset ([int, int]):
The current beam offset location.
Example
{
"focus": 17493,
"aperture": 2,
"mag_mode": "MAG1",
"mag": 5000,
"tank_voltage": 120,
"spot_size": 284,
"beam_offset": [293, 172]
}
Sender
Receivers
stage.aperture.command
This message is used to instruct the hardware to move to a specific aperture.
Payload
- aperture_id (int or null):
The desired aperture ID, or
null
to remain unchanged. - calibrate (bool):
A flag to denote that the hardware should be calibrated.
Example
{
"aperture_id": 000008,
"calibrate": false
}
Sender
Receivers
stage.aperture.status
This message contains status information about the aperture changing hardware.
Payload
- current_aperture (int):
The ID of the current aperture.
- calibrated (bool):
A flag to denote if the hardware is calibrated.
- error (string):
The current error message from the device, or an empty string if no error.
Example
{
"current_aperture": 7,
"calibrated": true,
"error": ""
}
Sender
Receivers
stage.motion.command
This message is used to instruct the stages to move to a the sample to a given location.
Payload
- x (int or null):
The desired X stage location in nanometers, or
null
for the location to remain unchanged. - y (int or null):
The desired Y stage location in nanometers, or
null
for the location to remain unchanged. - calibrate (bool):
A flag to denote that the hardware should be calibrated.
Example
{
"x": 750176,
"y": 531087,
"calibrate": false
}
Sender
Receivers
stage.motion.status
This message contains status information about the aperture changing hardware.
Payload
- x (int):
The current X stage location in nanometers.
- y (int):
The current Y stage location in nanometers.
- in_motion (bool):
A flag which is true when at least one actuator is in motion.
- error (string):
The current error message from the device, or an empty string if no error.
Example
{
"x": 750254,
"y": 531054,
"in_motion": true,
"error": ""
}
Sender
Receivers
stage.rotation.command
This message is used to instruct the hardware to rotate to a given tilt angle.
Payload
- angle_x (float or null):
The desired tilt angle about the X axis in radians, or
null
for the angle to remain unchanged. - angle_y (float or null):
The desired tilt angle about the Y axis in radians, or
null
for the angle to remain unchanged. - calibrate (bool):
A flag to denote that the hardware should be calibrated.
Example
{
"angle_x": 0.524,
"angle_y": 0.0,
"calibrate": false
}
Sender
Receivers
stage.rotation.status
This message contains status information about the tilt imaging hardware.
Payload
- angle_x (float):
The current tilt angle about the X axis in radians.
- angle_y (float):
The current tilt angle about the Y axis in radians.
- in_motion (bool):
A flag which is true when at least one actuator is in motion.
- error (string):
The current error message from the device, or an empty string if no error.
Example
{
"angle_x": 0.523,
"angle_y": -0.001,
"in_motion": true,
"error": ""
}
Sender
Receivers
tile.jpeg
This message contains the path to a down-sampled and JPEG compressed tile primarily for UI use.
Payload
- tile_id (string):
The tile ID.
- path (string):
The path where the compressed tile is stored.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"path": "/storage/jpeg/69005602-15b0-4407-bf5b-4bddd6629141.jpeg"
}
Sender
Receivers
tile.minimap
This message contains the path to low resolution map image of the full montage.
Payload
- tile_id (string):
The tile ID.
- path (string):
The path where the minimap is stored.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"path": "/storage/minimap/69005602-15b0-4407-bf5b-4bddd6629141.jpeg"
}
Sender
Receivers
tile.processed
This message contains the path to a fully processed tile.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- path (string):
The path where the processed tile is stored.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"path": "/storage/processed/69005602-15b0-4407-bf5b-4bddd6629141.tiff"
}
Sender
Receivers
tile.raw
This message is sent whenever a new tile is ready.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- path (string):
The path where the raw tile is stored.
- row (int):
The row of the montage where the tile was imaged.
- column (int):
The column of the montage where the tile was imaged.
- overlap (int):
The number of pixels of overlap between tiles.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"path": "/storage/raw/69005602-15b0-4407-bf5b-4bddd6629141.tiff",
"row": 5,
"column": 24,
"overlap": 512
}
Sender
Receivers
tile.statistics.focus
This message contains the focus score.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- focus (float):
The focus score.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"focus": 2.67
}
Sender
Receivers
tile.statistics.histogram
This message contains a path to a histogram saved to disk.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- path (string):
The path where the histogram is stored.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"path": "/storage/histogram/69005602-15b0-4407-bf5b-4bddd6629141.tiff"
}
Sender
Receivers
tile.statistics.min_max_mean
This message contains simple statistics about a processed tile.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- min (int):
The minimum pixel value.
- max (int):
The maximum pixel value.
- mean (int):
The mean pixel value.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"min": 5,
"max": 249,
"mean": 187
}
Sender
Receivers
tile.transform
This message contains a transform between the base coordinate system of the montage and the tile to move it into the correct location in the montage.
Payload
- tile_id (string):
The tile ID.
- montage_id (string):
The montage ID. If a zero length string, the tile is for UI display purposes only.
- rotation (float):
The rotation in radians of the tile for it to fit in the montage.
- x (float):
The X location of the tile for it to fit in the montage in units of pixels.
- y (float):
The Y location of the tile for it to fit in the montage in units of pixels.
Example
{
"tile_id": "69005602-15b0-4407-bf5b-4bddd6629141",
"montage_id": "4330c7cf-e45b-4950-89cf-82dc0f815fe9",
"rotation": 3.14,
"x": 1019172,
"y": 1918840
}
Sender
Receivers
ui.edit
This message contains values that can be set on the UI edit pane.
Payload
- roi_id (string):
The unique ID for the ROI.
- roi_pos_x (int):
The X location of the ROI centroid in nanometers.
- roi_pos_y (int):
The Y location of the ROI centroid in nanometers.
- roi_width (int):
The width of the ROI in nanometers.
- roi_height (int):
The height of the ROI in nanometers.
- roi_angle (float):
The angle of the ROI relative to the X axis in radians.
Example
{
"roi_id": "ROI_1",
"roi_pos_x": 1928493,
"roi_pos_y": 199384,
"roi_width": 1728840,
"roi_height": 873527,
"roi_angle": 1.37
}
Sender
Receivers
ui.run
This message contains values that can be set on the UI run pane.
Payload
- session_id (string or null):
The unique identifier of the imaging session. Required if
montage
istrue
. - grid_first (int or null):
The first grid to image. Required if
montage
istrue
. - grid_last (int or null):
The last grid to image. Required if
montage
istrue
. - montage (bool):
Set to
true
to begin montaging. - abort_now (bool):
Set to
true
to immediately abort montaging. - abort_at_end (bool):
Set to
true
to abort montaging at end of current montage. - resume (bool):
Set to
true
to continue resuming montaging after an error has occured.
Example
{
"session_id": MN18_RMOp_5f,
"grid_first": 42,
"grid_last": 57,
"montage": false,
"abort_now": false,
"abort_at_end": false,
"resume": true
}
Sender
Receivers
ui.setup
This message contains values that can be set on the UI setup pane.
Payload
- conch_owner (string):
The conch owner name, or
null
to keep current value. - auto_focus (bool):
Set to
true
to initiate the auto-focus method. - auto_exposure (bool):
Set to
true
to initiate the auto-exposure method. - lens_correction (bool):
Set to
true
to begin a lens correction montage. - acquire_brightfield (bool):
Set to
true
to initiate the brightfield collection method. - acquire_darkfield (bool):
Set to
true
to initiate the darkfield collection method.
Example
{
"conch_owner": "Kim",
"auto_focus": false,
"auto_exposure": false,
"lens_correction": false,
"acquire_brightfield": false,
"acquire_darkfield": false
}