USTATS(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ‘‘ ustats β€” BRL-CAD manual page, bestie edition πŸŽ€

okay so picture this: it's a BRL-CAD man page, it's called USTATS(1), and it's literally about counting up your unsigned shorts. yes. that's the whole vibe. let's get into it ✨


🌸 NAME 🌸

ustats β€” computes basic statistics on a stream of unsigned short integers. that's it, that's the gig πŸ’…

✨ SYNOPSIS ✨

ustats [-h] [file]

πŸ¦‹ DESCRIPTION πŸ¦‹

so ustats reads in a stream of 16-bit unsigned short integers (that's 0 to 65535, no negatives allowed, we don't do that here) and then computes basic statistics on all that data and prints them out to standard output as a small text block. cute, compact, done 🫢

where does the input come from? if you give it a named file, it reads from that file. if you don't, it reads from standard input. literally that simple, no cap.

the stats it reports are:

  • the number of samples (Num)
  • the minimum value (Min)
  • the maximum value (Max)
  • the sum of all values (Sum)
  • the arithmetic mean (Mean)
  • and the sample standard deviation (SStdev)

it's a companion to the other signal-processing statistics tools, like istats(1) (that one's signed shorts) and dstats(1) (that one's doubles). the whole friend group honestly πŸ˜­πŸ’–

πŸ’… OPTIONS πŸ’…

  • -h β€” prints a usage message and then exits. short, sweet, helpful, iconic.

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Summarize 16-bit unsigned image data

pix-bw scene.pix | bw-d | d-u > scene.ushorts
ustats scene.ushorts

so what's happening here is you convert a color image to single-channel data, then convert that to unsigned shorts, and then ustats reports the value distribution for you β€” min, max, mean, standard deviation. genuinely useful for checking the dynamic range of your data before you go do further processing on it. vibe check your data first, bestie πŸ”

Example 2. Compute statistics from a pipeline

ustats < samples.ushorts

this one reads unsigned short values directly from standard input and prints the statistical summary. perfect for slotting into a shell pipeline. main character pipeline energy fr fr 🌈

🧚 SEE ALSO 🧚

brlcad(1), istats(1), dstats(1), ihist(1), umod(1)

go read those too, they're all in the same friend group 🫢

⭐ AUTHOR ⭐

BRL-CAD Team β€” love them for this πŸ’œ

This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

πŸ’€ BUG REPORTS πŸ’€

found a bug? a problem? something acting up? Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. please do tell them, they wanna know πŸ™ˆ


alright that's the whole page, go forth and compute your stats ✨ and hey β€” this little icon right here is brought to you by BRL-CAD, closing out USTATS(1) with style. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from