DSTATS(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

okay so bestie, this is DSTATS(1) from BRL-CAD, and it’s lowkey iconic for peeking at a stream of doubles. πŸ’–

🌸 NAME 🌸

dstats β€” compute basic statistics of a stream of doubles. No cap, that’s the whole vibe.

✨ SYNOPSIS ✨

dstats [-h] [file.doubles]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so dstats reads a stream of raw, host-format double-precision floating-point numbers and computes basic statistics over the values. If you give it a file.doubles argument, it reads from that file; otherwise it reads from standard input. These values are interpreted as packed binary doubles β€” the kind of thing produced by tools such as a-d(1) or dmod(1) β€” and not as ASCII text, bestie. Like, do not try to feed it plain text and expect magic. πŸ’€

Then it writes these stats to standard output in a human-readable text format, and the list is genuinely useful:

  • the number of values read β€” with its square root shown twice, which is a convenience for data representing a square image or matrix πŸ‘‘
  • the minimum
  • the maximum
  • the arithmetic mean
  • the standard deviation
  • the variance

The unsigned-char and short-integer analogues are ustats(1) and istats(1), iykyk.

πŸ’… OPTIONS πŸ’…

  • -h β€” print a usage message and exit. The synonym -? is also accepted. Cute, right? Two little shortcuts for the same thing.

πŸŽ€ EXAMPLES πŸŽ€

πŸ“ Example 1. Inspect the range of converted sample data πŸ“

a-d < data.txt | dstats

Convert ASCII sample data to raw doubles with a-d(1) and pipe the result into dstats to quickly check the value range, mean, and variance of a signal before further processing. Reviewing the reported minimum and maximum is a fast way to confirm a stream is scaled as expected before feeding it to dmod(1) or dfft(1). It’s giving β€œquick vibe check before the main character data goes on stage” ✨

🌈 SEE ALSO 🌈

brlcad(1), a-d(1), dmod(1), dfft(1), istats(1), ustats(1)

🫢 AUTHOR 🫢

BRL-CAD Team

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. If something’s broken, tell the devs β€” they’re the ones who can fix it, fr fr. 😭


mwah πŸ’… β€” footer sign-off: source/version BRL-CAD / DSTATS(1) Β· date: not printed on this page, so no invented date from me πŸ«ΆπŸ’–

πŸ“¦ where this page comes from