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

problem indexing signal integrity with coordinate_df.x_pixel #45

Open
j-bac opened this issue Feb 27, 2025 · 0 comments
Open

problem indexing signal integrity with coordinate_df.x_pixel #45

j-bac opened this issue Feb 27, 2025 · 0 comments

Comments

@j-bac
Copy link

j-bac commented Feb 27, 2025

It seems it can happen that coordinate_df.x_pixel.max()+1 or coordinate_df.y_pixel.max()+1 are higher than the signal_integrity shape. Then it is not clear how to index signal_integrity based on x_pixel and y_pixel

import ovrlpy
import pandas as pd

df = pd.DataFrame(np.array([[4705.,4274.954],[0.,0.]]),columns=['x','y'])
ovrlpy._ovrlp._assign_xy(df)
signal_integrity = ovrlpy._ssam2._utils.kde_2d(df[["x", "y"]].values)

assert (df.y_pixel.max() + 1) == signal_integrity.shape[1]
assert (df.x_pixel.max() + 1) == signal_integrity.shape[0]
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