IHIST(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’… 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. ⭐


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