ratt-ru / simms

Creates empty measurement sets using the the CASA simulate tool.
GNU General Public License v2.0
7 stars 8 forks source link

Migrate to CASA6 and modularise #60

Closed AlecThomson closed 7 months ago

AlecThomson commented 1 year ago

Hi there,

First - apologies for this very large pull request out of the blue! This started as a small fix for myself that ballooned into a refactor. I'm happy to discuss more details if needed, or for this PR to be rejected if its too much at once.

There are two major structural changes - but nothing should have changed in the actual underlying logic or procedure of the code (with one minor exception). First, and most important, this uses the modular CASA 6. This allows proper use of a clear namespace. casasm is now imported and used natively as a module - not called as an external script. Secondly, I've packaged up the whole module using the latest poetry standard. This will helps greatly in the overall packaging of the module. I had to rename simms.py to core.py to avoid duplication of files by pip.

The minor exception to logical changes I mentioned above is the logic of parsing arguments. I think the logic was slightly over-complicated previously, and I have attempted to clean it here.

Again, sorry if this ends up causing more pain than its worth. I just hope that it can be useful!

Cheers

bennahugo commented 7 months ago

Sorry I haven't seen this PR coming through. This is very helpful thanks - I was actually looking just now how to make it compatible with CASA 6. I'm going to test and merge this.

bennahugo commented 7 months ago

@AlecThomson there are minor niggles with this branch -- I'm going to start a new PR so that I can apply fixes (and add github ci in the process). Closing this, but I will co-author a new one momentarily