Commits
479 479 | my_ia.open(self.outfile) |
480 480 | csys = my_ia.coordsys() |
481 481 | csys.setconversiontype(spectral=csys.referencecode('spectra')[0]) |
482 482 | my_ia.setcoordsys(csys.torecord()) |
483 483 | if len(self.image_unit) > 0: |
484 484 | casalog.post("Setting brightness unit '%s' to image." % self.image_unit) |
485 485 | my_ia.setbrightnessunit(self.image_unit) |
486 486 | csys.done() |
487 487 | my_ia.close() |
488 488 | |
489 + | # CAS-12984 set brightness unit for weight image to '' |
490 + | my_ia.open(weightfile) |
491 + | my_ia.setbrightnessunit('') |
492 + | my_ia.close() |
493 + | |
489 494 | # Mask image pixels whose weight are smaller than minweight. |
490 495 | # Weight image should have 0 weight for pixels below < minweight |
491 496 | casalog.post("Start masking the map using minweight = %f" % \ |
492 497 | self.minweight, "INFO") |
493 498 | my_ia.open(weightfile) |
494 499 | try: |
495 500 | stat=my_ia.statistics(mask="'"+weightfile+"' > 0.0", robust=True) |
496 501 | valid_pixels=stat['npts'] |
497 502 | except RuntimeError as e: |
498 503 | if str(e).find('No valid data found.') >= 0: |