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

FIFO mode: coercing length to nearest #54

Closed
ascnave opened this issue Feb 22, 2024 · 2 comments
Closed

FIFO mode: coercing length to nearest #54

ascnave opened this issue Feb 22, 2024 · 2 comments

Comments

@ascnave
Copy link
Contributor

ascnave commented Feb 22, 2024

The error message FIFO mode: coercing length to nearest ... kept showing up in my case, evenso I chose the proper acquisition_length_in_samples and pre_trigger_length_in_samples. I think the problem came from the _coerce_num_samples_if_fifo, so I modified it as follow:

def _coerce_num_samples_if_fifo(self, value: int) -> int:
    if self.acquisition_mode == AcquisitionMode.SPC_REC_FIFO_MULTI:
        if mod(value, get_memsize_step_size(self._model_number)) != 0:
            logger.warning(
                f"FIFO mode: coercing length to nearest {get_memsize_step_size(self._model_number)}" f" samples"
            )
        value = int(value - mod(value, get_memsize_step_size(self._model_number)))
    return value
@crnbaker
Copy link
Collaborator

crnbaker commented Feb 22, 2024

Nice spot, thanks! Would you be up for creating a pull request?

@crnbaker
Copy link
Collaborator

crnbaker commented Mar 4, 2024

Fixed in #55

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

2 participants