/* * tscope_print.c * * Author: Kamal Mostafa * * Unpublished work, not licensed for any purpose. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "tscope_print.h" static inline float band_mag( fftwf_complex * const cplx, unsigned int band, float scalar ) { float re = cplx[band][0]; float im = cplx[band][1]; float mag = hypot(re, im) * scalar; return mag; } void tscope_print( fftwf_complex * const fftout, int nbands, float magscalar, int one_line_mode, int show_maxmag ) { char *buf = alloca(nbands+1); char magchars[] = " .-=+#^"; if ( one_line_mode ) magchars[0] = '_'; float maxmag = 0; int i; for ( i=0; i