Skip to content

Update bench_tsdimaging tests #21

@smcastro

Description

@smcastro

In CAS-14321, a new parameter was added to task_tsdimaging and in In CAS-14417, the original test_task_tsdimaging.py tests were updated to reflect changes to the default value of parameter interpolation from nearest to linear. This will have effect on the benchmark tests in casabench and need to be updated.
We should also add a few more test cases that reflect the interpolation parameter, following the original new tests:

    def run_base_test(self, interpolation='linear'):
        imsize = 11
        params = {
            'infiles': self.infiles,
            'antenna': '2',
            'spw': '18',
            'phasecenter': 2,
            'outfile': self.outfile,
            'overwrite': False,
            'imsize': imsize,
            'cell': '10arcsec',
            'interpolation': interpolation
        }
        center = [imsize // 2, imsize // 2, 0, 0]
        ref = {
            'npts': [1],
            'max': [1],
            'min': [1],
            'maxpos': center,
            'minpos': center,
            'sum': [1]
        }
        self.run_test_common(params, refstats=ref, shape=(imsize, imsize, 1, 1), ignoremask=False)

    def test_interpolation_linear(self):
        self.run_base_test()

    def test_interpolation_nearest(self):
        self.run_base_test('nearest')

    def test_interpolation_cubic(self):
        self.run_base_test('cubic')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions