hipo-sample¶
Random or systematic event sampling from HIPO files.
Synopsis¶
Description¶
hipo-sample extracts a subset of events from a HIPO file using random or systematic sampling methods. Useful for creating smaller test files or representative samples.
Options¶
| Option | Description | Default |
|---|---|---|
-o, --output <file> | Output file (required) | - |
-n, --nevents <n> | Number of events to sample | 1000 |
--random | Use random sampling | - |
--seed <n> | Random seed for reproducibility | - |
--every <n> | Take every Nth event (systematic) | - |
-q, --quiet | Suppress progress output | - |
--no-color | Disable colored output | - |
Examples¶
First N Events¶
Random Sampling¶
# Random sample of 1000 events
hipo-sample -n 1000 --random -o sample.hipo large.hipo
# Reproducible random sample with seed
hipo-sample -n 1000 --random --seed 42 -o sample.hipo large.hipo
Systematic Sampling¶
# Take every 100th event
hipo-sample --every 100 -o systematic.hipo data.hipo
# Every 10th event, limited to 500 events
hipo-sample --every 10 -n 500 -o sample.hipo data.hipo
See Also¶
- hipo-slice - Extract bank subsets
- hipo-split - Split by event count
- hipo-filter - Filter by criteria