IHIST(1)
π IHIST(1) β the BRL-CAD girlies' guide to short-integer vibes β¨
okay bestie, so this is ihist from BRL-CAD, and honestly? she's giving "quiet main character who actually does the work." no cap.
πΈ NAME πΈ
ihist β computes a histogram and bit statistics for a stream of short integers. that's it, that's the whole personality. π
β¨ SYNOPSIS β¨
ihist [-v] < input.shorts > output.txt
in through the stdin door, out through the stdout door, periodt. πͺβ‘οΈπͺ
π DESCRIPTION π
so here's the tea: ihist reads a stream of 16-bit signed short integers from standard input, and writes statistics about all that data to standard output. she's literally just out here vibing with your shorts. π©³
what does she report? a whole little glow-up list:
- the total number of values read π―
- the minimum and maximum values she ran into π
- a per-bit tally showing how often each of the 16 bits was set across the entire stream β and each count comes out expressed as a fraction of the total, so it's giving very demure, very mindful percentages π
- the number of distinct levels (unique values) seen out of the 65,536 possible, expressed as a percentage. yes, 65,536. no, that's not a typo, that's just 2^16 living her best life π
and because she's a team player, know that her companion tool istats(1) reports running statistical moments (mean, variance, and so on) for that same short integer stream, while imod(1) is the one applying arithmetic operations to it. squad goals fr fr π«Ά
π₯ OPTIONS π₯
-vβ Verbose. besides the summary statistics, she'll print the full histogram as one"value count"pair per line for every distinct value that occurred. the way that she just spills everything. π£οΈπ¬
π¦ EXAMPLES π¦
Example 1. Inspect the dynamic range of sampled audio π§
ihist < samples.shorts
this one reports the min/max range, the per-bit usage, and the percentage of the 65,536 possible levels actually present in samples.shorts. it's literally the quickest way to tell whether your 16-bit sample stream is using its full dynamic range or just hiding out in a narrow little band of values. vibe check for your audio, basically. πΈ
Example 2. Produce a full histogram for plotting π
ihist -v < samples.shorts | tail -n +22 > histogram.dat
this gives you a complete "value count" listing, then skips the leading summary lines so that histogram.dat contains only the per-value frequency pairs β ready to be fed straight to a plotting program. chefs kiss, honestly. π©βπ³π
π SEE ALSO π
brlcad(1), istats(1), imod(1), ustats(1), bw-d(1)
(the whole friend group, go say hi π«Ά)
π AUTHOR π
BRL-CAD Team β iconic, legendary, built different. β
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
bestie if you find a bug, pls don't suffer in silence β email the devs. they're nice, i promise. π
and that's the whole page, no notes. π this little gem is BRL-CAD's ihist(1) and she's been serving since forever. mwah, go histogram something iconic. πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms