Skip to content

Add pyevio web viewer - #1

Closed
cissieAB wants to merge 3 commits into
JeffersonLab:mainfrom
cissieAB:web-viewer
Closed

cissieAB wants to merge 3 commits into
JeffersonLab:mainfrom
cissieAB:web-viewer

Conversation

@cissieAB

@cissieAB cissieAB commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Two commits:

1. Read CODA streaming files that set the last-record bit on every record

Some CODA streaming fADC250 files (e.g. EC5_EC6_cosmics_may19_short.evio) set the last-record bit on every record and carry no event index array. pyevio previously reported 1 record and 0 events for them.

  • EvioFile: keep scanning past a record with the last-record bit while another record header (magic word) follows.
  • Record.scan_events: when a record has no event index array, walk events by the length word of each event bank.
  • EvioFile.__del__: ignore BufferError when numpy views of the mmap are still alive.
  • New tests in tests/test_record_scanning.py.

2. Add pyevio web viewer for CODA streaming fADC250 files

A local web page that decodes EVIO v6 files in the browser: file checks, occupancy, rate, charge and timing plots (file, ROC and channel level), and a structure tree down to single hit words. pyevio web [DIR] serves it on localhost with a folder browser. Also adds examples/fadc250_stream_to_parquet.py and docs/web_viewer.md with screenshots.

Tests

pytest tests: 22 passed, 2 failed. The 2 failures (test_bank_scanning.py::test_complex_event_structure, test_real_world_event_structure) also fail on current main and are unrelated to this PR. The 5 new tests pass.

🤖 Generated with Claude Code

cissieAB and others added 3 commits October 5, 2026 17:10
- EvioFile: keep scanning past a record with the last-record bit while
  another record header (magic word) follows.
- Record.scan_events: when a record has no event index array, walk events
  by the length word of each event bank.
- EvioFile.__del__: ignore BufferError when numpy views of the mmap are
  still alive.

Before, these files showed 1 record and 0 events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A local web page that decodes EVIO v6 files in the browser: file checks,
occupancy, rate, charge and timing plots (file, ROC and channel level), and
a structure tree down to single hit words. `pyevio web [DIR]` serves it with
a folder browser on localhost.

Also adds examples/fadc250_stream_to_parquet.py and docs/web_viewer.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pyevio web -> pyevio gui (module pyevio/web -> pyevio/gui); the old
  textual-based 'pyevio ui' command is kept as-is.
- Add --mode {stream,file} to 'pyevio gui'. Default 'stream' decodes CODA
  streaming fADC250 time frames (0xFF60), the only tested format. 'file'
  skips that decode in the browser and shows the structure tree only,
  since file-based/triggered EVIO uses a different layout that isn't
  validated yet. No changes to pyevio's core parsing code.
- Update README/docs/examples/pyproject.toml references accordingly.
@DraTeots

Copy link
Copy Markdown
Collaborator

This PR is implemented via #2

@DraTeots DraTeots closed this Oct 13, 2026
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