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

Beersheba: no interpolation creates an image of different size #905

Closed
gonzaponte opened this issue Oct 23, 2024 · 0 comments · Fixed by #906
Closed

Beersheba: no interpolation creates an image of different size #905

gonzaponte opened this issue Oct 23, 2024 · 0 comments · Fixed by #906

Comments

@gonzaponte
Copy link
Collaborator

See this test for example

@fixture(scope="session")
def new_grid():
    det_db   = DataSiPM('new', 0)
    det_grid = [ np.arange( det_db[var].min() + bs/2
                          , det_db[var].max() - bs/2 + np.finfo(np.float32).eps, bs)
                 for var, bs in zip("X Y".split(), [1., 1.])]
    return det_grid


@mark.parametrize("interp_method", InterpolationMethod)
def test_deconvolution_input_interpolation_method(data_hdst, new_grid, interp_method):
    """
    Check that it runs with all interpolation methods
    """
    hdst = load_dst(data_hdst, 'RECO', 'Events')
    hdst = hdst[(hdst.event == 3021916) & (hdst.npeak == 0) & (hdst.Q>40)]

    deconvolve = deconvolution_input([10., 10.], new_grid, interp_method)
    output     = deconvolve((hdst.X, hdst.Y), hdst.Q)

    assert output[0].shape == (70, 100)
    assert len(output[1])  == 2
    assert output[1][0].shape == (7000,)
    assert output[1][1].shape == (7000,)

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

Successfully merging a pull request may close this issue.

1 participant