Files
eco/scripts/eco-escape-test
T
lemke_handClaude Sonnet 5 16a0cb0faf Remove redundant det_jf; add dummy 2D test fixture; fix mesh-scan repetitions crash; add eco-escape-test
- Remove det_jf: now that det_diff was fixed to JF01T03V01 (previous
  commit), det_jf was a second device pointing at the same physical
  Jungfrau, otherwise unreferenced anywhere.

- Add bernina.dummy (DummyMexicanHat): x, y (DummyAdjustable) + imex
  (DetectorGet reading a live 2D Mexican-hat signal of their current
  values, (1-r^2)*exp(-r^2/2), r=sqrt(x^2+y^2) -- stays within [-1, 1]
  for any x, y, small Gaussian noise by default). No real hardware;
  for testing grid-scan / live 2D counter-grid machinery.

- Fix Scans.meshscan(..., repetitions=N>1): grid_specs["index_plan"] is
  built once, for a single pass over the grid, before StepScan.__init__
  repeats `values`/`pulses_per_step` by `repetitions` -- so
  do_next_step()'s gridspecs["index_plan"][self.next_step] indexed past
  the end (IndexError) the moment the scan entered its second
  repetition. Now repeats index_plan the same way.

- Add scripts/eco-escape-test: like eco-dev, but also prepends a sibling
  escape-fel checkout to PYTHONPATH (assumed to live next to this eco
  checkout), for testing local checkouts of both together instead of
  whatever's installed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 15:13:30 +02:00

32 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Dev entry point for testing this eco checkout together with a sibling
# escape-fel checkout -- like scripts/eco-dev, but also prepends a local
# escape-fel checkout to PYTHONPATH, ahead of whatever `escape`/`escape-fel`
# is installed in the environment (bpy312), so `import escape` resolves to
# that checkout instead of the installed release.
#
# Assumes the escape-fel checkout lives right next to this eco checkout,
# i.e. as a sibling directory under the same parent (e.g. ~/drv/eco and
# ~/drv/escape-fel) -- resolved from this script's own location the same
# way eco-dev resolves the eco checkout, so it works from any eco checkout
# with such a sibling, not just this one.
#
# Usage: same as eco-dev, e.g.
# eco-escape-test -s bernina -l --ui shell
#
# See eco-dev's own header comment for why PYTHONPATH specifically (not
# just sys.path) is what needs prepending here.
source bpy-env
ECO_CHECKOUT="$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
ESCAPE_CHECKOUT="$(dirname "$ECO_CHECKOUT")/escape-fel"
if [ ! -d "$ESCAPE_CHECKOUT/escape" ]; then
echo "eco-escape-test: no escape-fel checkout found at $ESCAPE_CHECKOUT" >&2
echo " (expected as a sibling directory of this eco checkout: $ECO_CHECKOUT)" >&2
exit 1
fi
export PYTHONPATH="${ESCAPE_CHECKOUT}:${ECO_CHECKOUT}${PYTHONPATH:+:$PYTHONPATH}"
exec python "${ECO_CHECKOUT}/eco_cli.py" "$@"