INTERSECT Data Egress Service for CHESS. Monitors HDF5 files produced by the chess-instrument-control-informer and emits INTERSECT events when new measurement data is detected.
This service is the INTERSECT Data Egress Service in the CHESS autonomous experiment loop:
chess-instrument-control-informercreates a NEW HDF5 file from the full strain map- This service monitors the NEW HDF5 file for new data points using HDF5 SWMR (Single Writer Multiple Reader) polling
- When new data is detected, it emits an INTERSECT
new_measurementevent containing{labx, labz, center_value} - The campaign orchestrator routes this data to
Dial as a
DialWorkflowDatasetUpdate(next_x: [labx, labz],next_y: center_value)
uv sync# Start with local config
intersect-chess-data-service --config local-conf.json
# Or with Docker
docker compose upThe intersect-chess-data-service command is installed as a console script:
# Use the default config file (local-conf.json)
intersect-chess-data-service
# Specify a config file
intersect-chess-data-service --config /path/to/config.json
# Or set via environment variable
export CHESS_DATA_SERVICE_CONFIG_FILE=/path/to/config.json
intersect-chess-data-servicestart_monitoring(MonitoringConfig)— Begin monitoring an HDF5 filestop_monitoring()— Stop the current monitoring sessionstatus()— Returns"Monitoring"or"Idle"
new_measurement— Emitted when new data is detected. Payload:{"labx": float, "labz": float, "center_value": float}
{
"filename": "/data/new_strain_map.nxs",
"dataset_path": "v8-p3-10s-0deg_dataset1_strainanalysis/0/uniformfit/2_2_2/centers",
"poll_interval": 0.5,
"dataset_names": ["labx", "labz", "values"]
}# Install dev dependencies
uv sync
# Run tests
uv run pytest tests/
# Lint
uv run ruff check --fix
uv run ruff format --check# Build
docker build -t intersect-chess-data-service .
# Run with docker-compose (includes RabbitMQ broker)
docker compose up