sofar 1.1.4__py2.py3-none-any.whl → 1.2.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. sofar/__init__.py +4 -4
  2. sofar/io.py +18 -10
  3. sofar/sofa.py +42 -25
  4. sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.csv +46 -0
  5. sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.json +353 -0
  6. sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.csv +46 -0
  7. sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.json +353 -0
  8. sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.csv +46 -0
  9. sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.json +351 -0
  10. sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.csv +46 -0
  11. sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.json +351 -0
  12. sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.csv +47 -0
  13. sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.json +366 -0
  14. sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.csv +51 -0
  15. sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.json +397 -0
  16. sofar/sofa_conventions/rules/deprecations.json +2 -1
  17. sofar/sofa_conventions/rules/rules.json +21 -2
  18. sofar/sofa_conventions/rules/upgrade.json +36 -0
  19. sofar/sofastream.py +296 -0
  20. sofar/update_conventions.py +108 -85
  21. sofar/utils.py +1 -1
  22. {sofar-1.1.4.dist-info → sofar-1.2.0.dist-info}/LICENSE +4 -1
  23. sofar-1.2.0.dist-info/METADATA +93 -0
  24. {sofar-1.1.4.dist-info → sofar-1.2.0.dist-info}/RECORD +34 -19
  25. {sofar-1.1.4.dist-info → sofar-1.2.0.dist-info}/WHEEL +1 -1
  26. tests/conftest.py +27 -0
  27. tests/test_io.py +9 -5
  28. tests/test_sofa.py +1 -1
  29. tests/test_sofa_upgrade_conventions.py +10 -1
  30. tests/test_sofa_verify.py +1 -1
  31. tests/test_sofastream.py +126 -0
  32. tests/test_utils.py +18 -8
  33. sofar-1.1.4.dist-info/METADATA +0 -91
  34. {sofar-1.1.4.dist-info → sofar-1.2.0.dist-info}/AUTHORS.rst +0 -0
  35. {sofar-1.1.4.dist-info → sofar-1.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,351 @@
1
+ {
2
+ "GLOBAL:Conventions": {
3
+ "default": "SOFA",
4
+ "flags": "rm",
5
+ "dimensions": null,
6
+ "type": "attribute",
7
+ "comment": ""
8
+ },
9
+ "GLOBAL:Version": {
10
+ "default": "2.1",
11
+ "flags": "rm",
12
+ "dimensions": null,
13
+ "type": "attribute",
14
+ "comment": ""
15
+ },
16
+ "GLOBAL:SOFAConventions": {
17
+ "default": "AnnotatedEmitterAudio",
18
+ "flags": "rm",
19
+ "dimensions": null,
20
+ "type": "attribute",
21
+ "comment": ""
22
+ },
23
+ "GLOBAL:SOFAConventionsVersion": {
24
+ "default": "0.1",
25
+ "flags": "rm",
26
+ "dimensions": null,
27
+ "type": "attribute",
28
+ "comment": ""
29
+ },
30
+ "GLOBAL:APIName": {
31
+ "default": "",
32
+ "flags": "rm",
33
+ "dimensions": null,
34
+ "type": "attribute",
35
+ "comment": ""
36
+ },
37
+ "GLOBAL:APIVersion": {
38
+ "default": "",
39
+ "flags": "rm",
40
+ "dimensions": null,
41
+ "type": "attribute",
42
+ "comment": ""
43
+ },
44
+ "GLOBAL:ApplicationName": {
45
+ "default": "",
46
+ "flags": null,
47
+ "dimensions": null,
48
+ "type": "attribute",
49
+ "comment": ""
50
+ },
51
+ "GLOBAL:ApplicationVersion": {
52
+ "default": "",
53
+ "flags": null,
54
+ "dimensions": null,
55
+ "type": "attribute",
56
+ "comment": ""
57
+ },
58
+ "GLOBAL:AuthorContact": {
59
+ "default": "",
60
+ "flags": "m",
61
+ "dimensions": null,
62
+ "type": "attribute",
63
+ "comment": ""
64
+ },
65
+ "GLOBAL:Comment": {
66
+ "default": "",
67
+ "flags": null,
68
+ "dimensions": null,
69
+ "type": "attribute",
70
+ "comment": ""
71
+ },
72
+ "GLOBAL:DataType": {
73
+ "default": "Audio",
74
+ "flags": "rm",
75
+ "dimensions": null,
76
+ "type": "attribute",
77
+ "comment": ""
78
+ },
79
+ "GLOBAL:History": {
80
+ "default": "",
81
+ "flags": null,
82
+ "dimensions": null,
83
+ "type": "attribute",
84
+ "comment": ""
85
+ },
86
+ "GLOBAL:License": {
87
+ "default": "No license provided, ask the author for permission",
88
+ "flags": "m",
89
+ "dimensions": null,
90
+ "type": "attribute",
91
+ "comment": ""
92
+ },
93
+ "GLOBAL:Organization": {
94
+ "default": "",
95
+ "flags": "m",
96
+ "dimensions": null,
97
+ "type": "attribute",
98
+ "comment": ""
99
+ },
100
+ "GLOBAL:References": {
101
+ "default": "",
102
+ "flags": null,
103
+ "dimensions": null,
104
+ "type": "attribute",
105
+ "comment": ""
106
+ },
107
+ "GLOBAL:RoomType": {
108
+ "default": "free field",
109
+ "flags": "m",
110
+ "dimensions": null,
111
+ "type": "attribute",
112
+ "comment": ""
113
+ },
114
+ "GLOBAL:Origin": {
115
+ "default": "",
116
+ "flags": null,
117
+ "dimensions": null,
118
+ "type": "attribute",
119
+ "comment": ""
120
+ },
121
+ "GLOBAL:DateCreated": {
122
+ "default": "",
123
+ "flags": "m",
124
+ "dimensions": null,
125
+ "type": "attribute",
126
+ "comment": ""
127
+ },
128
+ "GLOBAL:DateModified": {
129
+ "default": "",
130
+ "flags": "m",
131
+ "dimensions": null,
132
+ "type": "attribute",
133
+ "comment": ""
134
+ },
135
+ "GLOBAL:Title": {
136
+ "default": "",
137
+ "flags": "m",
138
+ "dimensions": null,
139
+ "type": "attribute",
140
+ "comment": ""
141
+ },
142
+ "ListenerPosition": {
143
+ "default": [
144
+ 0,
145
+ 0,
146
+ 0
147
+ ],
148
+ "flags": "m",
149
+ "dimensions": "IC, MC",
150
+ "type": "double",
151
+ "comment": "Position of the head. IC if not tracked, MC if tracked."
152
+ },
153
+ "ListenerPosition:Type": {
154
+ "default": "cartesian",
155
+ "flags": "m",
156
+ "dimensions": null,
157
+ "type": "attribute",
158
+ "comment": ""
159
+ },
160
+ "ListenerPosition:Units": {
161
+ "default": "metre",
162
+ "flags": "m",
163
+ "dimensions": null,
164
+ "type": "attribute",
165
+ "comment": ""
166
+ },
167
+ "ReceiverPosition": {
168
+ "default": [
169
+ [
170
+ 0,
171
+ 0.09,
172
+ 0
173
+ ],
174
+ [
175
+ 0,
176
+ -0.09,
177
+ 0
178
+ ]
179
+ ],
180
+ "flags": "m",
181
+ "dimensions": "rC, rCM",
182
+ "type": "double",
183
+ "comment": "Position of the ears. RC if not tracked, RCM if tracked."
184
+ },
185
+ "ReceiverPosition:Type": {
186
+ "default": "cartesian",
187
+ "flags": "m",
188
+ "dimensions": null,
189
+ "type": "attribute",
190
+ "comment": ""
191
+ },
192
+ "ReceiverPosition:Units": {
193
+ "default": "metre",
194
+ "flags": "m",
195
+ "dimensions": null,
196
+ "type": "attribute",
197
+ "comment": ""
198
+ },
199
+ "SourcePosition": {
200
+ "default": [
201
+ 0,
202
+ 0,
203
+ 0
204
+ ],
205
+ "flags": "m",
206
+ "dimensions": "IC, MC",
207
+ "type": "double",
208
+ "comment": "Position of the virtual ensemble. IC if not tracked, MC if tracked."
209
+ },
210
+ "SourcePosition:Type": {
211
+ "default": "cartesian",
212
+ "flags": "m",
213
+ "dimensions": null,
214
+ "type": "attribute",
215
+ "comment": ""
216
+ },
217
+ "SourcePosition:Units": {
218
+ "default": "metre",
219
+ "flags": "m",
220
+ "dimensions": null,
221
+ "type": "attribute",
222
+ "comment": ""
223
+ },
224
+ "EmitterPosition": {
225
+ "default": [
226
+ 0,
227
+ 0,
228
+ 0
229
+ ],
230
+ "flags": "m",
231
+ "dimensions": "eC, eCM",
232
+ "type": "double",
233
+ "comment": "Position of the virtual source(s). eC if not tracked, eCM if tracked."
234
+ },
235
+ "EmitterPosition:Type": {
236
+ "default": "cartesian",
237
+ "flags": "m",
238
+ "dimensions": null,
239
+ "type": "attribute",
240
+ "comment": ""
241
+ },
242
+ "EmitterPosition:Units": {
243
+ "default": "metre",
244
+ "flags": "m",
245
+ "dimensions": null,
246
+ "type": "attribute",
247
+ "comment": ""
248
+ },
249
+ "ListenerUp": {
250
+ "default": [
251
+ 0,
252
+ 0,
253
+ 1
254
+ ],
255
+ "flags": "m",
256
+ "dimensions": "IC, MC",
257
+ "type": "double",
258
+ "comment": "Must be of the same dimensionality as ListenerView."
259
+ },
260
+ "ListenerView": {
261
+ "default": [
262
+ 1,
263
+ 0,
264
+ 0
265
+ ],
266
+ "flags": "m",
267
+ "dimensions": "IC, MC",
268
+ "type": "double",
269
+ "comment": "Orientation of the head. IC if not tracked, MC if tracked."
270
+ },
271
+ "ListenerView:Type": {
272
+ "default": "cartesian",
273
+ "flags": "m",
274
+ "dimensions": null,
275
+ "type": "attribute",
276
+ "comment": ""
277
+ },
278
+ "ListenerView:Units": {
279
+ "default": "metre",
280
+ "flags": "m",
281
+ "dimensions": null,
282
+ "type": "attribute",
283
+ "comment": ""
284
+ },
285
+ "M": {
286
+ "default": 0,
287
+ "flags": "m",
288
+ "dimensions": "m",
289
+ "type": "double",
290
+ "comment": "Time stamp of the measurements in M, defines the size of M."
291
+ },
292
+ "M:LongName": {
293
+ "default": "time",
294
+ "flags": "m",
295
+ "dimensions": null,
296
+ "type": "attribute",
297
+ "comment": "Narrative name for M"
298
+ },
299
+ "M:Units": {
300
+ "default": "second",
301
+ "flags": "m",
302
+ "dimensions": null,
303
+ "type": "attribute",
304
+ "comment": "Units used for M"
305
+ },
306
+ "Response": {
307
+ "default": "",
308
+ "flags": null,
309
+ "dimensions": "I, C, S",
310
+ "type": "attribute",
311
+ "comment": "the subject\u00e2\u20ac\u2122s response"
312
+ },
313
+ "Response:Type": {
314
+ "default": "",
315
+ "flags": null,
316
+ "dimensions": "I, C, S",
317
+ "type": "attribute",
318
+ "comment": "type depends on the dimension"
319
+ },
320
+ "Response:LongName": {
321
+ "default": "",
322
+ "flags": null,
323
+ "dimensions": "S",
324
+ "type": "attribute",
325
+ "comment": "narrative description of the response type"
326
+ },
327
+ "Data.Emitter": {
328
+ "default": [
329
+ 0,
330
+ 0
331
+ ],
332
+ "flags": "m",
333
+ "dimensions": "In, En",
334
+ "type": "double",
335
+ "comment": "audio data at the emitter(s); n=number of audio samples"
336
+ },
337
+ "Data.SamplingRate": {
338
+ "default": 44100,
339
+ "flags": "m",
340
+ "dimensions": "I",
341
+ "type": "double",
342
+ "comment": ""
343
+ },
344
+ "Data.SamplingRate:Units": {
345
+ "default": "hertz",
346
+ "flags": "m",
347
+ "dimensions": null,
348
+ "type": "attribute",
349
+ "comment": ""
350
+ }
351
+ }
@@ -0,0 +1,46 @@
1
+ Name Default Flags Dimensions Type Comment
2
+ GLOBAL:Conventions SOFA rm attribute
3
+ GLOBAL:Version 2.1 rm attribute
4
+ GLOBAL:SOFAConventions AnnotatedReceiverAudio rm attribute
5
+ GLOBAL:SOFAConventionsVersion 0.1 rm attribute
6
+ GLOBAL:APIName rm attribute
7
+ GLOBAL:APIVersion rm attribute
8
+ GLOBAL:ApplicationName attribute
9
+ GLOBAL:ApplicationVersion attribute
10
+ GLOBAL:AuthorContact m attribute
11
+ GLOBAL:Comment attribute
12
+ GLOBAL:DataType Audio rm attribute
13
+ GLOBAL:History attribute
14
+ GLOBAL:License No license provided, ask the author for permission m attribute
15
+ GLOBAL:Organization m attribute
16
+ GLOBAL:References attribute
17
+ GLOBAL:RoomType free field m attribute
18
+ GLOBAL:Origin attribute
19
+ GLOBAL:DateCreated m attribute
20
+ GLOBAL:DateModified m attribute
21
+ GLOBAL:Title m attribute
22
+ ListenerPosition [0 0 0] m IC, MC double Position of the head. IC if not tracked, MC if tracked.
23
+ ListenerPosition:Type cartesian m attribute
24
+ ListenerPosition:Units metre m attribute
25
+ ReceiverPosition [0 0.09 0; 0 -0.09 0] m rC, rCM double Position of the ears. RC if not tracked, RCM if tracked.
26
+ ReceiverPosition:Type cartesian m attribute
27
+ ReceiverPosition:Units metre m attribute
28
+ SourcePosition [0 0 0] m IC, MC double Position of the virtual ensemble. IC if not tracked, MC if tracked.
29
+ SourcePosition:Type cartesian m attribute
30
+ SourcePosition:Units metre m attribute
31
+ EmitterPosition [0 0 0] m eC, eCM double Position of the virtual source(s). eC if not tracked, eCM if tracked.
32
+ EmitterPosition:Type cartesian m attribute
33
+ EmitterPosition:Units metre m attribute
34
+ ListenerUp [0 0 1] m IC, MC double Must be of the same dimensionality as ListenerView.
35
+ ListenerView [1 0 0] m IC, MC double Orientation of the head. IC if not tracked, MC if tracked.
36
+ ListenerView:Type cartesian m attribute
37
+ ListenerView:Units metre m attribute
38
+ Data.Receiver [0 0] m In, Rn double (binaural) audio data at the receivers; n=number of audio samples
39
+ Data.SamplingRate 44100 m I double
40
+ Data.SamplingRate:Units hertz m attribute
41
+ M 0 m m double Time stamp of the measurements in M, defines the size of M.
42
+ M:LongName time m attribute Narrative name for M
43
+ M:Units second m attribute Units used for M
44
+ Response I, C, S attribute the subject’s response
45
+ Response:Type I, C, S attribute type depends on the dimension
46
+ Response:LongName S attribute narrative description of the response type