Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nan values in off-diagonal correlations of flag data points causing division by zero error in robust solver #407

Open
ulricharmel opened this issue Aug 7, 2020 · 2 comments

Comments

@ulricharmel
Copy link
Collaborator

ulricharmel commented Aug 7, 2020

I just noticed from one of the 3C147 (C-config, average, low bandwidth) that certain visibilities have nan values in their off diagonals (nan+nanj). Although these visibilities are flagged and have zero weights, this computation https://github.com/ratt-ru/CubiCal/blob/master/cubical/solver.py#L497 returns [0, nan+nanj, nan+nanj, 0] for those visibilities. This doesn't seem to have any repercussions on the complex solver but this leads to division by zero error for the robust solver. I don't know if this can be fixed in the data handler when reading the data. A temporary quick fix for now which I have adopted on my local branch is to reset all flagged visibilities to zero. i.e. add a copy of line https://github.com/ratt-ru/CubiCal/blob/master/cubical/solver.py#L502 below https://github.com/ratt-ru/CubiCal/blob/master/cubical/solver.py#L497

Probably a similar thing should be done after line https://github.com/ratt-ru/CubiCal/blob/master/cubical/solver.py#L521 for model visibilities.

@bennahugo
Copy link
Collaborator

bennahugo commented Aug 8, 2020 via email

@ulricharmel
Copy link
Collaborator Author

3.0 I will try 3.3 then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants