Fex

Check-in [17f3ce2f1e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add log transform option
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256: 17f3ce2f1e4ee55d233691a085c871519d658f4e57375a4418ce97b95d4bf827
User & Date: jesse.mcclure@umassmed.edu 2016-05-18 14:00:49
Context
2017-08-17
14:31
Cleaning up for new python version check-in: 42a96c2c60 user: jmcclure tags: trunk, master
2016-05-18
14:00
add log transform option check-in: 17f3ce2f1e user: jesse.mcclure@umassmed.edu tags: trunk, master
2016-02-10
19:14
added logFreq option to log transform frequencies - I advise *against* using this option check-in: 4fd5b5e5b0 user: jesse.mcclure@umassmed.edu tags: trunk, master
Changes

Changes to share/config.

    35     35   set samples    = 256
    36     36   set bandpass   = 1.25 10.0
    37     37   set scale      = 8
    38     38   set window     = hanning
    39     39   set fontFamily = droid sans
    40     40   set fontSize	= 14
    41     41   set help       = xterm -e man fex-help
    42         -## CAUTION: logFreq was added by user request.  While the option will accurately
    43         -## log (base 10) transform frequencies as requested, I have not done any testing
    44         -## on whether this produces reasonable results.  Using this option is strongly
    45         -## discouraged until it has been thoroughly tested and found to give reasonable
    46         -## results.
           42  +## CAUTION: logFreq was added by user request.  While the option will log (base 10)
           43  +## transform frequencies. I have not done any testing on whether this produces
           44  +## reasonable results.  Using this option is discouraged # until it has been more
           45  +## well tested.
    47     46   set logFreq    = false
    48     47   
    49     48   ## Colors
    50     49   ##   spectrogram: background spectrogram
    51     50   ##   threshold: points included in the signal
    52     51   ##   points: points included in the current excursion calculation
    53     52   ##   lines: lines connecting points in the current calculation

Changes to src/spectro.c.

   142    142   				if (spect->fft->mask[i][j]) continue;
   143    143   				if (spect->fft->amp[i][j] > spect->fft->amp[i][f] || !f)
   144    144   					f = j;
   145    145   		}
   146    146   		/* add points and do calculations if f is above threshold */
   147    147   		if (f > 0 && spect->fft->amp[i][f] > conf.thresh) {
   148    148   			if (lt != spect->fft->time[0]) {
   149         -				if (conf.log10)
   150         -					spect->pex += hypot(log10(spect->fft->freq[f]) - log10(lf),spect->fft->time[i] - lt);
   151         -				else
   152         -					spect->pex += hypot(spect->fft->freq[f] - lf,spect->fft->time[i] - lt);
          149  +				if (conf.log10) spect->pex += hypot(log10(spect->fft->freq[f]) - log10(lf),spect->fft->time[i] - lt);
          150  +				else spect->pex += hypot(spect->fft->freq[f] - lf,spect->fft->time[i] - lt);
   153    151   				spect->tex += spect->fft->time[i] - lt;
   154    152   			}
   155    153   			lt = spect->fft->time[i];
   156    154   			lf = spect->fft->freq[f];
   157    155   			cairo_line_to(l,
   158    156   					(i - spect->fft_x) * conf.scale + conf.scale / 2,
   159    157   					(f - spect->fft_y) * conf.scale + conf.scale / 2);