wavspa 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 844dc6500de04cf1cd5f297fa6a979dd4c233f5e203e135865e1e810537a0666
4
- data.tar.gz: 892077f9f61abf70463c16c70c29f33063f14ae691e2c42c98552240280aa9b3
3
+ metadata.gz: 105e6829219b0ac7ca493a4698636783bc680396b13ebaf2886ab2380fba3421
4
+ data.tar.gz: 28bc152456d4152b7c5b5fa60c39bff4513fa77b6193db90b13684e699acd9bf
5
5
  SHA512:
6
- metadata.gz: cc99f998f7065d64d86fefdcfd22f6053b126ff28e87178fc7f92828ca36a3d55b7d445c33099ed2301d441f696cb7a646fe00d3935a812865fda08640b073a3
7
- data.tar.gz: b69d4f4e2ec12b78e57893d5a2dfa0e7a8abe4173a914ce081b26a15e950ae5dee7153cb1f5ed96ab56f309c003f783408c0afa550f50e531af6f1442de2c92d
6
+ metadata.gz: 1c6039a08506eb5155eb8c6d63aa23b7e3c475dc0293bad5e836db93e8aa2bfd97a7a243c41762dc5c12a2b0fc6bcada2c3e2fcf499eabbf547ef2f559c5d261
7
+ data.tar.gz: cb035d342c0d586df69b5f79fdfb06e0c7890e30b53f0c1e7c81ed695e174cb17f4559496dc453693b739cfdc9e2651fbbd5be5233708245337fd89cbf7958ab
data/README.md CHANGED
@@ -22,6 +22,10 @@ This application uses OpenMP, but by default tries to link the libgomp. When usi
22
22
 
23
23
  $ gem insatll wavspa -- --with-openmp ~/env/opts/lib --omp-name omp
24
24
 
25
+ if you not require OpenMP, specify the folowing option:
26
+
27
+ $ gem insatll wavspa -- --no-openmp
28
+
25
29
  ## Usage
26
30
 
27
31
  ### FFT analyzer
@@ -132,8 +136,8 @@ options:
132
136
  -m, --scale-mode=STRING
133
137
  -c, --col-steps=SIZE
134
138
  --show-params
135
- -F, --draw-freq-line
136
- -T, --draw-time-line
139
+ -F, --no-draw-freq-line
140
+ -T, --no-draw-time-line
137
141
  -v, --verbose
138
142
  ```
139
143
 
@@ -179,17 +183,17 @@ options:
179
183
  <dt>--show-params</dt>
180
184
  <dd>show sumarry of settings.</dd>
181
185
 
182
- <dt>-F, --draw-freq-line</dt>
183
- <dd>enable frequency line (vertical grid).</dd>
186
+ <dt>-F, --no-draw-freq-line</dt>
187
+ <dd>disable frequency line (vertical grid).</dd>
184
188
 
185
- <dt>-F, --draw-freq-line</dt>
186
- <dd>enable time line (horizontal grid).</dd>
189
+ <dt>-F, --no-draw-freq-line</dt>
190
+ <dd>disable time line (horizontal grid).</dd>
187
191
 
188
- <dt>-v, --verbose</dt>
189
- <dd>enable verbose mode</dd>
192
+ <dt>-v, --verbose</dt>
193
+ <dd>enable verbose mode</dd>
190
194
 
191
- <dt>-h, --help</dt>
192
- <dd>show help message</dd>
195
+ <dt>-h, --help</dt>
196
+ <dd>show help message</dd>
193
197
  </dl>
194
198
 
195
199
  ## Output example
@@ -816,10 +816,10 @@ fft_calc_power(fft_t* fft, double* dst)
816
816
  }
817
817
 
818
818
  for(j = 0, a = fft->a + (lc->pos * 2); j < lc->n; j++, a += 2) {
819
- v += (sqrt((a[0] * a[0]) + (a[1] * a[1])) / fq);
819
+ v += sqrt((a[0] * a[0]) + (a[1] * a[1]));
820
820
  }
821
821
 
822
- dst[i] = v / j;
822
+ dst[i] = v / (j * fq);
823
823
  }
824
824
  } while(0);
825
825
 
@@ -2,12 +2,18 @@ require 'mkmf'
2
2
  require 'optparse'
3
3
  require 'rbconfig'
4
4
 
5
- omp_path = nil
6
- omp_name = "gomp"
5
+ omp_enable = true
6
+ omp_path = nil
7
+ omp_name = "gomp"
7
8
 
8
9
  OptionParser.new { |opt|
9
- opt.on("", "--with-openmp=PATH", String) { |path|
10
- omp_path = path
10
+ opt.on("--[no-]openmp") { |flag|
11
+ omp_enable = flag
12
+ }
13
+
14
+ opt.on("--with-openmp=PATH", String) { |path|
15
+ omp_enable = true
16
+ omp_path = path
11
17
  }
12
18
 
13
19
  opt.on("--omp-name=NAME", String) { |name|
@@ -17,21 +23,25 @@ OptionParser.new { |opt|
17
23
  opt.parse!(ARGV)
18
24
  }
19
25
 
20
- $CFLAGS << " -fopenmp"
21
- if omp_path
22
- $CFLAGS << " -L#{omp_path}"
23
- $LDFLAGS << " -L#{omp_path}"
26
+ if omp_enable
27
+ $CFLAGS << " -fopenmp"
24
28
 
25
- case RbConfig::CONFIG['arch']
26
- when /-darwin/
27
- $LDFLAGS << " -Wl,-rpath,#{omp_path}"
29
+ if omp_path
30
+ $CFLAGS << " -L#{omp_path}"
31
+ $LDFLAGS << " -L#{omp_path}"
28
32
 
29
- else
30
- # nothing
33
+ case RbConfig::CONFIG['arch']
34
+ when /-darwin/
35
+ $LDFLAGS << " -Wl,-rpath,#{omp_path}"
36
+
37
+ else
38
+ # nothing
39
+ end
31
40
  end
41
+
42
+ have_library(omp_name)
32
43
  end
33
44
 
34
45
  have_library("m")
35
- have_library(omp_name)
36
46
 
37
47
  create_makefile( "wavspa/wavelet")
@@ -1,3 +1,3 @@
1
1
  module WavSpectrumAnalyzer
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavspa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hirosho Kuwagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler