Closed JSKenyon closed 2 years ago
Thanks Jon
Much appreciated. We can perhaps start running the dE case with the stimulation branch once merged.
We are looking at getting the two images level in terms of decorrelation - something is not quite right in the averaging parameters, so until we sort that out a comparison of quality would be rather hard. Hopefully we can fix that this week and finalize the 3GC reduction script for this cluster.
On Wed, Aug 3, 2022 at 11:47 AM JSKenyon @.***> wrote:
@bennahugo https://github.com/bennahugo @Kincaidr https://github.com/Kincaidr This PR makes some minor changes to the BDA code which should get it into a running (although likely imperfect) state. I will get this merged into the stimelation branch as soon as possible. I will play around a little bit more just to confirm that the solvers are handling the data correctly.
You can view, comment on, or merge this pull request online at:
https://github.com/ratt-ru/QuartiCal/pull/186 Commit Summary
- debc0f2 https://github.com/ratt-ru/QuartiCal/pull/186/commits/debc0f241e9870ff87dd0648c76af002e7a63e96 Checkpoint current changes needed to get BDA working. Still needs work.
- 111320d https://github.com/ratt-ru/QuartiCal/pull/186/commits/111320de0125c6222ad349cf02d3ac52ba7b5f02 Fix flag init in BDA case. Fix coord segfault in BDA case.
- 567081c https://github.com/ratt-ru/QuartiCal/pull/186/commits/567081c73653c52df007a4cb40f637d91fff25c3 Add proper error when user attempts to chunk BDA data within an xds.
File Changes
(6 files https://github.com/ratt-ru/QuartiCal/pull/186/files)
- M quartical/config/external.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-9cd525ad47684019ff35e4c2d8634a2910cd905c78848de2e7fd9817639b50db (10)
- M quartical/data_handling/bda.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-27036e249e0733e86a8f2211d407b11f942a77e95d2a4f2b152a1f1494738990 (39)
- M quartical/data_handling/ms_handler.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-6b1348aa6d6a8e2dfee8bcf73b45238cc1ad3a88897c8b894b035c112850b4f1 (4)
- M quartical/gains/datasets.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-1c3a18f45cb7c7e29177bdd1c429812241c946f369cbaecfeedde72e2d66cf7c (5)
- M quartical/gains/general/flagging.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-abda05a758e65ff5f03c86a1ac349c57ed07a6db077f67679c5f005e8b7892e0 (21)
- M quartical/utils/maths.py https://github.com/ratt-ru/QuartiCal/pull/186/files#diff-706426b372bcc034f0b61a2063823915335b2d51f61eafa8a7864a4b4d0f4603 (27)
Patch Links:
- https://github.com/ratt-ru/QuartiCal/pull/186.patch
- https://github.com/ratt-ru/QuartiCal/pull/186.diff
— Reply to this email directly, view it on GitHub https://github.com/ratt-ru/QuartiCal/pull/186, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RE6SUAP6NJUN6HEYSMJLVXI5ZXANCNFSM55OFVLKA . You are receiving this because you were mentioned.Message ID: @.***>
Benjamin Hugo
PhD. student, Centre for Radio Astronomy Techniques and Technologies Department of Physics and Electronics Rhodes University
Junior software developer Radio Astronomy Research Group South African Radio Astronomy Observatory Black River Business Park Observatory Cape Town
@bennahugo @Kincaidr This has been merged into main
and stimelation
. Should be good to go on your experiments. Do note that I have never tested the BDA functionality with DDEs, so there may still be some lingering issues.
I have some long-term thoughts on reimplementing BDA that would hopefully reduce the need for these (unfortunately necessary!) heuristics by re-averaging into predefined grid-aligned windows using 2D Interval/Range Trees.
I think this will change computational complexity of averaging from O(TC) to O(T log T C log C) where T= TIME and C = NUM_CHAN, but it may be worth reducing the need to deal with fiddly cases like this.
I have no immediate plans to implement this and would only do so after further discussion.
Hi Jonathan,
The Quartical has been working well for both BDA and regular timechannel-averaging data. Here are the results so far:
Note: This is xova applied ontop of the CASA regular averaging.
xova TimeChannel
left and xova BDA
right:
After K-solve
:
Deep masking
:
K + de solve with deep mask
:
The last de
quartical run has over-subtracted slightly, I have lowered the solution intervals to prevent capturing of excess flux by changing de.time_interval 32
to de.time_interval 15
. Is there any other parameter I could change to lower this?
After I get this last step right, I will repeat the whole process with the same xova paramaters applied to without the CASA averaging data. This will probably remove that smearing you see in the first After K-solve
of the xova TimeChannel
image.
I will just add that the artifacts seen in the first set of images are due to cleaning without a mask into the frequency smeared (radial) far sidelobes of the bright sources to the top. I will just look at the 'deep' mask images.
The total amount of smearing is confirmed comparable but the regular averaging is not only smeared in time but also frequency, hence the slightly worse sidelobes - worsened by cleaning into them...
Thanks for the work on this Robert. I have a suspicion that some of the negative errors are due to overaveraging - the visibilities are not subtracting properly from your smeared model. I suspect you will get better results once you removed the initial casa averaging.
Note: You might try the robust solver on the de term though if you see evidence for flux absorption.
On Thu, 11 Aug 2022, 21:31 Kincaidr, @.***> wrote:
Hi Jonathan,
The Quartical has been working well for both BDA and regular timechannel-averaging data. Here are the results so far:
Note: This is xova applied ontop of the CASA regular averaging.
xova TimeChannel left and xova BDA right:
After K-solve:
https://user-images.githubusercontent.com/53697426/184221772-32f45cfc-a9b9-4b08-b20c-96eddf21bc49.png https://user-images.githubusercontent.com/53697426/184222045-420cca3c-3335-452e-85e5-36ebf68f9acc.png
Deep masking :
https://user-images.githubusercontent.com/53697426/184222244-adb68887-adb1-4685-9c09-374521c480ef.png https://user-images.githubusercontent.com/53697426/184222317-528bfb54-1b60-41a2-94b2-27ba24c9ddc0.png
K + de solve with deep mask:
https://user-images.githubusercontent.com/53697426/184222459-10a2c3df-118b-4d38-a327-cb876a313186.png https://user-images.githubusercontent.com/53697426/184222483-4598659c-a3cb-48cb-b013-261d13adfb4a.png
The last de quartical run has over-subtracted slightly, I have lowered the solution intervals to prevent capturing of excess flux by changing de.time_interval 32 to de.time_interval 15. Is there any other parameter I could change to lower this?
After I get this last step right, I will repeat the whole process with the same xova paramaters applied to without the CASA averaging data. This will probably remove that smearing you see in the first After K-solve of the xova TimeChannel image.
— Reply to this email directly, view it on GitHub https://github.com/ratt-ru/QuartiCal/pull/186#issuecomment-1212401819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RE6XYHBFWX2BEQ4PG6ATVYVIIDANCNFSM55OFVLKA . You are receiving this because you were mentioned.Message ID: @.***>
Great work @Kincaidr! Apologies for not replying sooner. I am glad that things seem to be working.
The last de quartical run has over-subtracted slightly, I have lowered the solution intervals to prevent capturing of excess flux by changing de.time_interval 32 to de.time_interval 15. Is there any other parameter I could change to lower this?
The over-subtraction can be tricky to pin down. I suspect that you may need a deeper model (which captures as much of the diffuse flux as possible) to eliminate the over-subtraction as the gain solutions will tend to move flux that unmodelled flux into the peeled sources. That said, I do not know what your CLEAN model image looks like - one needs to be very careful about negative components/artifacts entering the model.
@Kincaidr something that @JSKenyon mentioned during our meeting is to also run the pipeline on the non-averaged data ie. the raw CASA 1GC'd data as a dual comparison to see if the oversubtraction is due to overaveraging -- it might be the quickest way to establish that.
one needs to be very careful about negative components/artifacts entering the model.
Taking this issue off-topic here, but this has been a source of much debate for at least as long as I've been doing radio astronomy. I can remember people arguing 20 years ago about whether to cut AIPS CL tables at the first negative component or not when doing selfcal.
Definitely don't want artefacts, postive or negative, entering the model. But the argument againt "no negatives whatsoever" is that for real sources you need the negative components in there because of how CLEAN works, things like the loop gain in conjunction with the fact that even unresolved sources might not being registered at the centre of a pixel once an image is formed. The thinking is that negative components are required to best characterise the source once CLEAN has done its thing.
I've always leant towards the "allow negatives" philosophy, especially when there is a good mask in place (which I maintain is always good practice). Would be keen to hear everyone's thoughts on this.
Cheers.
@IanHeywood I have created a discussion here: https://github.com/ratt-ru/QuartiCal/discussions/189, where we can discuss how CLEAN models affect calibration.
@bennahugo, @Kincaidr feel free to open a discussion for BDA results as this PR is closed and not very visible.
@bennahugo @Kincaidr This PR makes some minor changes to the BDA code which should get it into a running (although likely imperfect) state. I will get this merged into the stimelation branch as soon as possible. I will play around a little bit more just to confirm that the solvers are handling the data correctly.