Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions block_configs/tiled_processor_block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
blocks:
- name: XPS Tiled → LSE Processor
description: >
Watches the local Tiled server for new XPS scans written by Block 1 and
forwards each shot_mean frame as a RawFrameEvent over ZMQ to LSE.

operator:
# Pass-through: RawFrameEvent → RawFrameEvent, no computation.
# Reuses the existing TiledRawFrameOperator from arroyosas.
class: arroyosas.tiled.tiled_poller.TiledRawFrameOperator

listeners:
- class: tr_ap_xps.tiled_listener.tiled_new_scan_listener_factory
kwargs:
tiled_uri: "http://tiled:8000"
tiled_prefix: "beamlines/bl931/processed"
root_segments:
- xps_processed_images
poll_interval_sec: 2.0
frame_poll_interval_sec: 3.0
unchanged_cycles_threshold: 5
seen_scans_file: "/data/tiled_poller/seen_scans.txt"

publishers:
- class: tr_ap_xps.zmq_publisher.create_zmq_frame_publisher
kwargs:
zmq_address: "tcp://0.0.0.0:5000"
31 changes: 31 additions & 0 deletions block_configs/timepix931_processor_block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
blocks:
- name: XPS Timepix Processor
description: >
Real-time AP-XPS processor for Timepix data.
Listens for splash_timepix ZMQ messages, computes shot_mean via XPSOperator,
and publishes to two independent sinks:
1. XPSWSResultPublisher — live websocket updates to the arroyoXPS frontend
2. XPSTiledPublisher — persists shot_mean arrays to the local Tiled server

operator:
class: tr_ap_xps.pipeline.xps_operator.build_xps_operator
kwargs:
build_heatmaps: false
otlp_endpoint: "http://jaeger:4317"

listeners:
- class: tr_ap_xps.timepix.xps_timepix_listener_factory
kwargs:
zmq_connection_address: "tcp://host.docker.internal:5657"

publishers:
- class: tr_ap_xps.websockets.xps_ws_publisher_factory
kwargs:
ws_url: "ws://0.0.0.0:8001/xps_operator"

- class: tr_ap_xps.xps_tiled_publisher.xps_tiled_result_publisher_factory
kwargs:
tiled_uri: "http://tiled:8000"
tiled_prefix: "beamlines/bl931/processed"
root_segments:
- xps_processed_images
19 changes: 0 additions & 19 deletions block_configs/timepix_processor_block.yaml

This file was deleted.

23 changes: 22 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
timepix_processor:
# profiles:
# - dev
command: "/block_configs/timepix_processor_block.yaml"
command: "/block_configs/timepix931_processor_block.yaml"
build:
context: .
dockerfile: Dockerfile_processor
Expand All @@ -33,6 +33,27 @@ services:
- "8001:8001"
volumes:
- ./block_configs:/block_configs:ro,Z
environment:
- RESULTS_TILED_API_KEY=${TILED_SINGLE_USER_API_KEY}
- LOGGING_LEVEL=DEBUG
networks:
mle_net:


tiled_processor:
command: "/block_configs/tiled_processor_block.yaml"
build:
context: .
dockerfile: Dockerfile_processor
restart: unless-stopped
ports:
- "5001:5001"
volumes:
- ./block_configs:/block_configs:ro,Z
- ./data/tiled_poller:/data/tiled_poller:Z
environment:
- RESULTS_TILED_API_KEY=${TILED_SINGLE_USER_API_KEY}
- LOGGING_LEVEL=DEBUG
networks:
mle_net:

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [

dependencies = [
"arroyopy @ git+https://github.com/als-computing/arroyopy.git@refs/heads/open_telemetry",
"arroyosas @ git+https://github.com/als-computing/arroyosas.git@upgrade_arroyopy",
"astropy",
"dynaconf",
"python-dotenv",
Expand All @@ -41,7 +42,7 @@ dev = [
"flake8",
"fakeredis",
"pre-commit",
"pytest-asyncio",
"pytest-asyncio==1.3.0",
"pytest-mock",
"tiled[server]",
]
Expand Down
Loading
Loading