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

1D savgol test #4

Open
nghorbani opened this issue Jul 26, 2024 · 2 comments
Open

1D savgol test #4

nghorbani opened this issue Jul 26, 2024 · 2 comments

Comments

@nghorbani
Copy link

nghorbani commented Jul 26, 2024

Hi,
I wrote a simple test and the output size is different
` input_arr = np.random.rand(10,1)
output_arr = filter1D(input_arr.reshape(-1), mu=5, poly=3, order=0)

output_arr2 = savgol_filter(input_arr, 5, 3, axis=0, mode='wrap')

`
resulting in output_arr of shape 10, and output_arr2 shape of 5. it has to do with conv(...,'full'). if "same" is used the dimension are correct but still the values are different

@nghorbani nghorbani changed the title Input array dimensions 1D savgol test Jul 26, 2024
@nghorbani
Copy link
Author

image
wierd is that they sometimes (at certain input values) come very close

@nghorbani
Copy link
Author

the 3D filter looks meaningful

input_arr = np.random.rand(10,1,3) # (100,1,3)
print(f"Input array: {input_arr.shape}")
output_arr = filter3D(input_arr, mu=7, poly=5, order=0) # (100,1,3)
plot_3d(input_arr, output_arr)

Figure_1

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