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

Investigate interaction of robust reweighting, uv-cut and writing of corrected weight. #283

Open
JSKenyon opened this issue Jul 6, 2023 · 3 comments
Labels
bug Something isn't working Edge Case

Comments

@JSKenyon
Copy link
Collaborator

JSKenyon commented Jul 6, 2023

Describe the bug
Writing out the corrected weight/weight when using a uv-cut may result in zero weight on baselines deselected by the cut. This is both a bug and a sharp edge although it is connected to relatively specialised functionality. I had begun fixing this in #225 but I never came to a definitive conclusion about the correct approach. The problem is also further exacerbated by the fact that QuartiCal currently only allows for one instance of the weight column (for memory reasons). However, this is problematic in cases where the robust solver is in use as the user may want to use the robust weights during calibration but write out the corrected weights based on the current contents of WEIGHT_SPECTRUM. This is necessary as imaging with the robust weights can (will) suppress unmodelled flux.

To Reproduce
Run QC with the robust solver and write out corrected_weight.

Expected behavior
QC should:

  1. Treat the UV-cut correctly during reweighting.
  2. Support writing out corrected weight using contents of WEIGHT_SPECTRUM even when robust reweighting is enabled.

Workaround
Running QC again with solver.robust=False and loading the previously solved gains will allow writing corrected weight from either SIGMA_SPECTRUM/WEIGHT_SPECTRUM. This is obviously tedious but should work in the interim.

@JSKenyon JSKenyon added bug Something isn't working Edge Case labels Jul 6, 2023
@ktrehaeven
Copy link
Collaborator

Hi @JSKenyon would I also be able to peel during the first and/or second run of QC?

@JSKenyon
Copy link
Collaborator Author

Hi @JSKenyon would I also be able to peel during the first and/or second run of QC?

In general? There is nothing stopping you from peeling from the outset if you have the relevant model components. Not sure if that answers your question though.

@ktrehaeven
Copy link
Collaborator

ktrehaeven commented Dec 15, 2023

Yup, thanks.

To test if there is actually any benefit from including the second run, I imaged the corrected data from run1 (uv cut and solver.robust). Then used exactly the same config to do run2, just with solver.robust=False and added the corrected_weight output (see attached configs) and imaged again. The images after run1 and run2 are almost exactly the same. After run2 i imaged with the corrected data from run1 and run2 and both images came out almost exactly the same. So it doesn't seem like the second run improves anything. Am I missing something? Do you actually have to update the input model when doing run2?

run1.qc.txt
run2.qc.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Edge Case
Projects
None yet
Development

No branches or pull requests

2 participants