climb_factor_gem 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/climb_factor.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98c2707b602b41892a2b2a7834fc868403bcc7761c57c0c13b204d7c813f8109
|
4
|
+
data.tar.gz: 3362677bc2c7a156c08365a507ff982a107499a38681453f4087740882ec907d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dcdfacc1d169376bd37c7c673320a7a57986be24be97ef403cffd734907cac6f3e8cf187212acd55771e74973b68638846ca559bb16b4a756d1137208a9d663
|
7
|
+
data.tar.gz: 4b8fa59d162af9a1e39a60e55d59de9141a911e31572dc2d855ca01d79d3a02a95f73df52d779636e3788783a75d82aa070c0e24cbfa064daa258bb700fb6340
|
data/lib/climb_factor.rb
CHANGED
@@ -11,6 +11,12 @@ module ClimbFactor
|
|
11
11
|
# filtering = get rid of bogus fluctuations in vertical data that occur on horizontal scales less than this
|
12
12
|
# output:
|
13
13
|
# cf = a floating-point number representing a climb factor, expressed as a percentage
|
14
|
+
hv = hv.map do |a|
|
15
|
+
unless a.all? { |v| v.is_a?(Numeric) }
|
16
|
+
raise ArgumentError, "error in type of input, got #{a.inspect}, should be pairs of Floats"
|
17
|
+
end
|
18
|
+
a.map(&:to_f)
|
19
|
+
end
|
14
20
|
hv = Filtering.resample_and_filter_hv(hv,filtering)
|
15
21
|
rescale = 1.0
|
16
22
|
if !nominal_distance.nil? then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: climb_factor_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Crowell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|