Skip to content

Merged/developer#229

Open
kferjaoui wants to merge 17 commits into
developerfrom
merged/developer
Open

Merged/developer#229
kferjaoui wants to merge 17 commits into
developerfrom
merged/developer

Conversation

@kferjaoui

Copy link
Copy Markdown
Collaborator

This branch is the result of the merging, after conflict resolution, of the branches:

  1. feature/shift-anti_lag (PR Feature/shift anti lag #225)
  2. fix/global-constant (PR global constant control #219)
  3. refactor/first_deployment (PR Refactor/first deployment #228 )

KiyofumiTakaba and others added 17 commits December 10, 2025 20:55
- Remove Redis-backed cfg access from globals.py module scope
- Avoid cfg.temserver as argparse default (prevents ValueError at startup)
- Initialize globals via globals.init() after parsing args and resolving cfg
- Add single TEM I/O dispatcher and route fast stage moves through it
- Execute preload/overshoot + correction as an atomic sequence (no interleaving with other TEM calls)
- Keep existing UI signal wiring and TEMClient dependency unchanged
…correction

- Define globals.preload (e.g. +1 µm / +1°) for two-step overshoot+return moves
- Wire stage jog buttons and move_with_backlash() calls to use preload consistently

- Note: current backlash/overshoot behavior is only applied on negative moves
- implement “parking” movements to reduce backlash: move past target by a preload margin, then step back by preload so gears are loaded in the return direction. For e.g; pushing [+10µm] moves +12µm then −2µm; [−10µm] -> −12µm then +2µm; same idea for ±TX degrees
- track a per-axis net “away” displacement (accumulator) so repeated parking movements stack; Back returns in one straight move by −net_away (no preload) and then resets the accumulator.
- serialize all TEM ZMQ commands through a single dispatcher lane to avoid overlapping REQ/REP calls and reduce timeouts under polling + user actions

TODO: tie "back buttons" status control (enable/disable) + accumulator reset to dispatcher success via Qt queued signal/callback (currently toggled from main thread)
Entry point (main_ui.py):
- Remove graceful fallback for missing Redis connection; fail fast
  with logging.critical + sys.exit(1) instead
- Remove _cfg_get helper
- Simplify parameter resolution to: CLI override -> cfg attribute
- Update ABOUT_TEXT version description

New files:
- epoc-config.yaml: default Redis configuration template with
  documented fields for detector geometry, network endpoints,
  acquisition settings, and display overlays
- init_redis.py: bootstrap script to populate Redis from YAML
  (flush_db=True) for fresh deployments
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