Skip to main content

escape

Event Synchronous Categorisation And Processing Environment

escape is a Python framework for event-based data analysis at free-electron laser (FEL) facilities. It pairs raw measurement arrays with pulse IDs and scan metadata, providing index-aligned arithmetic, scan-step aggregation, and scalable storage — designed for the data volumes and workflows typical at instruments like SwissFEL Bernina.

Core concepts

  • Array — wraps a data array together with a pulse-ID index and optional scan grouping. Index-aligned arithmetic between arrays is automatic: operations find common pulse IDs and align data before computing.
  • Scan — partitions an Array into sequential steps with parameter metadata (e.g. delay values). Exposes per-step statistics (nanmean, median, weighted_stat, …) directly.
  • Grid — maps scan steps onto an N-dimensional parameter grid, enabling multi-dimensional scans and 2D result arrays.
  • DataSet — named collection of Arrays backed by HDF5 (.esc.h5) or zarr (.esc.zarr) files for persistent storage.
  • escaped — decorator that lifts any NumPy/dask function to operate on Arrays with automatic index alignment.

Quick example

import escape as esc
import numpy as np

# Load a dataset
ds = esc.DataSet.load("run042.esc.h5")
sig  = ds["JF_signal"]
i0   = ds["I0_monitor"]
pump = ds["pump_on"]

# Normalize signal to I0 — pulse IDs aligned automatically
sig_norm = sig / i0

# Per-step median across the pump-probe scan
median_on  = sig_norm[pump].scan.nanmedian()
median_off = sig_norm[~pump].scan.nanmedian()

Installation

conda (recommended — reuses existing environment packages):

conda install -c conda-forge escape-fel

pip:

pip install escape-fel

Latest development version:

pip install git+https://github.com/htlemke/escape-fel

Documentation

Full documentation including user guide and API reference: escape-fel.readthedocs.io

Metadata

Release files for escape-fel 0.2.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for escape-fel 0.2.12
File Size Uploaded
escape_fel-0.2.12.tar.gz 13.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for escape-fel 0.2.12
File Interpreter ABI Platform
escape_fel-0.2.12-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 MB

Release files / escape_fel-0.2.12.tar.gz

Download URL escape_fel-0.2.12.tar.gz
Size 13.2 MB
Tags Source
SHA-256 checksum
How to use checksums
17b02d5b924577e4f59d397b139e98d735a513f61f58c1e8975eabdc0b10e6ee
BLAKE2b-256 checksum
How to use checksums
40ee8745c76ba74e5568a0b6fc1069f3be30d8a7c1e2fcfa67ad91c6ba57d7f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / escape_fel-0.2.12-py3-none-any.whl

Download URL escape_fel-0.2.12-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
acbe5b5fa2e87571eb44f03f2b493d9fd46b2da2c8f34e217c2e16ac7c35bae7
BLAKE2b-256 checksum
How to use checksums
286e749db77a7a6a3d93ce2216e0ec956bf35dcd993b3ff034a6142ab1d22a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.13

2 release files

This release

0.2.12 This release

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page