Files
operation-bin/jungfrau_console
lemke_h 224c68e90b bin: consistent naming, pixi_pgroup_install, git cleanup
- Commands lose their .sh extension (create_personal_dir,
  gopass_bernina_setup, gopass_bernina_service_setup,
  kerberos_ticket_renew, migrate_to_network_drive, pixi_local_sync,
  pixi_rebuild_local, sync_personal_config); .sh now only marks files
  that are sourced. kerberos_ticket_renew.sh and pixi_local_sync.sh stay
  as links, since they are started at login.
- Sourced files gain .sh (bpy-env, anaconda_env, anaconda_bernina_env,
  mm_bernina); the old names stay as links.
- All references in scripts, the .desktop file and the docs updated;
  cheatsheet.md regenerated via list_bin_commands.
- New pixi_pgroup_install: installs the shared bernina pixi env into a
  pgroup work folder (group-shared, with its own package cache) and
  makes it visible in JupyterHub as bernina-<exp>-<env>.
- Fix '#/bin/bash' first lines (missing '!') in 11 scripts.
- Stop tracking clutter (.nfs placeholders, __pycache__, vim swap file,
  .bak/_bak/~ copies, delme_*, empty 'me'); add .gitignore.
2026-09-25 15:48:11 +02:00

24 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
BL=bernina
check=`which conda 2> /dev/null | grep /$BL/anaconda/4.4.0`
if [ "$check" == "" ]; then
source /sf/$BL/bin/anaconda_env.sh
fi
MATPLOT_TRY='exec("try: import matplotlib.pyplot as plt\nexcept: sys.exit(1)");'
CONFIG='import sys; from detector_integration_api import DetectorIntegrationClient; api_address = "http://sf-daq-1:10000"; client_1p5 = DetectorIntegrationClient(api_address); print("\nJungfrau Integration API on %s" % api_address);import h5py;import numpy as np;'$MATPLOT_TRY'import dask.array as da;print("Imported matplotlib (as plt), h5py, numpy (as np), dask.array (as da)"); exec("""if "client_1p5" in locals(): print("Jungfrau 1.5M client available as client_1p5. Try: client_1p5.get_status() ") """);'
echo Starting Interactive Python session
export QT_XKB_CONFIG_ROOT=/sf/alvra/anaconda/4.4.0/jungfrau_utils/lib
if [ "$1" == "nox" ]; then
export QT_QPA_PLATFORM='offscreen'
echo "Starting no-graphics version"
else
echo If you get \"Could not connect to display\" or similar, try: \"jungfrau_console nox\"
fi
ipython -i -c "$CONFIG"