Skip to content

Conversation

@xiaoyachong
Copy link
Contributor

@xiaoyachong xiaoyachong commented Oct 14, 2025

1. Unified Image Simulator for LSE

This PR introduces a unified simulator that consolidates:

db_replay_sim_cli.py
local_tiled_sim_cli.py
real_image_sim_cli.py

Description:
A single simulator that supports three modes:

  • direct — Reads data from a public Tiled dataset.
  • db_replay — Reads SMI data from the NSLS-II Tiled server.
  • local_tiled — Reads 733 dataset from a local Tiled server.

2. Temporary Tiled Ingestor

A temporary tiled ingestor is added for ingesting the 733 dataset, enabling testing of the LSE live mode.
This component will later be moved to a dedicated Tiled ingestor repository.

Besides, we want to develop a unified Tiled ingestor to load original images—such as SMI data (fetched from the NSLS-II Tiled server using given URLs saved in .db files) or 733 data (loaded from the local file system)—into a local Tiled server. This will enable us to run the unified simulator without requiring access to remote Tiled instances.

When ingesting data, we should aim to mimic the Tiled URL structure. For example, at NSLS-II, SMI data URLs typically look like the following:

Development:
http://tiled-dev.nsls2.bnl.gov/api/v1/array/full/79b18ce7-c6a9-4c25-8b7c-7d3c5a57a536/streams/primary/pil2M_image?slice=0:1,0:1679,0:1475

Production:
http://tiled.nsls2.bnl.gov/api/v1/array/full/smi/raw/79b18ce7-c6a9-4c25-8b7c-7d3c5a57a536/streams/primary/pil2M_image?slice=0:1,0:1679,0:1475

We should also ensure support for two saving modes:

  • Saving multiple images (SMI style), and
  • Saving a single image (733 style)
    into the container.

However, I’m not yet sure what the corresponding URL format looks like for the ALS 733 experiment.

3. XPS Websocket Simulator

We read TRS data from the local file system and send it via WebSocket to mimic the XPS Arroyo WebSocket implementation: link.

Companion PR:
mlexchange/mlex_latent_explorer#61
mlexchange/mlex_latent_explorer#66

@xiaoyachong xiaoyachong changed the title Xiaoya add local tiled sim Xiaoya add unified simulator for LSE Oct 14, 2025
@xiaoyachong xiaoyachong marked this pull request as draft October 14, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants