torrance / Casacore.jl

A high level Julia interface to Casacore
MIT License
9 stars 0 forks source link

deleteat!() not writing back to disk #7

Closed torrance closed 1 year ago

torrance commented 1 year ago

Reported by Iniyan Natarajan:

I have a question about updating MSes using Casacore.jl and wasn't sure whether Github issues was the right place to ask: how do I write back the changes made to the disk? For instance, I can do something like this without errors: tab = CCTable("[test.ms](http://test.ms/)", CCTables.Update) deleteat!(tab, 100) But how do I close/write the changes made back to the MS? I couldn't find it in the readme and I don't see the changes reflected in the MS.

torrance commented 1 year ago

Good catch! See commit 642a6f6 for the fix.

I will roll this out into v0.2.1

torrance commented 1 year ago

Just to be clear, this wasn't an problem with the changes not being flushed or written back to disk. Instead, there was a bug in how scalar indexes were handled when calling deleteat().

Changes should otherwise be written to disk when the Table object in garbage collected at the very latest, but in general they seem to be written to disk during the call. In the future, I'd like to write a flush() method to make this process explicit if it needs be.