1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
|
<!-- Creator : groff version 1.22.4 -->
<!-- CreationDate: Sat May 6 17:36:19 2023 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>SPECGRAM</title>
</head>
<body>
<h1 align="center">SPECGRAM</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLE">EXAMPLE</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<a href="#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">specgram
− create spectrograms from raw files or standard
input</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>specgram</b>
[<b>−aehlqvz</b>] [<b>−−print_input</b>]
[<b>−−print_fft</b>]
[<b>−−print_output</b>] [<b>−i,
--input</b>=<i>RATE</i>] [<b>−r,
--rate</b>=<i>RATE</i>] [<b>−d,
--datatype</b>=<i>DATA_TYPE</i>] [<b>−p,
--prescale</b>=<i>PRESCALE_FACTOR</i>] [<b>−b,
--block_size</b>=<i>BLOCK_SIZE</i>] [<b>−S,
--sleep_for_input</b>=<i>SLEEP_MS</i>] [<b>−f,
--fft_width</b>=<i>FFT_WIDTH</i>] [<b>−g,
--fft_stride</b>=<i>FFT_STRIDE</i>] [<b>−n,
--window_function</b>=<i>WIN_FUNC</i>] [<b>−m,
--alias</b>=<i>ALIAS</i>] [<b>−A,
--average</b>=<i>AVG_COUNT</i>] [<b>−w,
--width</b>=<i>WIDTH</i>] [<b>−x,
--fmin</b>=<i>FMIN</i>] [<b>−y,
--fmax</b>=<i>FMAX</i>] [<b>−s,
--scale</b>=<i>SCALE</i>] [<b>−c,
--colormap</b>=<i>COLORMAP</i>]
[<b>--bg-color</b>=<i>BGCOLOR</i>]
[<b>--fg-color</b>=<i>FGCOLOR</i>] [<b>−k,
--count</b>=<i>COUNT</i>] [<b>−t,
--title</b>=<i>TITLE</i>] <i>[outfile]</i></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i><b>specgram</b></i>
generates nice looking spectrograms from raw data, based on
the options provided in the command line.</p>
<p style="margin-left:11%; margin-top: 1em">The program has
two output modes: file output when <i>outfile</i> is
provided and live output when <b>−l,
−−live</b> is provided. The two modes are not
necessarily mutually exclusive, but behaviour may differ
based on other options.</p>
<p style="margin-left:11%; margin-top: 1em">The program has
two input modes: file input when the <b>−i,
−−input</b> option is provided, or stdin input
otherwise (default behaviour).</p>
<p style="margin-left:11%; margin-top: 1em">In file input
mode, the file is read in a synchronous manner until EOF is
reached, and the spectrogram is generated into
<i>outfile</i>. Only file output is allowed in this mode, so
<i>outfile</i> is mandatory and <b>−l,
−−live</b> is disallowed.</p>
<p style="margin-left:11%; margin-top: 1em">In stdin input
mode, data is read in an asynchronous manner and for an
indefinite amount of time. The spectrogram is updated as new
data arrives and output is buffered in memory.</p>
<p style="margin-left:11%; margin-top: 1em">In either input
modes, when receiving SIGINT (i.e. by user pressing CTRL+C
in the terminal), the program stops listening to data and
exits gracefully, writing <i>outfile</i> if provided. This
also happens in live output mode, when the live window is
closed. If the program receives SIGINT again it will
forcefully quit.</p>
<p style="margin-left:11%; margin-top: 1em">See
<b>EXAMPLES</b> for common use cases.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i>outfile</i></p>
<p style="margin-left:22%;">Optional output image file.
Check <i>SFML</i> documentation for supported file types,
but PNG files are recommended.</p>
<p style="margin-left:22%; margin-top: 1em">If
"<b>-</b>" is provided then the resulting image is
written to stdout in PNG format.</p>
<p style="margin-left:22%; margin-top: 1em">Either
<i>outfile</i> must be specified, <b>−l,
−−live</b> must be set, or both.</p>
<p style="margin-left:11%;"><b>−h</b>,
<b>−−help</b></p>
<p style="margin-left:22%;">Display help message.</p>
<p style="margin-left:11%;"><b>−v</b>,
<b>−−version</b></p>
<p style="margin-left:22%;">Display program version.</p>
<p style="margin-left:11%;"><b>INPUT OPTIONS <br>
−i</b>, <b>−−input</b>=<i>INFILE</i></p>
<p style="margin-left:22%;">Input file name. If option is
provided, <i>INFILE</i> is handled as a raw dump of values
(i.e. input file format is not considered). The program will
stop when EOF is encountered.</p>
<p style="margin-left:22%; margin-top: 1em">If option is
not provided or "<b>-</b>" is provided, data will
be read indefinitely from stdin.</p>
<p style="margin-left:11%;"><b>−r</b>,
<b>−−rate</b>=<i>RATE</i></p>
<p style="margin-left:22%;">Rate, in Hz, of the input data.
Used for display purposes and computation of other
parameters. Program will not perform rate limiting based on
this parameter and will consume data as fast as it is
available on stdin.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
44100.</p>
<p style="margin-left:11%;"><b>−d</b>,
<b>−−datatype</b>=<i>DATA_TYPE</i></p>
<p style="margin-left:22%;">Data type of the input data. Is
formed from an optional complex prefix (<i>c</i>), a type
specifier (<i>u</i> for unsigned integer, <i>s</i> for
signed integer, <i>f</i> for floating point) and a size
suffix (in bits: 8, 16, 32, 64).</p>
<p style="margin-left:22%; margin-top: 1em">Valid values
are: u8, u16, u32, u64, s8, s16, s32, s64, f32, f64, cu8,
cu16, cu32, cu64, cs8, cs16, cs32, cs64, cf32, cf64.</p>
<p style="margin-left:22%; margin-top: 1em">Complex types
are pairs of two values containing the real and imaginary
part of the number, in this order. The size of the complex
data type is twice that of the basic type. For example cf64
is 128-bit wide, corresponding to two 64-bit values.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
s16.</p>
<p style="margin-left:11%;"><b>−p</b>,
<b>−−prescale</b>=<i>PRESCALE_FACTOR</i></p>
<p style="margin-left:22%;">Input prescale factor.</p>
<p style="margin-left:22%; margin-top: 1em">The following
normalizations are applied to input values, regardless if
they are part of a complex number or not: <br>
• unsigned values are normalized to [0.0 .. 1.0] based
on the domain limits. <br>
• signed values are normalized to [-1.0 .. 1.0] based
on the domain limits. <br>
• floating point values are left untouched, with the
exception of NaN which is converted to a zero.</p>
<p style="margin-left:22%; margin-top: 1em">After this
normalization, the new value is multiplied by
<i>PRESCALE_FACTOR</i>. This is mostly useful for adjusting
your inputs to the scale, and is usually needed for floating
point inputs (see <b>−s, −−scale</b>).</p>
<p style="margin-left:22%; margin-top: 1em">Default is
1.0.</p>
<p style="margin-left:11%;"><b>−b</b>,
<b>−−block_size</b>=<i>BLOCK_SIZE</i></p>
<p style="margin-left:22%;">Block size, in data type sized
values, that are to be read at a time from stdin. The larger
this value, the larger the latency of the live
spectrogram.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
256.</p>
<p style="margin-left:11%;"><b>−S</b>,
<b>−−sleep_for_input</b>=<i>SLEEP_MS</i></p>
<p style="margin-left:22%;">Duration in milliseconds to
sleep for when input is not available. Set this to a
reasonable value when input is sparse. Leave unset when
input is constant and low latency is desired.</p>
<p style="margin-left:22%; margin-top: 1em">Default is 0
(i.e. program busywaits).</p>
<p style="margin-left:11%;"><b>FFT OPTIONS <br>
−f</b>,
<b>−−fft_width</b>=<i>FFT_WIDTH</i></p>
<p style="margin-left:22%;">FFT window width. Lower values
provide worse frequency resolution but better temporal
resolution. Higher values provide better frequency
resolution but worse temporal resolution.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
1024.</p>
<p style="margin-left:11%;"><b>−g</b>,
<b>−−fft_stride</b>=<i>FFT_STRIDE</i></p>
<p style="margin-left:22%;">Stride (distance) between two
subsequent FFT windows in the input. Value can be less than
<i>FFT_WIDTH</i> in which case there is overlap between
windows, larger than <i>FFT_WIDTH</i> in which case
information is lost, or equal to <i>FFT_WIDTH</i>.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
1024.</p>
<p style="margin-left:11%;"><b>−n</b>,
<b>−−window_function</b>=<i>WIN_FUNC</i></p>
<p style="margin-left:22%;">Window function to be applied
to the input window before FFT is computed. Because of the
discrete nature of the FFT, a periodic assumption is made of
the input window. In reality the input window is mostly
never periodic, so window functions are used to taper off
the ends of the window and avoid jumps between the beginning
and end samples.</p>
<p style="margin-left:22%; margin-top: 1em">Valid values
are: none, hann, hamming, blackman, nuttall.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
hann.</p>
<p style="margin-left:11%;"><b>−m</b>,
<b>−−alias</b>=<i>ALIAS</i></p>
<p style="margin-left:22%;">Specifies whether aliasing
between negative and positive frequencies exists. If set to
true (<i>1</i>), then the bins of corresponding negative and
positive frequencies are summed on both sides.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
<i>0</i> (no) for complex data types and <i>1</i> (yes)
otherwise.</p>
<p style="margin-left:11%;"><b>−A</b>,
<b>−−average</b>=<i>AVG_COUNT</i></p>
<p style="margin-left:22%;">Number of windows to average
before the mean is displayed.</p>
<p style="margin-left:22%; margin-top: 1em">Use this for
high sample rate signals, where either displaying many
windows or computing too wide a window is not possible.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
1.</p>
<p style="margin-left:11%;"><b>DISPLAY OPTIONS <br>
−q</b>, <b>−−no_resampling</b></p>
<p style="margin-left:22%;">Disables resampling of output
FFT windows, generating clean and crisp output. This
invalidates the use of <b>−w, −−width</b>,
as the actual display width is computed from other
parameters.</p>
<p style="margin-left:11%;"><b>−w</b>,
<b>−−width</b>=<i>WIDTH</i></p>
<p style="margin-left:22%;">Display width of spectrogram.
Output FFT windows are resampled to this width, colorized
and displayed. Cannot be used with <b>−q,
−−no_resampling</b>.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
512.</p>
<p style="margin-left:11%;"><b>−x</b>,
<b>−−fmin</b>=<i>FMIN</i></p>
<p style="margin-left:22%;">Lower bound of the displayed
frequency spectrum, in Hz.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
-<i>RATE</i>/2 for complex data types, 0 otherwise.</p>
<p style="margin-left:11%;"><b>−y</b>,
<b>−−fmax</b>=<i>FMAX</i></p>
<p style="margin-left:22%;">Upper bound of the displayed
frequency spectrum, in Hz.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
<i>RATE</i>/2.</p>
<p style="margin-left:11%;"><b>−s</b>,
<b>−−scale</b>=<i>SCALE</i></p>
<p style="margin-left:22%;">Spectrogram scale, specified
with the following format:
<i>unit</i>[,<i>lower</i>[,<i>upper</i>]]</p>
<p style="margin-left:22%; margin-top: 1em"><i>unit</i> is
an arbitrary string representing the unit of measurement
(e.g. <b>V</b>). <i>lower</i> is an optional numeric value
representing the lower bound of the scale. <i>upper</i> is
an optional numeric value representing the upper bound of
the scale.</p>
<p style="margin-left:22%; margin-top: 1em">Valid values
for <i>SCALE</i> specify either just the unit, the unit and
the lower bound, or all three values.</p>
<p style="margin-left:22%; margin-top: 1em">After
normalization and prescaling (see <b>−p,
−−prescale</b>), the following transformations
are applied to the input: <br>
• if <i>unit</i> starts with "dB", then a
logarithmic decibel scale is assumed: Y=20*log10(X) <br>
• the values are clamped between <i>lower</i> and
<i>upper</i>: Y=clamp(X, <i>lower</i>, <i>upper</i>)</p>
<p style="margin-left:22%; margin-top: 1em">Default is
dBFS,-120,0.</p>
<p style="margin-left:22%; margin-top: 1em"><b>[dBFS]
NOTE:</b> The peak amplitude assumed for dBFS, after
normalization and prescaling (see <b>−p,
−−prescale</b>), is 1.0. Thus, the correct input
domains are: <br>
• [0 .. TYPE_MAX] for real unsigned integer values <br>
• [-TYPE_MAX .. TYPE_MAX] for real signed integer
values <br>
• [-1.0 .. 1.0] for real floating point values <br>
• { x | abs(x) <= TYPE_MAX } for complex signed and
unsigned integer values <br>
• { x | abs(x) <= 1.0 } for complex floating point
values</p>
<p style="margin-left:22%; margin-top: 1em">Input values
outside these domains may lead to positive dBFS values,
which will be clamped to zero. Use prescaling (<b>−p,
−−prescale</b>) to adjust your input to this
domain. Integer inputs don’t usually need prescaling,
as they are normalized based on their domain’s
limits.</p>
<p style="margin-left:11%;"><b>−c</b>,
<b>−−colormap</b>=<i>COLORMAP</i></p>
<p style="margin-left:22%;">Color scheme. Valid values are:
jet, hot, inferno, gray, purple, blue, green, orange,
red.</p>
<p style="margin-left:22%; margin-top: 1em">If
<i>COLORMAP</i> is neither of these values, then it is
interpreted either as a 6 character hex string (RGB color)
or an 8 character hex string (RGBA color). In this case, a
gradient between the background color and the color
specified by the hex string will be used as a color map.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
inferno.</p>
<p style="margin-left:11%;"><b>−−bg-color</b>=<i>BGCOLOR</i></p>
<p style="margin-left:22%;">Background color. Either a 6
character hex string (RGB color) or an 8 character hex
string (RGBA color).</p>
<p style="margin-left:22%; margin-top: 1em">Default is
000000 (black).</p>
<p style="margin-left:11%;"><b>−−fg-color</b>=<i>FGCOLOR</i></p>
<p style="margin-left:22%;">Foreground color. Either a 6
character hex string (RGB color) or an 8 character hex
string (RGBA color).</p>
<p style="margin-left:22%; margin-top: 1em">Default is
ffffff (white).</p>
<p style="margin-left:11%;"><b>−a</b>,
<b>−−axes</b></p>
<p style="margin-left:22%;">Displays axes.</p>
<p style="margin-left:11%;"><b>−e</b>,
<b>−−legend</b></p>
<p style="margin-left:22%;">Displays legend. Entails
<b>−a, −−axes</b>.</p>
<p style="margin-left:22%; margin-top: 1em">This is enabled
in live view, but only for the live window (i.e. if both
live view and file output are used, then file output will
only display a legend if this flag is set by the user).</p>
<p style="margin-left:11%;"><b>−z</b>,
<b>−−horizontal</b></p>
<p style="margin-left:22%;">Rotates histogram 90 degrees
counter clockwise, making it readable left to right.</p>
<p style="margin-left:11%;"><b>−−print_input</b></p>
<p style="margin-left:22%;">Prints input windows to
standard output, after normalization and prescaling (see
<b>−p, −−prescale</b>).</p>
<p style="margin-left:11%;"><b>−−print_fft</b></p>
<p style="margin-left:22%;">Prints FFT result to standard
output, in FFTW order (i.e. freq[k] = <i>RATE</i>*k/N).</p>
<p style="margin-left:11%;"><b>−−print_output</b></p>
<p style="margin-left:22%;">Prints output, before
colorization, to standard output. Values are in the domain
[0.0 .. 1.0].</p>
<p style="margin-left:22%; margin-top: 1em">The length of
the output may be different than the FFT result or the
input, depending on specified frequency bounds (see
<b>−x, −−fmin</b> and <b>−y,
−−fmax</b>). Negative frequencies precede
positive frequencies.</p>
<p style="margin-left:11%;"><b>LIVE OPTIONS <br>
−l</b>, <b>−−live</b></p>
<p style="margin-left:22%;">Displays a live rendering of
the spectrogram being computed.</p>
<p style="margin-left:22%; margin-top: 1em">Either this
flag must be set, <i>outfile</i> must be specified, or
both.</p>
<p style="margin-left:11%;"><b>−k</b>,
<b>−−count</b>=<i>COUNT</i></p>
<p style="margin-left:22%;">Number of FFT windows displayed
in live spectrogram.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
512.</p>
<p style="margin-left:11%;"><b>−t</b>,
<b>−−title</b>=<i>TITLE</i></p>
<p style="margin-left:22%;">Title of live window.</p>
<p style="margin-left:22%; margin-top: 1em">Default is
’Spectrogram’.</p>
<h2>EXAMPLE
<a name="EXAMPLE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">One of the most
obvious use cases is displaying a live spectrogram from the
PC audio output (you can retrieve <i>yourdevice</i> using
"<b>pactl list sources short</b>"):</p>
<p style="margin-left:22%; margin-top: 1em">parec
--channels=1 --device="<i>yourdevice</i>.monitor"
--raw | <b>specgram</b> -l</p>
<p style="margin-left:11%; margin-top: 1em">This will
assume your device produces 16-bit signed output at 44.1kHz,
which is usually the case.</p>
<p style="margin-left:11%; margin-top: 1em">If you want the
same, but wider and with a crisp look:</p>
<p style="margin-left:22%; margin-top: 1em">parec
--channels=1 --device="<i>yourdevice</i>.monitor"
--raw | <b>specgram</b> -lq -f 2048</p>
<p style="margin-left:11%; margin-top: 1em">If you also
want to render it to an output file:</p>
<p style="margin-left:22%; margin-top: 1em">parec
--channels=1 --device="<i>yourdevice</i>.monitor"
--raw | <b>specgram</b> -lq -f 2048 <i>outfile.png</i></p>
<p style="margin-left:11%; margin-top: 1em">Keep in mind
that when reading from stdin (like the above cases), the
program expects SIGINT to stop generating FFT windows (e.g.
by pressing CTRL+C in terminal). The file <i>outfile.png</i>
will be generated after SIGINT is received.</p>
<p style="margin-left:11%; margin-top: 1em">Generating from
a file to a file, with axes displayed and a crisp look:</p>
<p style="margin-left:22%; margin-top: 1em"><b>specgram</b>
-aq -f 2048 -i <i>infile outfile.png</i></p>
<p style="margin-left:11%; margin-top: 1em">Generating from
a file to a file, with axes and legend displayed, but
zooming in on the 2-4kHz band:</p>
<p style="margin-left:22%; margin-top: 1em"><b>specgram</b>
-e -f 2048 -x 2000 -y 4000 -i <i>infile outfile.png</i></p>
<p style="margin-left:11%; margin-top: 1em">Render a crisp
output with a transparent background, so it can be embedded
in a document:</p>
<p style="margin-left:22%; margin-top: 1em"><b>specgram</b>
-qe --bg-color=00000000 -i <i>infile outfile.png</i></p>
<p style="margin-left:11%; margin-top: 1em">Generating from
a file to stdout and displaying the output with
<b>imagemagick</b>:</p>
<p style="margin-left:22%; margin-top: 1em"><b>specgram</b>
-i <i>infile</i> - | <b>display</b></p>
<h2>BUGS
<a name="BUGS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Frequency
bounds (<b>−x, −−fmin</b> and <b>−y,
−−fmax</b>) may exceed FFT window frequency
limits when resampling is enabled (i.e. default behaviour),
but may not do so when resampling is disabled (<b>−q,
−−no_resampling</b>). This inconsistency is
known behaviour and, while not necessarily nice, does not
impact usability in a meaningful manner. Ideally exceeding
these limits should be allowed in both cases, and zero
padding should be performed.</p>
<p style="margin-left:11%; margin-top: 1em">Moreover, when
using the <b>−q, −−no_resampling</b> flag,
the frequency limits are
±<i>RATE</i>*(<i>FFT_WIDTH</i>-1)/(2*<i>FFT_WIDTH</i>)
when <i>FFT_WIDTH</i> is odd and
-<i>RATE</i>*(<i>FFT_WIDTH</i>-2)/(2*<i>FFT_WIDTH</i>) to
<i>RATE</i>/2 when <i>FFT_WIDTH</i> is even. This is a bit
different from the behaviour of NumPy’s implementation
of fftfreq and aims to make it easier to display the Nyquist
frequency component for non-complex inputs.</p>
<p style="margin-left:11%; margin-top: 1em">The above upper
limits are enforced silently in the default values of
<b>−x, −−fmin</b> and <b>−y,
−−fmax</b>, but for brevity are not mentioned in
this manpage’s <b>OPTIONS</b> section or in the
program help screen.</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Copyright (c)
2020-2021 Vasile Vilvoiu <vasi@vilvoiu.ro></p>
<p style="margin-left:11%; margin-top: 1em"><b>specgram</b>
is free software; you can redistribute it and/or modify it
under the terms of the MIT license. See LICENSE for
details.</p>
<h2>ACKNOWLEDGEMENTS
<a name="ACKNOWLEDGEMENTS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Taywee/args
library by Taylor C. Richberger and Pavel Belikov, released
under the MIT license.</p>
<p style="margin-left:11%; margin-top: 1em">Program icon by
Flavia Fabian, released under the CC-BY-SA 4.0 license.</p>
<p style="margin-left:11%; margin-top: 1em">Share Tech Mono
font by Carrois Type Design, released under Open Font
License.</p>
<p style="margin-left:11%; margin-top: 1em">Special thanks
to Eugen Stoianovici for code review and various fixes.</p>
<hr>
</body>
</html>
|