Commits
3587 3587 | |
3588 3588 | def column_exists(name, colname): |
3589 3589 | with table_manager(name) as tb: |
3590 3590 | colnames = tb.colnames() |
3591 3591 | |
3592 3592 | return colname in colnames |
3593 3593 | |
3594 3594 | |
3595 3595 | def fill_weight_spectrum(name): |
3596 3596 | with calibrater_manager(name, addcorr=False, addmodel=False) as cb: |
3597 - | cb.initweights(wtmode='ones', dowtsp=False) |
3597 + | cb.initweights(wtmode='ones', dowtsp=True) |
3598 3598 | |
3599 3599 | |
3600 3600 | def remove_weight_spectrum(name): |
3601 3601 | with table_manager(name, nomodify=False) as tb: |
3602 3602 | if 'WEIGHT_SPECTRUM' in tb.colnames(): |
3603 - | tb.removecols('WEIGHT_SPECTRUM') |
3603 + | tb.removecols(['WEIGHT_SPECTRUM']) |
3604 3604 | wt = tb.getcol('WEIGHT') |
3605 3605 | wt[:] = 1.0 |
3606 3606 | tb.putcol('WEIGHT', wt) |
3607 3607 | |
3608 3608 | |
3609 3609 | def fill_corrected_data(name): |
3610 3610 | with calibrater_manager(name, addmodel=False, addcorr=True): |
3611 3611 | pass |
3612 3612 | |
3613 3613 | |
3614 3614 | def remove_corrected_data(name): |
3615 3615 | with table_manager(name, nomodify=False) as tb: |
3616 3616 | if 'CORRECTED_DATA' in tb.colnames(): |
3617 - | tb.removecols('CORRECTED_DATA') |
3617 + | tb.removecols(['CORRECTED_DATA']) |
3618 3618 | |
3619 3619 | def setUp(self): |
3620 3620 | super(sdimaging_ms_conformance, self).setUp() |
3621 3621 | # keep existing backup files |
3622 3622 | self.existing_backup_files = set(glob.glob('*.sdimaging.backup-2*')) |
3623 3623 | self.additional_backup_files = set() |
3624 3624 | |
3625 3625 | def tearDown(self): |
3626 3626 | super(sdimaging_ms_conformance, self).tearDown() |
3627 3627 | # remove backup files created during test |