d2-c _real_file_ _imag_file_ > _complex_
D2-C(1)
NAME
d2-c - merge two double files into one complex file
On this page
SYNOPSIS
DESCRIPTION
d2-c interleaves two streams of double-precision floating point values into a single stream of complex numbers, writing the result to standard output. Values are read in parallel from real_file and imag_file and emitted as alternating real/imaginary pairs, so the output is suitable as input to tools that expect complex data such as dfft(1).
If one input is shorter than the other, the missing values are padded with zeros until both inputs are exhausted. The output is binary, so standard output must be redirected to a file or a pipe (the program refuses to run when standard output is a terminal). It is the inverse of c-d(1).
Either input name may be given as a single dash (-) to read from standard input, or as a single period (.) to supply an all-zero (null) stream, which is useful for building a purely real or purely imaginary complex signal.
This command is deprecated and scheduled for removal; contact the developers if you depend on it.
EXAMPLES
d2-c real.d imag.d > signal.c
Reads matching real and imaginary sample streams and writes the interleaved complex result to signal.c, ready for spectral analysis with dfft(1).
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.
SEE ALSO
brlcad(1), c-d(1), dconv(1), dfft(1)
AUTHOR
BRL-CAD Team
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