sofar 1.1.3__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.
- sofar/__init__.py +4 -4
- sofar/io.py +18 -10
- sofar/sofa.py +53 -37
- sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.csv +46 -0
- sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.json +353 -0
- sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.csv +46 -0
- sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.json +353 -0
- sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.csv +46 -0
- sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.json +351 -0
- sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.csv +46 -0
- sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.json +351 -0
- sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.csv +47 -0
- sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.json +366 -0
- sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.csv +51 -0
- sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.json +397 -0
- sofar/sofa_conventions/rules/deprecations.json +2 -1
- sofar/sofa_conventions/rules/rules.json +21 -2
- sofar/sofa_conventions/rules/upgrade.json +36 -0
- sofar/sofastream.py +296 -0
- sofar/update_conventions.py +112 -92
- sofar/utils.py +1 -1
- {sofar-1.1.3.dist-info → sofar-1.2.0.dist-info}/LICENSE +4 -1
- sofar-1.2.0.dist-info/METADATA +93 -0
- {sofar-1.1.3.dist-info → sofar-1.2.0.dist-info}/RECORD +34 -19
- {sofar-1.1.3.dist-info → sofar-1.2.0.dist-info}/WHEEL +1 -1
- tests/conftest.py +27 -0
- tests/test_io.py +9 -5
- tests/test_sofa.py +1 -1
- tests/test_sofa_upgrade_conventions.py +10 -1
- tests/test_sofa_verify.py +3 -3
- tests/test_sofastream.py +126 -0
- tests/test_utils.py +18 -8
- sofar-1.1.3.dist-info/METADATA +0 -91
- {sofar-1.1.3.dist-info → sofar-1.2.0.dist-info}/AUTHORS.rst +0 -0
- {sofar-1.1.3.dist-info → sofar-1.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,397 @@
|
|
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": "SingleTrackedAudio",
|
18
|
+
"flags": "rm",
|
19
|
+
"dimensions": null,
|
20
|
+
"type": "attribute",
|
21
|
+
"comment": ""
|
22
|
+
},
|
23
|
+
"GLOBAL:SOFAConventionsVersion": {
|
24
|
+
"default": "0.2",
|
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": "FIR",
|
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": "IC, 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
|
+
"EmitterUp": {
|
286
|
+
"default": [
|
287
|
+
0,
|
288
|
+
0,
|
289
|
+
0
|
290
|
+
],
|
291
|
+
"flags": null,
|
292
|
+
"dimensions": "EC, ECM",
|
293
|
+
"type": "double",
|
294
|
+
"comment": "Must be of the same dimensionality as EmitterView."
|
295
|
+
},
|
296
|
+
"EmitterView": {
|
297
|
+
"default": [
|
298
|
+
0,
|
299
|
+
0,
|
300
|
+
0
|
301
|
+
],
|
302
|
+
"flags": null,
|
303
|
+
"dimensions": "EC, ECM",
|
304
|
+
"type": "double",
|
305
|
+
"comment": "Orientation of the virtual source(s). EC if not tracked, ECM if tracked."
|
306
|
+
},
|
307
|
+
"EmitterView:Type": {
|
308
|
+
"default": "cartesian",
|
309
|
+
"flags": null,
|
310
|
+
"dimensions": null,
|
311
|
+
"type": "attribute",
|
312
|
+
"comment": ""
|
313
|
+
},
|
314
|
+
"EmitterView:Units": {
|
315
|
+
"default": "metre",
|
316
|
+
"flags": null,
|
317
|
+
"dimensions": null,
|
318
|
+
"type": "attribute",
|
319
|
+
"comment": ""
|
320
|
+
},
|
321
|
+
"M": {
|
322
|
+
"default": 0,
|
323
|
+
"flags": "m",
|
324
|
+
"dimensions": "m",
|
325
|
+
"type": "double",
|
326
|
+
"comment": "Time stamp of the measurements in M,defines the size of M."
|
327
|
+
},
|
328
|
+
"M:LongName": {
|
329
|
+
"default": "time",
|
330
|
+
"flags": "m",
|
331
|
+
"dimensions": null,
|
332
|
+
"type": "attribute",
|
333
|
+
"comment": "Narrative name for M"
|
334
|
+
},
|
335
|
+
"M:Units": {
|
336
|
+
"default": "second",
|
337
|
+
"flags": "m",
|
338
|
+
"dimensions": null,
|
339
|
+
"type": "attribute",
|
340
|
+
"comment": "Units used for M"
|
341
|
+
},
|
342
|
+
"Response": {
|
343
|
+
"default": "",
|
344
|
+
"flags": null,
|
345
|
+
"dimensions": "S, C, I",
|
346
|
+
"type": "attribute",
|
347
|
+
"comment": "the subject\u00e2\u20ac\u2122s response"
|
348
|
+
},
|
349
|
+
"Response:Type": {
|
350
|
+
"default": "",
|
351
|
+
"flags": null,
|
352
|
+
"dimensions": "S, C, I",
|
353
|
+
"type": "attribute",
|
354
|
+
"comment": "type depends on the dimension"
|
355
|
+
},
|
356
|
+
"Response:LongName": {
|
357
|
+
"default": "Date",
|
358
|
+
"flags": null,
|
359
|
+
"dimensions": "S",
|
360
|
+
"type": "attribute",
|
361
|
+
"comment": "narrative description of the response type"
|
362
|
+
},
|
363
|
+
"Data.Receiver": {
|
364
|
+
"default": [
|
365
|
+
0,
|
366
|
+
0
|
367
|
+
],
|
368
|
+
"flags": null,
|
369
|
+
"dimensions": "nR",
|
370
|
+
"type": "double",
|
371
|
+
"comment": "(binaural) audio data at the receivers; n=number of audio samples"
|
372
|
+
},
|
373
|
+
"Data.Emitter": {
|
374
|
+
"default": [
|
375
|
+
0,
|
376
|
+
0
|
377
|
+
],
|
378
|
+
"flags": null,
|
379
|
+
"dimensions": "nE",
|
380
|
+
"type": "double",
|
381
|
+
"comment": "(source) audio data at the emitters; n=number of audio samples"
|
382
|
+
},
|
383
|
+
"Data.SamplingRate": {
|
384
|
+
"default": 44100,
|
385
|
+
"flags": "m",
|
386
|
+
"dimensions": "I",
|
387
|
+
"type": "double",
|
388
|
+
"comment": ""
|
389
|
+
},
|
390
|
+
"Data.SamplingRate:Units": {
|
391
|
+
"default": "hertz",
|
392
|
+
"flags": "m",
|
393
|
+
"dimensions": null,
|
394
|
+
"type": "attribute",
|
395
|
+
"comment": ""
|
396
|
+
}
|
397
|
+
}
|
@@ -7,6 +7,7 @@
|
|
7
7
|
"SingleRoomDRIR": "SingleRoomSRIR",
|
8
8
|
"SimpleFreeFieldDirectivityTF": "FreeFieldDirectivityTF",
|
9
9
|
"SimpleFreeFieldSOS": "SimpleFreeFieldHRSOS",
|
10
|
-
"SimpleFreeFieldTF": "SimpleFreeFieldHRTF"
|
10
|
+
"SimpleFreeFieldTF": "SimpleFreeFieldHRTF",
|
11
|
+
"SingleTrackedAudio": "AnnotatedEmitterAudio or AnnotatedReceiverAudio"
|
11
12
|
}
|
12
13
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"GLOBAL:DataType": {
|
3
3
|
"value": [
|
4
|
+
"Audio",
|
4
5
|
"FIR",
|
5
6
|
"FIR-E",
|
6
7
|
"FIRE",
|
@@ -9,6 +10,12 @@
|
|
9
10
|
"SOS"
|
10
11
|
],
|
11
12
|
"specific": {
|
13
|
+
"Audio": {
|
14
|
+
"Data.SamplingRate": null,
|
15
|
+
"Data.SamplingRate:Units": [
|
16
|
+
"hertz"
|
17
|
+
]
|
18
|
+
},
|
12
19
|
"FIR": {
|
13
20
|
"Data.IR": null,
|
14
21
|
"Data.Delay": null,
|
@@ -196,7 +203,10 @@
|
|
196
203
|
},
|
197
204
|
"GLOBAL:SOFAConventions": {
|
198
205
|
"value": [
|
199
|
-
"
|
206
|
+
"AnnotatedEmitterAudio",
|
207
|
+
"AnnotatedEmitterAudio",
|
208
|
+
"AnnotatedReceiverAudio",
|
209
|
+
"AnnotatedReceiverAudio",
|
200
210
|
"FreeFieldDirectivityTF",
|
201
211
|
"FreeFieldHRIR",
|
202
212
|
"FreeFieldHRTF",
|
@@ -213,6 +223,7 @@
|
|
213
223
|
"SimpleHeadphoneIR",
|
214
224
|
"SingleRoomMIMOSRIR",
|
215
225
|
"SingleRoomSRIR",
|
226
|
+
"FreeFieldDirectivityTF",
|
216
227
|
"GeneralFIRE",
|
217
228
|
"MultiSpeakerBRIR",
|
218
229
|
"SimpleFreeFieldHRIR",
|
@@ -221,9 +232,17 @@
|
|
221
232
|
"SimpleHeadphoneIR",
|
222
233
|
"SimpleHeadphoneIR",
|
223
234
|
"SingleRoomDRIR",
|
224
|
-
"SingleRoomDRIR"
|
235
|
+
"SingleRoomDRIR",
|
236
|
+
"SingleTrackedAudio",
|
237
|
+
"SingleTrackedAudio"
|
225
238
|
],
|
226
239
|
"specific": {
|
240
|
+
"AnnotatedEmitterAudio": {
|
241
|
+
"Data.Emitter": null
|
242
|
+
},
|
243
|
+
"AnnotatedReceiverAudio": {
|
244
|
+
"Data.Receiver": null
|
245
|
+
},
|
227
246
|
"GeneralFIR": {
|
228
247
|
"GLOBAL:DataType": [
|
229
248
|
"FIR"
|
@@ -1,4 +1,40 @@
|
|
1
1
|
{
|
2
|
+
"AnnotatedEmitterAudio": {
|
3
|
+
"from_to": [
|
4
|
+
[
|
5
|
+
[
|
6
|
+
"0.1"
|
7
|
+
],
|
8
|
+
[
|
9
|
+
"AnnotatedEmitterAudio_0.2"
|
10
|
+
],
|
11
|
+
"1"
|
12
|
+
]
|
13
|
+
],
|
14
|
+
"1": {
|
15
|
+
"move": {},
|
16
|
+
"remove": [],
|
17
|
+
"message": "The data in the variable 'Response' might have to be updated."
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"AnnotatedReceiverAudio": {
|
21
|
+
"from_to": [
|
22
|
+
[
|
23
|
+
[
|
24
|
+
"0.1"
|
25
|
+
],
|
26
|
+
[
|
27
|
+
"AnnotatedReceiverAudio_0.2"
|
28
|
+
],
|
29
|
+
"1"
|
30
|
+
]
|
31
|
+
],
|
32
|
+
"1": {
|
33
|
+
"move": {},
|
34
|
+
"remove": [],
|
35
|
+
"message": "The data in the variable 'Response' might have to be updated."
|
36
|
+
}
|
37
|
+
},
|
2
38
|
"FreeFieldDirectivityTF": {
|
3
39
|
"from_to": [
|
4
40
|
[
|