D2-C(1)
π d2-c β the BRL-CAD girlie's guide π
okay so bestie, welcome to d2-c, straight out of the BRL-CAD family β¨ this one's a tiny little icon and it has exactly one job. let's get into it π«Ά
πΈ NAME πΈ
d2-c β merges two double files into one single complex file. that's it. that's the whole personality π
π SYNOPSIS π
d2-c _real_file_ _imag_file_ > _complex_
β¨ DESCRIPTION β¨
okay so here's the vibe: d2-c interleaves two separate streams of double-precision floating point values into one single stream of complex numbers, and writes the whole thing out to standard output. it reads values in parallel from real_file and imag_file and emits them as alternating real/imaginary pairs. so the output is literally built to be fed into tools that expect complex data β like dfft(1) π
and if one input is shorter than the other? no stress π the missing values get padded with zeros until both inputs are exhausted. everything comes out even, nobody gets left behind.
β οΈ heads up: the output is binary, so you must redirect standard output to a file or a pipe. the program literally refuses to run when standard output is a terminal π€ no cap.
fun fact: d2-c is the inverse of c-d(1). they're giving matching-friends energy π¦
either input name can be special, and both tricks are lowkey iconic:
- a single dash (
-) β reads that input from standard input - a single period (
.) β supplies an all-zero (null) stream, which is super useful for building a purely real or purely imaginary complex signal π
π one sad thing: this command is deprecated and scheduled for removal. so if you depend on it, please contact the developers. don't say i didn't warn you π
π EXAMPLES π
π Example 1. Build a complex signal from separate real and imaginary files
d2-c real.d imag.d > signal.c
reads matching real and imaginary sample streams and writes the interleaved complex result to signal.c β all ready for spectral analysis with dfft(1) β
π¦ Example 2. Promote a purely real signal to complex form
d2-c real.d . > signal.c
pairs each real sample with a zero imaginary part by using the . null stream, producing a complex file with no imaginary component. genuinely so clean β¨
π SEE ALSO π
brlcad(1), c-d(1), dconv(1), dfft(1)
π AUTHOR π
BRL-CAD Team β kings, honestly π«Ά
π 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 β they genuinely wanna hear from you, bestie π
okay that's the whole page!! β¨ this little darling comes to you from BRL-CAD (that's the source/version, mwah π) and yeah, that's the entire manual. go interleave some doubles, you main character ππ
π¦ 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