sofar 0.3.1__py2.py3-none-any.whl → 1.1.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 (79) hide show
  1. sofar/__init__.py +13 -7
  2. sofar/io.py +423 -0
  3. sofar/sofa.py +1795 -0
  4. sofar/sofa_conventions/VERSION +1 -0
  5. sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.csv +59 -0
  6. sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.json +444 -0
  7. sofar/{conventions/source → sofa_conventions/conventions}/FreeFieldHRIR_1.0.csv +3 -3
  8. sofar/{conventions → sofa_conventions/conventions}/FreeFieldHRIR_1.0.json +3 -3
  9. sofar/{conventions/source → sofa_conventions/conventions}/FreeFieldHRTF_1.0.csv +2 -2
  10. sofar/{conventions → sofa_conventions/conventions}/FreeFieldHRTF_1.0.json +3 -3
  11. sofar/{conventions/source → sofa_conventions/conventions}/GeneralFIR-E_2.0.csv +2 -2
  12. sofar/{conventions → sofa_conventions/conventions}/GeneralFIR-E_2.0.json +2 -2
  13. sofar/{conventions/source/GeneralFIR_2.0.csv → sofa_conventions/conventions/GeneralFIR_1.0.csv} +2 -2
  14. sofar/{conventions/GeneralFIR_2.0.json → sofa_conventions/conventions/GeneralFIR_1.0.json} +2 -2
  15. sofar/{conventions/source/GeneralFIR_1.0.csv → sofa_conventions/conventions/GeneralSOS_1.0.csv} +11 -11
  16. sofar/{conventions/GeneralFIR_1.0.json → sofa_conventions/conventions/GeneralSOS_1.0.json} +48 -37
  17. sofar/{conventions/source → sofa_conventions/conventions}/GeneralTF-E_1.0.csv +3 -3
  18. sofar/{conventions → sofa_conventions/conventions}/GeneralTF-E_1.0.json +4 -4
  19. sofar/{conventions/source → sofa_conventions/conventions}/GeneralTF_1.0.csv +1 -1
  20. sofar/{conventions → sofa_conventions/conventions}/GeneralTF_1.0.json +1 -1
  21. sofar/{conventions/source → sofa_conventions/conventions}/GeneralTF_2.0.csv +4 -4
  22. sofar/{conventions → sofa_conventions/conventions}/GeneralTF_2.0.json +4 -4
  23. sofar/sofa_conventions/conventions/SimpleFreeFieldHRIR_1.0.csv +47 -0
  24. sofar/{conventions → sofa_conventions/conventions}/SimpleFreeFieldHRIR_1.0.json +1 -1
  25. sofar/{conventions/source → sofa_conventions/conventions}/SimpleFreeFieldHRSOS_1.0.csv +1 -1
  26. sofar/{conventions → sofa_conventions/conventions}/SimpleFreeFieldHRSOS_1.0.json +1 -1
  27. sofar/{conventions/source/SimpleFreeFieldHRTF_2.0.csv → sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.csv} +3 -3
  28. sofar/{conventions/SimpleFreeFieldHRTF_2.0.json → sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.json} +4 -4
  29. sofar/{conventions/source → sofa_conventions/conventions}/SimpleHeadphoneIR_1.0.csv +9 -9
  30. sofar/sofa_conventions/conventions/SimpleHeadphoneIR_1.0.json +396 -0
  31. sofar/{conventions/source → sofa_conventions/conventions}/SingleRoomMIMOSRIR_1.0.csv +18 -8
  32. sofar/{conventions → sofa_conventions/conventions}/SingleRoomMIMOSRIR_1.0.json +124 -50
  33. sofar/{conventions/source → sofa_conventions/conventions}/SingleRoomSRIR_1.0.csv +18 -8
  34. sofar/{conventions → sofa_conventions/conventions}/SingleRoomSRIR_1.0.json +124 -50
  35. sofar/{conventions/source → sofa_conventions/conventions/deprecated}/FreeFieldDirectivityTF_1.0.csv +2 -2
  36. sofar/{conventions → sofa_conventions/conventions/deprecated}/FreeFieldDirectivityTF_1.0.json +2 -2
  37. sofar/sofa_conventions/conventions/deprecated/MultiSpeakerBRIR_0.3.csv +48 -0
  38. sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.csv +43 -0
  39. sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.json +333 -0
  40. sofar/{conventions/source/SimpleFreeFieldHRIR_1.0.csv → sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.csv} +15 -18
  41. sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.json +340 -0
  42. sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.csv +44 -0
  43. sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.json +340 -0
  44. sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.csv +51 -0
  45. sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.json +396 -0
  46. sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.csv +51 -0
  47. sofar/{conventions/SimpleHeadphoneIR_1.0.json → sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.json} +3 -3
  48. sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.csv +47 -0
  49. sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.json +360 -0
  50. sofar/sofa_conventions/rules/deprecations.json +12 -0
  51. sofar/sofa_conventions/rules/rules.json +800 -0
  52. sofar/sofa_conventions/rules/unit_aliases.json +11 -0
  53. sofar/sofa_conventions/rules/upgrade.json +190 -0
  54. sofar/update_conventions.py +427 -0
  55. sofar/utils.py +315 -0
  56. {sofar-0.3.1.dist-info → sofar-1.1.0.dist-info}/AUTHORS.rst +1 -0
  57. sofar-1.1.0.dist-info/METADATA +89 -0
  58. sofar-1.1.0.dist-info/RECORD +75 -0
  59. {sofar-0.3.1.dist-info → sofar-1.1.0.dist-info}/WHEEL +1 -1
  60. {sofar-0.3.1.dist-info → sofar-1.1.0.dist-info}/top_level.txt +1 -0
  61. tests/__init__.py +0 -0
  62. tests/test_deprecations.py +19 -0
  63. tests/test_io.py +344 -0
  64. tests/test_sofa.py +354 -0
  65. tests/test_sofa_upgrade_conventions.py +102 -0
  66. tests/test_sofa_verify.py +472 -0
  67. tests/test_utils.py +241 -0
  68. sofar/conventions/source/MultiSpeakerBRIR_0.3.csv +0 -48
  69. sofar/sofar.py +0 -2531
  70. sofar-0.3.1.dist-info/METADATA +0 -69
  71. sofar-0.3.1.dist-info/RECORD +0 -46
  72. /sofar/{conventions/source → sofa_conventions/conventions}/SimpleFreeFieldSOS_1.0.csv +0 -0
  73. /sofar/{conventions → sofa_conventions/conventions}/SimpleFreeFieldSOS_1.0.json +0 -0
  74. /sofar/{conventions/source → sofa_conventions/conventions/deprecated}/GeneralFIRE_1.0.csv +0 -0
  75. /sofar/{conventions → sofa_conventions/conventions/deprecated}/GeneralFIRE_1.0.json +0 -0
  76. /sofar/{conventions → sofa_conventions/conventions/deprecated}/MultiSpeakerBRIR_0.3.json +0 -0
  77. /sofar/{conventions/source → sofa_conventions/conventions/deprecated}/SingleRoomDRIR_0.3.csv +0 -0
  78. /sofar/{conventions → sofa_conventions/conventions/deprecated}/SingleRoomDRIR_0.3.json +0 -0
  79. {sofar-0.3.1.dist-info → sofar-1.1.0.dist-info}/LICENSE +0 -0
@@ -0,0 +1,333 @@
1
+ {
2
+ "GLOBAL:Conventions": {
3
+ "default": "SOFA",
4
+ "flags": "rm",
5
+ "dimensions": null,
6
+ "type": "attribute",
7
+ "comment": ""
8
+ },
9
+ "GLOBAL:Version": {
10
+ "default": "1.0",
11
+ "flags": "rm",
12
+ "dimensions": null,
13
+ "type": "attribute",
14
+ "comment": ""
15
+ },
16
+ "GLOBAL:SOFAConventions": {
17
+ "default": "SimpleFreeFieldHRIR",
18
+ "flags": "rm",
19
+ "dimensions": null,
20
+ "type": "attribute",
21
+ "comment": "This convention set is for HRIRs recorded under free-field conditions or other IRs created under conditions where room information is irrelevant"
22
+ },
23
+ "GLOBAL:SOFAConventionsVersion": {
24
+ "default": "0.4",
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
+ "GLOBAL:DatabaseName": {
143
+ "default": "",
144
+ "flags": "m",
145
+ "dimensions": null,
146
+ "type": "attribute",
147
+ "comment": "name of the database to which these data belong"
148
+ },
149
+ "GLOBAL:ListenerShortName": {
150
+ "default": "",
151
+ "flags": "m",
152
+ "dimensions": null,
153
+ "type": "attribute",
154
+ "comment": "ID of the subject from the database"
155
+ },
156
+ "ListenerPosition": {
157
+ "default": [
158
+ 0,
159
+ 0,
160
+ 0
161
+ ],
162
+ "flags": "m",
163
+ "dimensions": "IC, MC",
164
+ "type": "double",
165
+ "comment": ""
166
+ },
167
+ "ListenerPosition:Type": {
168
+ "default": "cartesian",
169
+ "flags": "m",
170
+ "dimensions": null,
171
+ "type": "attribute",
172
+ "comment": ""
173
+ },
174
+ "ListenerPosition:Units": {
175
+ "default": "meter",
176
+ "flags": "m",
177
+ "dimensions": null,
178
+ "type": "attribute",
179
+ "comment": ""
180
+ },
181
+ "ReceiverPosition": {
182
+ "default": [
183
+ [
184
+ 0,
185
+ 0.09,
186
+ 0
187
+ ],
188
+ [
189
+ 0,
190
+ -0.09,
191
+ 0
192
+ ]
193
+ ],
194
+ "flags": "m",
195
+ "dimensions": "rCI, rCM",
196
+ "type": "double",
197
+ "comment": ""
198
+ },
199
+ "ReceiverPosition:Type": {
200
+ "default": "cartesian",
201
+ "flags": "m",
202
+ "dimensions": null,
203
+ "type": "attribute",
204
+ "comment": ""
205
+ },
206
+ "ReceiverPosition:Units": {
207
+ "default": "meter",
208
+ "flags": "m",
209
+ "dimensions": null,
210
+ "type": "attribute",
211
+ "comment": ""
212
+ },
213
+ "SourcePosition": {
214
+ "default": [
215
+ 0,
216
+ 0,
217
+ 1
218
+ ],
219
+ "flags": "m",
220
+ "dimensions": "IC, MC",
221
+ "type": "double",
222
+ "comment": "Source position is assumed to vary for different directions/positions around the listener"
223
+ },
224
+ "SourcePosition:Type": {
225
+ "default": "spherical",
226
+ "flags": "m",
227
+ "dimensions": null,
228
+ "type": "attribute",
229
+ "comment": ""
230
+ },
231
+ "SourcePosition:Units": {
232
+ "default": "degree, degree, meter",
233
+ "flags": "m",
234
+ "dimensions": null,
235
+ "type": "attribute",
236
+ "comment": ""
237
+ },
238
+ "EmitterPosition": {
239
+ "default": [
240
+ 0,
241
+ 0,
242
+ 0
243
+ ],
244
+ "flags": "m",
245
+ "dimensions": "eCI, eCM",
246
+ "type": "double",
247
+ "comment": ""
248
+ },
249
+ "EmitterPosition:Type": {
250
+ "default": "cartesian",
251
+ "flags": "m",
252
+ "dimensions": null,
253
+ "type": "attribute",
254
+ "comment": ""
255
+ },
256
+ "EmitterPosition:Units": {
257
+ "default": "meter",
258
+ "flags": "m",
259
+ "dimensions": null,
260
+ "type": "attribute",
261
+ "comment": ""
262
+ },
263
+ "ListenerUp": {
264
+ "default": [
265
+ 0,
266
+ 0,
267
+ 1
268
+ ],
269
+ "flags": "m",
270
+ "dimensions": "IC, MC",
271
+ "type": "double",
272
+ "comment": ""
273
+ },
274
+ "ListenerView": {
275
+ "default": [
276
+ 1,
277
+ 0,
278
+ 0
279
+ ],
280
+ "flags": "m",
281
+ "dimensions": "IC, MC",
282
+ "type": "double",
283
+ "comment": ""
284
+ },
285
+ "ListenerView:Type": {
286
+ "default": "cartesian",
287
+ "flags": "m",
288
+ "dimensions": null,
289
+ "type": "attribute",
290
+ "comment": ""
291
+ },
292
+ "ListenerView:Units": {
293
+ "default": "meter",
294
+ "flags": "m",
295
+ "dimensions": null,
296
+ "type": "attribute",
297
+ "comment": ""
298
+ },
299
+ "Data.IR": {
300
+ "default": [
301
+ 1,
302
+ 1
303
+ ],
304
+ "flags": "m",
305
+ "dimensions": "mRn",
306
+ "type": "double",
307
+ "comment": ""
308
+ },
309
+ "Data.SamplingRate": {
310
+ "default": 48000,
311
+ "flags": "m",
312
+ "dimensions": "I",
313
+ "type": "double",
314
+ "comment": ""
315
+ },
316
+ "Data.SamplingRate:Units": {
317
+ "default": "hertz",
318
+ "flags": "m",
319
+ "dimensions": null,
320
+ "type": "attribute",
321
+ "comment": ""
322
+ },
323
+ "Data.Delay": {
324
+ "default": [
325
+ 0,
326
+ 0
327
+ ],
328
+ "flags": "m",
329
+ "dimensions": "IR, MR",
330
+ "type": "double",
331
+ "comment": ""
332
+ }
333
+ }
@@ -1,17 +1,18 @@
1
1
  Name Default Flags Dimensions Type Comment
2
2
  GLOBAL:Conventions SOFA rm attribute
3
- GLOBAL:Version 2.0 rm attribute
4
- GLOBAL:SOFAConventions SimpleFreeFieldHRIR rm attribute This convention set is for HRIRs recorded under free-field conditions or other IRs created under conditions where room information is irrelevant
5
- GLOBAL:SOFAConventionsVersion 1.0 rm attribute
3
+ GLOBAL:Version 1.0 rm attribute
4
+ GLOBAL:SOFAConventions SimpleFreeFieldTF rm attribute This conventions is for TFs created under conditions where room information is irrelevant
5
+ GLOBAL:SOFAConventionsVersion 0.4 rm attribute
6
6
  GLOBAL:APIName rm attribute
7
7
  GLOBAL:APIVersion rm attribute
8
8
  GLOBAL:ApplicationName attribute
9
9
  GLOBAL:ApplicationVersion attribute
10
10
  GLOBAL:AuthorContact m attribute
11
11
  GLOBAL:Comment attribute
12
- GLOBAL:DataType FIR rm attribute
12
+ GLOBAL:DataType TF rm attribute
13
13
  GLOBAL:History attribute
14
14
  GLOBAL:License No license provided, ask the author for permission m attribute
15
+ GLOBAL:ListenerShortName m attribute ID of the subject from the database
15
16
  GLOBAL:Organization m attribute
16
17
  GLOBAL:References attribute
17
18
  GLOBAL:RoomType free field m attribute
@@ -21,27 +22,23 @@ GLOBAL:DateModified m attribute
21
22
  GLOBAL:Title m attribute
22
23
  ListenerPosition [0 0 0] m IC, MC double
23
24
  ListenerPosition:Type cartesian m attribute
24
- ListenerPosition:Units metre m attribute
25
+ ListenerPosition:Units meter m attribute
25
26
  ReceiverPosition [0 0.09 0; 0 -0.09 0] m rCI, rCM double
26
27
  ReceiverPosition:Type cartesian m attribute
27
- ReceiverPosition:Units metre m attribute
28
+ ReceiverPosition:Units meter m attribute
28
29
  SourcePosition [0 0 1] m IC, MC double Source position is assumed to vary for different directions/positions around the listener
29
30
  SourcePosition:Type spherical m attribute
30
- SourcePosition:Units degree, degree, metre m attribute
31
+ SourcePosition:Units degree, degree, meter m attribute
31
32
  EmitterPosition [0 0 0] m eCI, eCM double
32
33
  EmitterPosition:Type cartesian m attribute
33
- EmitterPosition:Units metre m attribute
34
+ EmitterPosition:Units meter m attribute
34
35
  GLOBAL:DatabaseName m attribute name of the database to which these data belong
35
- GLOBAL:ListenerShortName m attribute ID of the subject from the database
36
36
  ListenerUp [0 0 1] m IC, MC double
37
37
  ListenerView [1 0 0] m IC, MC double
38
38
  ListenerView:Type cartesian m attribute
39
- ListenerView:Units metre m attribute
40
- Data.IR [0 0] m mRn double
41
- Data.SamplingRate 48000 m I, M double
42
- Data.SamplingRate:Units hertz m attribute
43
- Data.Delay [0 0] m IR, MR double
44
- SourceUp [0 0 1] IC, MC double
45
- SourceView [1 0 0] IC, MC double
46
- SourceView:Type cartesian attribute
47
- SourceView:Units metre attribute
39
+ ListenerView:Units meter m attribute
40
+ Data.Real [1 1] m mRn double
41
+ Data.Imag [0 0] m MRN double
42
+ N 0 m N double
43
+ N:LongName frequency attribute
44
+ N:Units hertz attribute