Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bench_tsdimaging tests #21

Open
smcastro opened this issue Oct 10, 2024 · 0 comments
Open

Update bench_tsdimaging tests #21

smcastro opened this issue Oct 10, 2024 · 0 comments

Comments

@smcastro
Copy link
Contributor

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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant