edfize 0.1.0.beta7 → 0.1.0.beta8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/edfize/edf.rb +17 -10
- data/lib/edfize/signal.rb +7 -0
- data/lib/edfize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dea20df7bcf2794b479e5ad5265a88ccb7e9bcca
|
4
|
+
data.tar.gz: 08d7115da77547f4363d16c345932713ffd95eb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22e2281613deed44e59b4ca6f7c489165583561b340420794ea79376def894bcf423a0d4f4ad1605182355cb707c418168a5897efa45a3101e2c55a388c6a390
|
7
|
+
data.tar.gz: 95394c3fc72cee59a507325539d96a2a3caef54d21a3140015e8b858f68778154c4659df787dc97f4b4284a069d492aaf6af80b9eb6a36c45ca7a8c0a08328e4
|
data/lib/edfize/edf.rb
CHANGED
@@ -6,16 +6,16 @@ module Edfize
|
|
6
6
|
attr_reader :filename
|
7
7
|
|
8
8
|
# Header Information
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
9
|
+
attr_accessor :version
|
10
|
+
attr_accessor :local_patient_identification
|
11
|
+
attr_accessor :local_recording_identification
|
12
|
+
attr_accessor :start_date_of_recording
|
13
|
+
attr_accessor :start_time_of_recording
|
14
|
+
attr_accessor :number_of_bytes_in_header
|
15
|
+
attr_accessor :reserved
|
16
|
+
attr_accessor :number_of_data_records
|
17
|
+
attr_accessor :duration_of_a_data_record
|
18
|
+
attr_accessor :number_of_signals
|
19
19
|
|
20
20
|
attr_accessor :signals
|
21
21
|
|
@@ -39,12 +39,19 @@ module Edfize
|
|
39
39
|
# Used by tests
|
40
40
|
RESERVED_SIZE = HEADER_CONFIG[:reserved][:size]
|
41
41
|
|
42
|
+
def self.create(filename, &block)
|
43
|
+
edf = self.new(filename)
|
44
|
+
yield edf if block_given?
|
45
|
+
edf
|
46
|
+
end
|
47
|
+
|
42
48
|
def initialize(filename)
|
43
49
|
@filename = filename
|
44
50
|
@signals = []
|
45
51
|
|
46
52
|
read_header
|
47
53
|
read_signal_header
|
54
|
+
self
|
48
55
|
end
|
49
56
|
|
50
57
|
def load_signals
|
data/lib/edfize/signal.rb
CHANGED
data/lib/edfize/version.rb
CHANGED