i2PEPICO Analysis + PIMP - package 3.5, 8 November 2026

Start i2PEPICO_Analysis_3.5.exe. This is analysis only: it cannot take measurements.
Keep script.dat and i2PEPICO_Analysis_3.5.ini beside it. Its channel table is
embedded; channels.dat is optional. The ini starts the program with the image,
TOF, coincidence and script windows open and the coincidence set to
electron (Im1, TOF start, image 1) -> ion (Im2, TOF stop 0-20 us, image 2),
so the Load button shows both images and the TOF spectrum of the selected file.
The program saves its settings to this ini on exit; delete the ini to return
to the program defaults.
i2PEPICO Analysis and ScriptImport are Windows programs. PIMP (pim.py) also runs
on macOS and Linux.

New in 3.5
i2pepico-cli.exe runs one ManoScript file without the GUI, for agentic data
analysis and other automation: see "Batch command line" below. A Load in the
analysis program now refuses a raw file that another program still has open
for writing. In both programs, Terminate during a ShellExec command no longer
stops with "ShellExec TerminateProcess failed: Access is denied" while the
started program is still writing output. PIMP is updated: Breakdown is now
My traces, the Export menu writes each export as one documented CSV/TXT table,
the folder pickers remember the last folder, and a workspace whose folders are
partly missing can still be reopened. Manoscript_3.5.pdf has a linked table of
contents.

Batch command line (agents and automation)
The goal of i2pepico-cli is agentic data analysis. An AI agent (or a scheduled
job) writes a script, runs it, reads the result, checks the output files and
runs a corrected script, without anyone operating the GUI. From a terminal:
  .\i2pepico-cli.exe run "C:\MyAnalysis\myexport.scr"
Exit codes: 0 completed, 1 script error, 2 could not start, 3 stopped by Ctrl+C,
4 abnormal end. SendMessage text and the final error are written to standard
error. The script supplies all paths, ROIs and coincidence criteria; use
absolute paths. GUI-dependent Curr* values and Pause raise an error in batch.
CurrInFolder and CurrInFile are available after a successful file Load. Each
run uses private copies of i2PEPICO_Analysis_3.5.ini and script.dat and leaves
the installed files unchanged. Jobs can run alongside the GUI and each other.
Give each job its own output folder. Exit code 0 means the script ended without an
error: check the expected files. Examples\BatchExport2DExample.scr is a batch
template. For an agent, give it the whole Manoscript_3.5.pdf and have a person
check ROIs and criteria; test new scripts on copies of closed data first.
Scripts run with your permissions, and ShellExec can start any program.
Keep i2pepico-cli.exe beside i2PEPICO_Analysis_3.5.exe: it starts only that
executable. See "Batch command line" in Manoscript_3.5.pdf.

Export for PIMP
The bundled script.dat already has the four analysis Imports and
Process > Examples > Export2DExample. Select your raw input folder, check the
example's ROI and file pattern, then run it as a Process script.
UseSLS1 := 0 selects SLS2; use 1 for historical SLS1, including the bundled
HomogeneousIllumination.i2d. Results go into Export2D_example below the
input folder. Rerunning replaces that export. To count only the ions in a region
of the ion image, uncomment and adapt the example's UseIonROI and IonROI lines.
Examples\Export2DSlicesExample.scr exports one raw file as time slices into its
own, empty folder, optionally only a time window of it at a finer width.
Open such a folder in PIMP when the export has finished, as the only loaded
folder; its y-axis is the slice time (or delay after the trigger) in ms.

Use the Imports in your own script.dat
ScriptImport.exe contains the necessary Imports for data analysis
(Export2D, Export2DSLS1, Export2DSLS2, Export2DSlices). Do not replace your own
script.dat with the bundled database. Close the i2PEPICO that uses that script.dat
(the one started from the same folder), then either
  - copy ScriptImport.exe beside your script.dat and double-click it, or
  - drag your script.dat (or its folder) onto ScriptImport.exe.
It prints its version and bundle label, shows what it added, replaced or
renamed, and waits for Enter.
If an i2PEPICO started from that folder is still running, it asks before
writing: that program would overwrite the update when it saves or exits.
ScriptImport adds missing Imports and updates matching ones, preserving all
other folders/scripts and making a backup beside the target database.
To preview without writing, run from a terminal:
  .\ScriptImport.exe --dry-run "C:\MyAnalysis\script.dat"
Export2DExample.scr is in Examples: paste it into your Process folder,
not Imports. No measurement scripts or Export2DMeas are needed for analysis.
The standalone examples save the executed script with SaveMyself in each export
folder (rebuild saves beside the raw files). Those folders must be writable.

Start PIMP
Install Python 3.10 or newer with Tkinter (the python.org installers include
it). From a terminal in this package folder:
  python -m pip install -r requirements.txt
  python pim.py
On macOS and Linux, use python3 instead of python.
Use + to add the exported folder containing 2D_TPES_index.txt.
PIMP autosaves its workspace as pim.autosave.pepico.json beside pim.py.
Requirements install NumPy, Matplotlib and pygame-ce. If upgrading an environment
with the original pygame installed, uninstall pygame before installing these
requirements. Both distributions provide the same pygame module.

Version history
3.5 (November 2026): i2pepico-cli batch command line for agentic data
    analysis; Load refuses raw files still open for writing; ShellExec
    Terminate fix; PIMP update (My traces, revised exports).
3.41 (October 2026): optional ion ROI for the Export2D and Export2DSlices
    exports (UseIonROI, IonROI); ScriptImport version header.
3.4 (October 2026): time slicing of one raw file (Export2DSlices), the bundled
    electron -> ion settings, a rewritten scripting manual.
3.3 (October 2026): Imports in ManoScript and export folders for PIMP
    (Export2D), ScriptImport.
3.2 (August 2026): SLS 2.0 support (SLS2 beamline channels, i2d version 4).
Details are in the version history at the end of Manoscript_3.5.pdf.

Manuals
pim.pdf: PIMP guide: export folders, matrix, Peaks, My traces, 3D, Export menu
and workspaces.
Manoscript_3.5.pdf: i2PEPICO scripting reference, including the shipped Imports
and the batch command line.
