ratt-ru / CubiCal

A fast radio interferometric calibration suite.
GNU General Public License v2.0
18 stars 13 forks source link

Null-v: Key doesn't exist #473

Closed AKHughes1994 closed 1 year ago

AKHughes1994 commented 1 year ago

Hello,

First of all, sorry if this is a silly question,

When trying to run a K-slope calibration run I get this error that kills the process

Traceback (most recent call last): File "/home/ubuntu/VirtualEnvironments/CubiCalEnv/lib/python3.9/site-packages/cubical/main.py", line 457, in main null_v=GD["model"]["null-v"]) KeyError: 'null-v'

I'm not exactly sure how to debug this issue, so I was hoping for some advice on where to begin.

Thanks, Andrew

P.S. I've attached my parset DI_bb2.txt

o-smirnov commented 1 year ago

Try adding

null-v = 0

To the [model] section of your parset. This is a recent feature -- perhaps you're using a parset you made for an older version (if so, this means we mucked up the version transition... that key should be there by default...)

AKHughes1994 commented 1 year ago

Adding that term changes the error to

Traceback (most recent call last): File "/home/ubuntu/VirtualEnvironments/CubiCalEnv/lib/python3.9/site-packages/cubical/main.py", line 453, in main ms.init_models(models, weights, fill_offdiag_weights=GD["weight"]["fill-offdiag"], TypeError: init_models() got an unexpected keyword argument 'null_v'

AKHughes1994 commented 1 year ago

I'm guessing for some reason it is reading null-v in as null_v.

JSKenyon commented 1 year ago

Hi @AKHughes1994! I am trying to reproduce the error. Could you possibly try and run using Python 3.8? I suspect that the problem is only in 3.9+. Not sure how long it will take me to find it.

JSKenyon commented 1 year ago

Ah, after some head scratching I have managed to reproduce. This bug is in the release version on PyPI. You can install from the master branch on the repo and things should work - I will investigate the root cause.

JSKenyon commented 1 year ago

I have identified the root cause - for some reason, the DefaultParset.cfg file in the release version is incorrect. This means that there is no default for the new parameter and causes this bug. I will need to upload a new release, although I am not quite sure how this happened.

JSKenyon commented 1 year ago

Something went wrong with the original wheel/source upload. Updating to cubical==1.6.4 should solve the problem.

AKHughes1994 commented 1 year ago

I can confirm this fixed the issue on my end. Thanks!