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 with downsampling missing values in pspm_dcm. #787

Open
dominikbach opened this issue Oct 7, 2024 · 0 comments · May be fixed by #796
Open

Problem with downsampling missing values in pspm_dcm. #787

dominikbach opened this issue Oct 7, 2024 · 0 comments · May be fixed by #796
Assignees

Comments

@dominikbach
Copy link
Contributor

dominikbach commented Oct 7, 2024

In what is currently line 404 of pspm_dcm, the function downsample is called with a potentially non-integer sample rate, which will throw an error. The function resample (used in pspm_prepdata) would work here, but only if the signal processing toolbox is installed.

Suggested workaround:

  • pspm_downsample becomes the main function for handling downsampling, and integrates lines 154-178 of pspm_prepdata
  • pspm_prepdata and pspm_dcm call pspm_downsample for downsampling.
  • create tests for pspm_downsample

Originally posted by @dominikbach in #719 (reply in thread)

@dominikbach dominikbach changed the title Thanks for flagging up this edge case, in which a non-integer ratio of initial sample rate, and model sample rate (default 10 Hz) lead to an error. Unfortunately, just rounding the ratio of sample rates will produce wrong missing value indices, because the data are downsampled with the correct non-integer ratio using a different procedure. Problem with downsampling missing values in pspm_dcm. Oct 7, 2024
@4gwe 4gwe self-assigned this Nov 4, 2024
@4gwe 4gwe linked a pull request Nov 4, 2024 that will close this issue
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.

2 participants