Comments (6)
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.
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.
True, we can take care of formatting the number when displaying it.
from pyxdf.
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.
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.
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)
- Bump Python to >= 3.9 HOT 1
- Replace Azure Pipelines with GitHub Actions HOT 2
- Clean up branches HOT 1
- XDF.jl (Julia importer) HOT 4
- xdf_load does not synchronize clocks HOT 8
- Rename master -> main HOT 2
- jooc: why are some values in stream meta-data lists of dicts and some just dicts? HOT 2
- unpack requires a buffer of 8 bytes HOT 7
- Merge streams HOT 2
- Nominal vs. effective sampling rate HOT 25
- Error when dejitter_timestamps=False on stream without samples HOT 6
- "Reading chunk length error" after a Python crash at the end of the recording, any solution ? HOT 5
- OSError: Invalid XDF file HOT 5
- Make progress bar HOT 2
- Incompatible with numpy 1.24
- Azure Pipelines broken? HOT 6
- Single PC clock offset vs. latency and jitter HOT 10
- Possible bug with _clock_sync and clock reset detection HOT 2
- 2-n order drift correction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyxdf.