Build: #2 was successful Manual run by Akeem Wells
Code commits
CASA6
-
Srikrishna Sekhar 9ed09e701eb853bbf889175a6ecd0e461c727551
CAS-14184 : Fixes to gclean tests + masking bugfix
If a static user mask was provided in the input (e.g.,
circle[[50px,50px],10px]) the final mask-update deconvolve step was
breaking. It did not break for auto-masking or any other type of input
mask. This has been fixed by setting mask = '' in the last deconvolve
call, which still does the right thing for auto-masking etc.
Further, the default masking behaviour changed as of a few commits ago.
This was not reflected in the test cases, so they were all failing. The
tests have been updated to reflect this new behaviour as well. -
Sandra Castro ee54dadb2253e44ecff8d63cea658fe4bee68378
fixed typo in json entry.
-
Sandra Castro 4efe43b2c2c674172d60e978131877341ee8699d
Renamed test_task_gclean to test_imagerhelpers_gclean and moved it to the scripts directory. Added the new test script to the mapping json file to run automatically in Bamboo.
-
Sandra Castro a0a4205bd456371e0e0c453561c0ade49eb211b0
Added main at the end of tests. Removed unused imports Renamed class of test.
-
Srikrishna Sekhar f6b7c80f4bfc7907d9bc95d0c9d6fd35a2d80c68
CAS-14184 : Bug fix for previous commit
Forgot to remove a second line that had the wrong maskname. Also removed
extraneous print statements in gclean -
Srikrishna Sekhar 50f6c9f8537719edab072fad4f639334fdce46e7
CAS-14184 : Fix for mask MTMFS naming convention
The mask for MT-MFS is called "imagename.mask" not "imagename.mask.tt0". -
Srikrishna Sekhar 53ab1f24ba528e45569bad98c99790b6ad3ae149
CAS-14184 : Test for partial mask in gclean
Added a unit test to check the use case of a single channel masked while
deconvolving a cube in gclean -
Srikrishna Sekhar 1f3998a5ff73643fb1fc9ade1ce1f9a4917b9655
CAS-14184 : Fix for history logging
If convergence was hit, the logger would repeatedly print out it's entire
history to the log. Issued a fix to account for that. -
Srikrishna Sekhar 730b65e03080d7411bacd914fef0d8b6e0e6e95b
CAS-14184 : Fix mask handling logic on startup
The mask handling used to be in the frontend, but moved it to the
backend. It now correctly accounts for a restarted state with a
previously active mask.
The logic is :
- Initial launch : If usemask='user' and mask = '' then make sure the
default mask is filled with zeros before the GUI is launched. Leave mask
untouched for all other cases
- Restart :
- If usemask='user' and mask='' :
- If mask exists on disk - leave untouched
- If mask does not exist, make sure mask is filled with zeros
- Leave mask untouched for all other cases -
Srikrishna Sekhar 8efbcbc1ffda9b409d0e4a2831706e4e7e6ac01b
CAS-14184 : Fix typos in automasking params
There were typos in the newly added automasking parameters that were
causing gclean to crash on startup. -
Srikrishna Sekhar a3f52b7c17da4127698d0d7d974bd865aeb50db5
CAS-14184 : Fixed masking params
Some auto-multithresh parameters were missing from the _gclean input,
added those in.
The order of masking was also incorrect, the auto-mask growing was
happening _prior_ to deconvolution rather than after. This has also been
fixed. -
Srikrishna Sekhar 3d8bd599cb1f4760840c16eb488519ab4115db7d
CAS-14184 : More fixes to iteration control
-
Srikrishna Sekhar eca97e82ad9bd49865c951c595935bfe3e5ce4b8
CAS-14184 : Add check for user updated mask
The user can update/change the mask in between major cycles. Previously
gclean was invoking `deconvolve` to do this, but now there is an
additional function that uses `imstat` to check if the peakresidual has
changed because of a mask update in between major cycles.
This has implications on whether to continue deconvolution or not, and
therefore needs to be done before deconvolve is called. -
Srikrishna Sekhar de3560ad489ff41074dfc91879749d16c589b824
CAS-14184 : Fix peakres calculation
Added a check for masksum while calculating peakres across a cube. Only
in the case that masksum > 0 is peakres considered now.
This prevents the "bouncing" behaviour reported by Josh described below:
Iteration 1 :
field 0, chan 0, stokes 0, peakres [1.0149141550064087]
field 0, chan 1, stokes 0, peakres [5.736467361450195]
field 0, chan 2, stokes 0, peakres [4.154384136199951]
cyclethreshold = 1.0222507446548832
Above the cycle threshold is determined by the global peak value (5.736)
and chan 0 is cleaned down until the threshold. It returns to the GUI
and we click again, nothing happens because we are in convergence. But
peakres still gets updated as below.
Iteration 2 (after convergence)
field 0, chan 0, stokes 0, peakres [1.0149141550064087, 1.014911413192749]
field 0, chan 1, stokes 0, peakres [5.736467361450195, -0.0]
field 0, chan 2, stokes 0, peakres [4.154384136199951, 0.0]
cyclethreshold=0.18085938305290838
Here we have hit convergence, we take the niter=0 path in deconvolve and
set peakres=0 for channels with no mask. Now cyclethreshold is
determined by the residual in the first channel, and drops. But since we
are in the niter=0 path no deconvolution happens.
Iteration 3 :
field 0, chan 0, stokes 0, peakres [1.0149141550064087, 1.014911413192749, 0.6902092099189758]
field 0, chan 1, stokes 0, peakres [5.736467361450195, -0.0, 5.736467361450195]
field 0, chan 2, stokes 0, peakres [4.154384136199951, 0.0, 4.154384136199951]
cyclethreshold = 1.0222507446548832
We end up doing more deconvolution based on the previous cyclethreshold,
and now once again the new cyclethreshold is determined by the global
peak (5.736) and is too high to continue deconvolution. -
Srikrishna Sekhar 9f8146167b40abf769099d49001e6a9023fbe182
CAS-14184 : Fixes for test failures
There was a bug in how a non-existent mask was handled. This has now
been fixed. -
Srikrishna Sekhar 03739099c27bf0e680281760efb1afac3d8d1800
CAS-14184 : Bugfix for niter=0 peakres calculation
If no mask was passed in for the niter=0 case, the `ImagingDict`
class set the `mask` parameter to -1 (instead of the pixel mask).
peakRes was always calcualted as `np.amax(image_pixels * mask_pixels)`
so when mask = -1 it picked the highest negative as the peakRes.
This commit fixes that bug, and has been confirmed to pass the
previously failing task_tclean tests.
Additionally, removed a check in test_task_tclean that asserted
len(summaryminor) == 0 for niter = 0.