GithubHelp home page GithubHelp logo

Comments (6)

cbrnr avatar cbrnr commented on July 30, 2024

No objection, but I would like to make sure we display sensible values. If a device has a ~50kHz sampling rate, I don't think it makes a lot of sense to be super precise and add decimal places. In other cases, one or two decimal places might make sense (e.g. 16.25Hz). I would like to avoid displaying non-significant places (e.g. 16.250000000000Hz), so we shouldn't use a fixed-width format. So maybe rounding to at most two decimal places would be a viable compromise (so we'd have e.g. 512Hz and not 512.00Hz if the rate is integer).

from pyxdf.

cboulay avatar cboulay commented on July 30, 2024

What specifically are you referring to by "we display"? We're just loading data into memory. How the numbers get printed on screen isn't a problem for load_xdf. Maybe we need a pretty_print function but that's a separate issue.

I'm more concerned with rounding the sampling rate when it shouldn't be rounded, and then using that number in other places. e.g. incorrectly calculating timestamps: self.tdiff = 1.0 / self.srate if self.srate > 0 else 0.0 --> stamps[k] = s.last_timestamp + s.tdiff

from pyxdf.

cbrnr avatar cbrnr commented on July 30, 2024

True, we can take care of formatting the number when displaying it.

from pyxdf.

cbrnr avatar cbrnr commented on July 30, 2024

What was bothering me with the example file is that it contained numbers with 15 fixed decimal places in its XML meta information. We should advise people to use the minimum number of decimal places.

from pyxdf.

cboulay avatar cboulay commented on July 30, 2024

That's a LabRecorder issue. I just looked through its source. It seems to be using a one-size-fits-all function for writing the header. I don't know if we want to add in some extra code to truncate trailing zeros.

from pyxdf.

cbrnr avatar cbrnr commented on July 30, 2024

I don't know if we want to add in some extra code to truncate trailing zeros.

I think that would be a good idea.

from pyxdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.