the-siesta-group / edfio

Read and write EDF/EDF+ files.
Apache License 2.0
25 stars 5 forks source link

Provide more concise `__repr__` for `Edf` and `EdfSignal` #26

Closed hofaflo closed 7 months ago

hofaflo commented 7 months ago

Resolves #21

To be merged after #25.

cbrnr commented 7 months ago

Very nice! I only have two minor comments:

  1. Visually, I don't like seeing both <> and (), but I don't have a better idea unfortunately.
  2. I'd prefer to see the label before the sampling rate for the EdfSignal repr. And I'd also round the sampling frequency to an integer, which makes it easier to read edf.signals (a list of many EdfSignals).
cbrnr commented 7 months ago

OK, I played around a bit, and I think dropping the parentheses is actually pretty OK:

<Edf 64 signals 30 annotations>
<EdfSignal Fc5. 160Hz>
hofaflo commented 7 months ago

Updated to make it look like your latest suggestion. I would rather not round the sampling frequencies as this might be misleading, but we can remove the .0 if it is integer-valued?