Closed iniyannatarajan closed 1 year ago
Good catch! It's currently written to handle tables of primitive types but not yet strings. (In fact, I'm not sure I've seen string columns in my own datasets).
I will take a look at this on Monday and see how they're stored and whether this can be an easy extension of functionality.
I just came across this issue as well, but in my case it was for table.ANTENNA[:NAME][:]
. I hope it's an easy fix because this package is very useful for me. Thanks for writing it!
This has been a tricky one. For primitive types, both Julia and Casacore share the same underlying bit representation. This allows for great efficiencies with primitive types where I entirely avoid copying of memory from Casascore to Julia. For strings, this is not the case, and required their very own unique code path.
Are either of @iniyannatarajan or @david-macmahon able to check out whether dev now works for their use cases correctly? To add the dev package from git try: pkg> add https://github.com/torrance/Casacore.jl
.
Note that the full test suite won't pass on your machines since casacorecxx_jll hasn't been updated in the registry yet, but you should be able to read/write to String columns. (The registry has been updated, casacorecxx_jl v0.2.1 is now updated)
@torrance Thanks for the quick fix! With the new version, I can read in columns with string values as Vectors of Strings.
@torrance I can confirm that reading table.ANTENNA[:NAME][:]
returns a Vector of Stings now. Thanks!!!
Thanks both for your feedback! I'll push this out into a v0.2 release shortly.
While I can easily access the values of a Float64 array such as the DISH_DIAMETER in the ANTENNA subtable
table.ANTENNA[:DISH_DIAMETER][:]
,trying to access a column with string values throws the following error:
Am I missing something related to indexing in Julia here? Or is there something about Casacore's own String type I should be watching out for? Thanks!