Skip to content

Recorders with non voltage (non standard) channels and slicing channels #782

@h-mayorquin

Description

@h-mayorquin

In #761 we move the warnings of non standard units to get_traces. We achieved this by introducing an extra attribute:

if return_scaled:
if hasattr(self, "NeoRawIOClass"):
if self.has_non_standard_units:
message = (
f'This extractor based on neo.{self.NeoRawIOClass} has channels with units not in (V, mV, uV)'
)
warnings.warn(message)

However, as far as I know this attribute (self.has_non_standards_units) is not copied when we slice the channels with recorder.slice_channel which indicates problems. I think that what would happen right now is that the attribute NeoRawIOClass is not copied either so the sliced recorder with non voltage units will never raise the warning.

Maybe we should handle this with annotations as you already have the machinery in those methods to copy that?

Context: #758, #761 and NeuralEnsemble/python-neo#1133

Metadata

Metadata

Assignees

No one assigned

    Labels

    NEOProblem related to NEO IO

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions