Skip to content

Remove unused library code - #9

Merged
OmarAlterkait merged 3 commits into
mainfrom
pr/library-cleanup
Nov 23, 2026
Merged

OmarAlterkait merged 3 commits into
mainfrom
pr/library-cleanup

Conversation

@OmarAlterkait

Copy link
Copy Markdown
Collaborator

Removes code with no callers in the repository: nn_utils.py, sparse_utils.py, single-file event I/O in utils.py, the legacy standalone track-hit path, the loader CLI and an unused config field. to_dense now reads the wire output of to_sparse. include_noise still works but warns.

nn_utils.py: scaffolding for a SIREN surrogate of the wire response kernel,
extracted (549fbe9) from siren_response_training/, which never entered this repo.
No caller on any branch; unrelated to the SCE-SIREN. Removed with its API doc entry.

sparse_utils.py: a second, incompatible sparse format ((N,2) indices) used only by
its own test; output.to_sparse/to_dense is the format the simulator, production,
profiler and visualization use. Its test cases (round trip, signed threshold,
duplicate accumulation, empty input) are ported to test_output.py against output.py,
which exposed that to_dense could not read to_sparse's own wire dict (it fell
through to np.asarray(dict)). Added that branch; both new tests fail without it.
save_event/load_event/list_events expected 'indices'/'signal'/'n_signal' keys that
no current output produces (to_sparse returns wire/time/values) and only knew the
2-volume U/V/Y detector; nothing called them. Event I/O is production/save.py +
load.py (N volumes, wire or pixel, usable from a notebook). load_sce_data now orders
volumes numerically (volume_10 after volume_9). Docs updated.
…ate include_noise

- track_hits: drop group_hits_by_track / label_hits / sparse_hits_to_dense (the
  K_wire x K_time standalone path, test-only, not used by the simulator) and the
  module-level finalize_track_hits (duplicate of DetectorSimulator.finalize_track_hits;
  only stale-imported by one test). Their tests go with them.
- loader: drop the example main() CLI.
- TrackHitsConfig.threshold: no readers; removed with its create_track_hits_config kwarg.
- Pixel differentiable response: replace the silent alias to the production builder
  (unreachable: __init__ rejects differentiable pixel) with an explicit error.
- include_noise: still accepted but now warns (DeprecationWarning); tests and READMEs
  use include_intrinsic_noise.
@OmarAlterkait
OmarAlterkait merged commit 6c444cc into main Nov 23, 2026
4 checks passed
@OmarAlterkait
OmarAlterkait deleted the pr/library-cleanup branch November 24, 2026 07:50
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.

1 participant