casacure 0.2.0__tar.gz
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.
- casacure-0.2.0/Cargo.lock +364 -0
- casacure-0.2.0/Cargo.toml +17 -0
- casacure-0.2.0/PKG-INFO +208 -0
- casacure-0.2.0/README.md +175 -0
- casacure-0.2.0/crates/casacure/Cargo.toml +17 -0
- casacure-0.2.0/crates/casacure/README.md +115 -0
- casacure-0.2.0/crates/casacure/examples/boolread.rs +14 -0
- casacure-0.2.0/crates/casacure/examples/cellref_probe.rs +46 -0
- casacure-0.2.0/crates/casacure/examples/create_sample_table.rs +152 -0
- casacure-0.2.0/crates/casacure/examples/default_ms.rs +7 -0
- casacure-0.2.0/crates/casacure/examples/dump_kw.rs +8 -0
- casacure-0.2.0/crates/casacure/examples/dump_tsm.rs +105 -0
- casacure-0.2.0/crates/casacure/src/aipsio.rs +499 -0
- casacure-0.2.0/crates/casacure/src/columnset.rs +604 -0
- casacure-0.2.0/crates/casacure/src/ism.rs +649 -0
- casacure-0.2.0/crates/casacure/src/lib.rs +39 -0
- casacure-0.2.0/crates/casacure/src/ms.rs +304 -0
- casacure-0.2.0/crates/casacure/src/ms_schema.rs +189 -0
- casacure-0.2.0/crates/casacure/src/record.rs +1584 -0
- casacure-0.2.0/crates/casacure/src/ssm.rs +1837 -0
- casacure-0.2.0/crates/casacure/src/table.rs +2935 -0
- casacure-0.2.0/crates/casacure/src/tabledesc.rs +515 -0
- casacure-0.2.0/crates/casacure/src/taql.rs +2111 -0
- casacure-0.2.0/crates/casacure/src/tsm.rs +500 -0
- casacure-0.2.0/crates/casacure/src/types.rs +250 -0
- casacure-0.2.0/crates/casacure/tests/compat_fixtures.rs +860 -0
- casacure-0.2.0/crates/casacure-python/Cargo.toml +20 -0
- casacure-0.2.0/crates/casacure-python/src/convert.rs +1047 -0
- casacure-0.2.0/crates/casacure-python/src/lib.rs +275 -0
- casacure-0.2.0/crates/casacure-python/src/table.rs +1883 -0
- casacure-0.2.0/pyproject.toml +54 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "casacure"
|
|
13
|
+
version = "0.2.0"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"serde",
|
|
16
|
+
"serde_json",
|
|
17
|
+
"thiserror",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "casacure-python"
|
|
22
|
+
version = "0.2.0"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"casacure",
|
|
25
|
+
"numpy",
|
|
26
|
+
"pyo3",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "heck"
|
|
31
|
+
version = "0.5.0"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "indoc"
|
|
37
|
+
version = "2.0.7"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
40
|
+
dependencies = [
|
|
41
|
+
"rustversion",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "itoa"
|
|
46
|
+
version = "1.0.18"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
49
|
+
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "libc"
|
|
52
|
+
version = "0.2.189"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "matrixmultiply"
|
|
58
|
+
version = "0.3.11"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
|
|
61
|
+
dependencies = [
|
|
62
|
+
"autocfg",
|
|
63
|
+
"rawpointer",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[[package]]
|
|
67
|
+
name = "memchr"
|
|
68
|
+
version = "2.8.3"
|
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
+
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
71
|
+
|
|
72
|
+
[[package]]
|
|
73
|
+
name = "memoffset"
|
|
74
|
+
version = "0.9.1"
|
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
77
|
+
dependencies = [
|
|
78
|
+
"autocfg",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[[package]]
|
|
82
|
+
name = "ndarray"
|
|
83
|
+
version = "0.16.1"
|
|
84
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
+
checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
|
|
86
|
+
dependencies = [
|
|
87
|
+
"matrixmultiply",
|
|
88
|
+
"num-complex",
|
|
89
|
+
"num-integer",
|
|
90
|
+
"num-traits",
|
|
91
|
+
"portable-atomic",
|
|
92
|
+
"portable-atomic-util",
|
|
93
|
+
"rawpointer",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[[package]]
|
|
97
|
+
name = "num-complex"
|
|
98
|
+
version = "0.4.6"
|
|
99
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
101
|
+
dependencies = [
|
|
102
|
+
"num-traits",
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
[[package]]
|
|
106
|
+
name = "num-integer"
|
|
107
|
+
version = "0.1.47"
|
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
110
|
+
dependencies = [
|
|
111
|
+
"num-traits",
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
[[package]]
|
|
115
|
+
name = "num-traits"
|
|
116
|
+
version = "0.2.19"
|
|
117
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
119
|
+
dependencies = [
|
|
120
|
+
"autocfg",
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
[[package]]
|
|
124
|
+
name = "numpy"
|
|
125
|
+
version = "0.27.1"
|
|
126
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
127
|
+
checksum = "7aac2e6a6e4468ffa092ad43c39b81c79196c2bb773b8db4085f695efe3bba17"
|
|
128
|
+
dependencies = [
|
|
129
|
+
"libc",
|
|
130
|
+
"ndarray",
|
|
131
|
+
"num-complex",
|
|
132
|
+
"num-integer",
|
|
133
|
+
"num-traits",
|
|
134
|
+
"pyo3",
|
|
135
|
+
"pyo3-build-config",
|
|
136
|
+
"rustc-hash",
|
|
137
|
+
]
|
|
138
|
+
|
|
139
|
+
[[package]]
|
|
140
|
+
name = "once_cell"
|
|
141
|
+
version = "1.21.4"
|
|
142
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
144
|
+
|
|
145
|
+
[[package]]
|
|
146
|
+
name = "portable-atomic"
|
|
147
|
+
version = "1.15.0"
|
|
148
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
149
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
150
|
+
|
|
151
|
+
[[package]]
|
|
152
|
+
name = "portable-atomic-util"
|
|
153
|
+
version = "0.2.8"
|
|
154
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
155
|
+
checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
|
|
156
|
+
dependencies = [
|
|
157
|
+
"portable-atomic",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "proc-macro2"
|
|
162
|
+
version = "1.0.107"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
165
|
+
dependencies = [
|
|
166
|
+
"unicode-ident",
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
[[package]]
|
|
170
|
+
name = "pyo3"
|
|
171
|
+
version = "0.27.2"
|
|
172
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
+
checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
|
|
174
|
+
dependencies = [
|
|
175
|
+
"indoc",
|
|
176
|
+
"libc",
|
|
177
|
+
"memoffset",
|
|
178
|
+
"once_cell",
|
|
179
|
+
"portable-atomic",
|
|
180
|
+
"pyo3-build-config",
|
|
181
|
+
"pyo3-ffi",
|
|
182
|
+
"pyo3-macros",
|
|
183
|
+
"unindent",
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
[[package]]
|
|
187
|
+
name = "pyo3-build-config"
|
|
188
|
+
version = "0.27.2"
|
|
189
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
190
|
+
checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
|
|
191
|
+
dependencies = [
|
|
192
|
+
"target-lexicon",
|
|
193
|
+
]
|
|
194
|
+
|
|
195
|
+
[[package]]
|
|
196
|
+
name = "pyo3-ffi"
|
|
197
|
+
version = "0.27.2"
|
|
198
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
+
checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
|
|
200
|
+
dependencies = [
|
|
201
|
+
"libc",
|
|
202
|
+
"pyo3-build-config",
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
[[package]]
|
|
206
|
+
name = "pyo3-macros"
|
|
207
|
+
version = "0.27.2"
|
|
208
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
209
|
+
checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
|
|
210
|
+
dependencies = [
|
|
211
|
+
"proc-macro2",
|
|
212
|
+
"pyo3-macros-backend",
|
|
213
|
+
"quote",
|
|
214
|
+
"syn 2.0.119",
|
|
215
|
+
]
|
|
216
|
+
|
|
217
|
+
[[package]]
|
|
218
|
+
name = "pyo3-macros-backend"
|
|
219
|
+
version = "0.27.2"
|
|
220
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
221
|
+
checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
|
|
222
|
+
dependencies = [
|
|
223
|
+
"heck",
|
|
224
|
+
"proc-macro2",
|
|
225
|
+
"pyo3-build-config",
|
|
226
|
+
"quote",
|
|
227
|
+
"syn 2.0.119",
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
[[package]]
|
|
231
|
+
name = "quote"
|
|
232
|
+
version = "1.0.47"
|
|
233
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
235
|
+
dependencies = [
|
|
236
|
+
"proc-macro2",
|
|
237
|
+
]
|
|
238
|
+
|
|
239
|
+
[[package]]
|
|
240
|
+
name = "rawpointer"
|
|
241
|
+
version = "0.2.1"
|
|
242
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
244
|
+
|
|
245
|
+
[[package]]
|
|
246
|
+
name = "rustc-hash"
|
|
247
|
+
version = "2.1.3"
|
|
248
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
249
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
250
|
+
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "rustversion"
|
|
253
|
+
version = "1.0.23"
|
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
+
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "serde"
|
|
259
|
+
version = "1.0.229"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
262
|
+
dependencies = [
|
|
263
|
+
"serde_core",
|
|
264
|
+
"serde_derive",
|
|
265
|
+
]
|
|
266
|
+
|
|
267
|
+
[[package]]
|
|
268
|
+
name = "serde_core"
|
|
269
|
+
version = "1.0.229"
|
|
270
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
272
|
+
dependencies = [
|
|
273
|
+
"serde_derive",
|
|
274
|
+
]
|
|
275
|
+
|
|
276
|
+
[[package]]
|
|
277
|
+
name = "serde_derive"
|
|
278
|
+
version = "1.0.229"
|
|
279
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
280
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
281
|
+
dependencies = [
|
|
282
|
+
"proc-macro2",
|
|
283
|
+
"quote",
|
|
284
|
+
"syn 3.0.6",
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
[[package]]
|
|
288
|
+
name = "serde_json"
|
|
289
|
+
version = "1.0.151"
|
|
290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
292
|
+
dependencies = [
|
|
293
|
+
"itoa",
|
|
294
|
+
"memchr",
|
|
295
|
+
"serde",
|
|
296
|
+
"serde_core",
|
|
297
|
+
"zmij",
|
|
298
|
+
]
|
|
299
|
+
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "syn"
|
|
302
|
+
version = "2.0.119"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
305
|
+
dependencies = [
|
|
306
|
+
"proc-macro2",
|
|
307
|
+
"quote",
|
|
308
|
+
"unicode-ident",
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
[[package]]
|
|
312
|
+
name = "syn"
|
|
313
|
+
version = "3.0.6"
|
|
314
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
+
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
|
|
316
|
+
dependencies = [
|
|
317
|
+
"proc-macro2",
|
|
318
|
+
"quote",
|
|
319
|
+
"unicode-ident",
|
|
320
|
+
]
|
|
321
|
+
|
|
322
|
+
[[package]]
|
|
323
|
+
name = "target-lexicon"
|
|
324
|
+
version = "0.13.5"
|
|
325
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
326
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
327
|
+
|
|
328
|
+
[[package]]
|
|
329
|
+
name = "thiserror"
|
|
330
|
+
version = "2.0.20"
|
|
331
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
332
|
+
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
333
|
+
dependencies = [
|
|
334
|
+
"thiserror-impl",
|
|
335
|
+
]
|
|
336
|
+
|
|
337
|
+
[[package]]
|
|
338
|
+
name = "thiserror-impl"
|
|
339
|
+
version = "2.0.20"
|
|
340
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
341
|
+
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
342
|
+
dependencies = [
|
|
343
|
+
"proc-macro2",
|
|
344
|
+
"quote",
|
|
345
|
+
"syn 3.0.6",
|
|
346
|
+
]
|
|
347
|
+
|
|
348
|
+
[[package]]
|
|
349
|
+
name = "unicode-ident"
|
|
350
|
+
version = "1.0.26"
|
|
351
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
352
|
+
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
|
353
|
+
|
|
354
|
+
[[package]]
|
|
355
|
+
name = "unindent"
|
|
356
|
+
version = "0.2.4"
|
|
357
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
358
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
359
|
+
|
|
360
|
+
[[package]]
|
|
361
|
+
name = "zmij"
|
|
362
|
+
version = "1.0.23"
|
|
363
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
364
|
+
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "2"
|
|
3
|
+
members = ["crates/casacure", "crates/casacure-python"]
|
|
4
|
+
|
|
5
|
+
[workspace.dependencies]
|
|
6
|
+
casacure = { path = "crates/casacure", version = "0.2.0" }
|
|
7
|
+
|
|
8
|
+
[workspace.package]
|
|
9
|
+
version = "0.2.0"
|
|
10
|
+
authors = ["Tim Molteno <tim@elec.ac.nz>"]
|
|
11
|
+
edition = "2021"
|
|
12
|
+
license = "LGPL-3.0-or-later"
|
|
13
|
+
repository = "https://github.com/tmolteno/casacure"
|
|
14
|
+
description = "A Rust replacement for the casacore table system, with Python bindings"
|
|
15
|
+
|
|
16
|
+
[profile.release]
|
|
17
|
+
lto = true
|
casacure-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: casacure
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Science/Research
|
|
6
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
|
|
7
|
+
Classifier: Operating System :: MacOS
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
|
+
Classifier: Programming Language :: Rust
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
22
|
+
Summary: A Rust replacement for the casacore table system, pip installable on any machine
|
|
23
|
+
Keywords: casacore,measurement-set,radio-astronomy,CASA,AIPS,taql,fits,scientific-data
|
|
24
|
+
Author-email: Tim Molteno <tim@elec.ac.nz>
|
|
25
|
+
License-Expression: LGPL-3.0-or-later
|
|
26
|
+
Requires-Python: >=3.9, <3.15
|
|
27
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
28
|
+
Project-URL: Changelog, https://github.com/tmolteno/casacure/blob/main/CHANGELOG.md
|
|
29
|
+
Project-URL: Homepage, https://github.com/tmolteno/casacure
|
|
30
|
+
Project-URL: Issues, https://github.com/tmolteno/casacure/issues
|
|
31
|
+
Project-URL: Repository, https://github.com/tmolteno/casacure
|
|
32
|
+
|
|
33
|
+
# casacure and python-casacure
|
|
34
|
+
|
|
35
|
+
[](https://crates.io/crates/casacure)
|
|
36
|
+
[](https://crates.io/crates/casacure)
|
|
37
|
+
[](https://pypi.org/project/casacure/)
|
|
38
|
+
[](https://pypi.org/project/casacure/)
|
|
39
|
+
|
|
40
|
+
This repository contains two user-facing packages that share one engine — a
|
|
41
|
+
pure-Rust implementation of the CASA table system that reads and writes real
|
|
42
|
+
casacore Measurement Sets and tables without needing the C++ casacore library:
|
|
43
|
+
|
|
44
|
+
| Package | Kind | Install | Entry point |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| **casacure** | Rust crate | `cargo add casacure` (crates.io) | `use casacure;` |
|
|
47
|
+
| **python-casacure** | Python package | `pip install casacure` (PyPI) | `import casacure.tables` |
|
|
48
|
+
|
|
49
|
+
"python-casacure" is the name of the Python package. Its published PyPI name
|
|
50
|
+
stays **`casacure`** (module `casacure.tables`) — the Python package is
|
|
51
|
+
**not** renamed. The Python package is built from the internal
|
|
52
|
+
`crates/casacure-python` crate, which is not published to crates.io and is
|
|
53
|
+
not intended for direct use.
|
|
54
|
+
|
|
55
|
+
Both packages expose the same capabilities — the `StandardStMan`,
|
|
56
|
+
`IncrementalStMan` and `TiledColumnStMan` on-disk formats, table metadata,
|
|
57
|
+
keywords and subtable linkage, and a TaQL subset — without building or linking
|
|
58
|
+
the C++ casacore library. Install is fast (a wheel or the crate), there is no
|
|
59
|
+
multi-hour C++ dependency build, and it works everywhere a Rust `cdylib` can
|
|
60
|
+
be built, including ARM (`aarch64`).
|
|
61
|
+
|
|
62
|
+
The Python binding's **`casacure.tables`** is an interface-compatible
|
|
63
|
+
replacement for `casacore.tables`, so existing tooling — most notably
|
|
64
|
+
**dask-ms** — can run on casacure unchanged (CPython 3.9–3.14; wheels for
|
|
65
|
+
Linux, macOS and Windows).
|
|
66
|
+
|
|
67
|
+
| | |
|
|
68
|
+
|---|---|
|
|
69
|
+
| On-disk formats | StandardStMan, IncrementalStMan, TiledColumnStMan — read and write |
|
|
70
|
+
| Table surface | columns (scalar / fixed / variable-shape arrays, strings, records), keywords, dminfo, subtable linkage (`::SUBTABLE`) |
|
|
71
|
+
| TaQL | `SELECT` (WHERE / ORDERBY / GROUPBY / UNIQUE) and `CREATE TABLE` |
|
|
72
|
+
| Measurement Sets | full MS + 17 standard subtable schemas, `default_ms`, writable in place |
|
|
73
|
+
| Interop | tables written by casacure open in real casacore and vice-versa |
|
|
74
|
+
|
|
75
|
+
Status is tracked in [ARE_WE_CURED.md](ARE_WE_CURED.md); the outline is in
|
|
76
|
+
[CASACORE_TO_CASA_RS.md](CASACORE_TO_CASA_RS.md).
|
|
77
|
+
|
|
78
|
+
## Using casacure in place of casacore
|
|
79
|
+
|
|
80
|
+
casacure provides a python-casacore-compatible surface. The whole dask-ms 0.2.32
|
|
81
|
+
test suite passes against it (219/219 on both Python 3.13 and 3.14), including
|
|
82
|
+
reading, writing and updating real Measurement Sets.
|
|
83
|
+
|
|
84
|
+
### Direct API
|
|
85
|
+
|
|
86
|
+
`casacure.tables` mirrors `casacore.tables`:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
import numpy as np
|
|
90
|
+
import casacure.tables as ct # drop-in for `import casacore.tables`
|
|
91
|
+
|
|
92
|
+
t = ct.table("test.tab",
|
|
93
|
+
{"TIME": {"valueType": "double", "option": 0, "comment": "",
|
|
94
|
+
"keywords": {}},
|
|
95
|
+
"DATA": {"valueType": "dcomplex", "option": 0, "comment": "",
|
|
96
|
+
"ndim": 2, "shape": [8, 4], "keywords": {}}},
|
|
97
|
+
nrow=3)
|
|
98
|
+
t.putcol("TIME", np.array([0.0, 1.5, 3.0]))
|
|
99
|
+
t.putcol("DATA", np.random.rand(3, 8, 4).astype(np.complex128))
|
|
100
|
+
t.flush()
|
|
101
|
+
|
|
102
|
+
r = ct.table("test.tab", ack=False) # read-only view
|
|
103
|
+
print(r.getcol("DATA").shape) # (3, 8, 4)
|
|
104
|
+
|
|
105
|
+
q = ct.taql("SELECT * FROM $1 WHERE TIME > 1.0", tables=[r])
|
|
106
|
+
print(q.getcol("TIME"))
|
|
107
|
+
|
|
108
|
+
ms = ct.default_ms("observation.ms") # full MS + 17 subtables
|
|
109
|
+
```
|
|
110
|
+
Also available: `taql` `CREATE TABLE`, `getcell`/`putcell`, `getvarcol`/
|
|
111
|
+
`putvarcol`, `getcolslice`/`putcolslice`, `getkeywords`/`putkeywords`,
|
|
112
|
+
`addcols`, `addrows`, `required_ms_desc`/`complete_ms_desc`,
|
|
113
|
+
`default_ms_subtable`, `tablefromascii`.
|
|
114
|
+
|
|
115
|
+
### Driving dask-ms on casacure
|
|
116
|
+
|
|
117
|
+
dask-ms imports `casacore.tables`; point it at casacure in one of two ways:
|
|
118
|
+
|
|
119
|
+
**1. A drop-in `casacore` shim** — a two-file package that re-exports
|
|
120
|
+
casacure, placed on `PYTHONPATH` ahead of any real python-casacore (this is
|
|
121
|
+
exactly what the project's own `tests/daskms_smoke.py` runs):
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
casacore/__init__.py # (empty)
|
|
125
|
+
casacore/tables.py # from casacure.tables import *
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**2. Backend selection** (the cleaner upstream path) — an env-gated
|
|
129
|
+
`DASK_MS_BACKEND=casacure` that aliases `casacore.tables` → `casacure.tables`
|
|
130
|
+
in-process. It is a ~10-line `sys.modules` swap in dask-ms's `__init__`,
|
|
131
|
+
validated against the full dask-ms suite; it is the prototype for the upstream
|
|
132
|
+
store-dispatch change.
|
|
133
|
+
|
|
134
|
+
Either way, the dask-ms workflow is unchanged:
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
import dask
|
|
138
|
+
import dask.array as da
|
|
139
|
+
import numpy as np
|
|
140
|
+
import xarray as xr
|
|
141
|
+
from daskms import xds_from_ms, xds_to_table
|
|
142
|
+
import casacure.tables as ct
|
|
143
|
+
|
|
144
|
+
n = 4
|
|
145
|
+
data = (np.random.rand(n, 8, 4) + 1j * np.random.rand(n, 8, 4)).astype(np.complex64)
|
|
146
|
+
ds = xr.Dataset({
|
|
147
|
+
"TIME": (("row",), da.from_array(np.array([0.0, 1.0, 2.0, 3.0]), chunks=n)),
|
|
148
|
+
"ANTENNA1": (("row",), da.from_array(np.array([0, 1, 0, 1], dtype=np.int32), chunks=n)),
|
|
149
|
+
"DATA": (("row", "chan", "corr"), da.from_array(data, chunks=(n, 8, 4))),
|
|
150
|
+
}, coords={"row": np.arange(n)})
|
|
151
|
+
|
|
152
|
+
# Create a Measurement Set from datasets (partitioned, chunked writes).
|
|
153
|
+
dask.compute(xds_to_table(ds, "example.ms", descriptor="ms"))
|
|
154
|
+
|
|
155
|
+
# Read it back as lazily-chunked dask arrays.
|
|
156
|
+
xds = xds_from_ms("example.ms", columns=["TIME", "ANTENNA1", "DATA"])[0]
|
|
157
|
+
|
|
158
|
+
# Modify in xarray and write back in place.
|
|
159
|
+
xds2 = xds.assign(DATA=(xds.DATA.dims, xds.DATA.data * 2))
|
|
160
|
+
dask.compute(xds_to_table(xds2, "example.ms", ["DATA"]))
|
|
161
|
+
|
|
162
|
+
# The result is a real MS: open it with casacure (or real casacore).
|
|
163
|
+
t = ct.table("example.ms", ack=False)
|
|
164
|
+
print(t.getcol("DATA")[0, 0, :2]) # doubled visibilities
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Because casacure is implemented in Rust, none of this needs a C++ toolchain:
|
|
168
|
+
the entire dependency stack for reading and writing Measurement Sets is the
|
|
169
|
+
published wheel.
|
|
170
|
+
|
|
171
|
+
## Install
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
pip install casacure # prebuilt wheels once published
|
|
175
|
+
# or build from source:
|
|
176
|
+
pip install . # maturin builds the cdylib for your interpreter
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The Rust core is published to crates.io as the `casacure` crate; add
|
|
180
|
+
`casacure = "0.2"` to `Cargo.toml` if you want the table engine in Rust
|
|
181
|
+
directly.
|
|
182
|
+
|
|
183
|
+
`pip install casacure` on Python 3.9–3.14 installs a self-contained package —
|
|
184
|
+
no `casacore` C++ library, no `wcs/measures` harness — which is the point: MS
|
|
185
|
+
support on machines (including `aarch64`) where casacore is painful to build.
|
|
186
|
+
|
|
187
|
+
## Development
|
|
188
|
+
|
|
189
|
+
* [TODO.md](TODO.md) — the live task list; [CHANGELOG.md](CHANGELOG.md) records
|
|
190
|
+
completed steps.
|
|
191
|
+
* [ARE_WE_CURED.md](ARE_WE_CURED.md) — progress / test counts.
|
|
192
|
+
* [CASACORE_TO_CASA_RS.md](CASACORE_TO_CASA_RS.md) — the implementation
|
|
193
|
+
outline (the upstream `casacore/` submodule is the reference C++ source and
|
|
194
|
+
is never modified).
|
|
195
|
+
* `tests/daskms_smoke.py` — end-to-end dask-ms MS create/read/write smoke;
|
|
196
|
+
`tests/test_types_compat.py` — type-system comparison vs real casacore.
|
|
197
|
+
|
|
198
|
+
Rust work is linted with clippy and rustfmt as we go — CI runs these as gates
|
|
199
|
+
(`.github/workflows/ci.yml`), so run them locally before committing:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
cargo fmt
|
|
203
|
+
cargo clippy --workspace --all-targets -- -D warnings
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`clippy` is run with `-D warnings` (warnings are errors); `cargo fmt` keeps
|
|
207
|
+
the formatting canonical. Everything merged must pass both.
|
|
208
|
+
|