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

Signal calibration #7

Open
leoggoes opened this issue Feb 17, 2018 · 1 comment
Open

Signal calibration #7

leoggoes opened this issue Feb 17, 2018 · 1 comment

Comments

@leoggoes
Copy link

Hi. Came to my attention that when converting digital values to values in units you multiplied the gain but forgot the offset for signal calibration. I don't think it deserves a git pull, so I'll paste the files here and you give it a look. Just added a "Doubles[] unitOffset" on EDFSignal.java , "signal.unitsOffset[i] = (header.maxInUnits[i] - header.minInUnits[i]) - signal.unitsInDigit[i] * (header.digitalMax[i] - header.digitalMin[i]);" on unitsInDigit for loop and "signal.valuesInUnits[j][s] = signal.digitalValues[j][s] * signal.unitsInDigit[j] + signal.unitsOffset[j];" on header.numberOfChannels loop inside EDFParser.java.
EDFParser.txt
EDFSignal.txt

@julierbllrt
Copy link

@leoggoes signal.unitsOffset[i] will always be 0 with this expression since
signal.unitsInDigit[i] = (header.maxInUnits[i] - header.minInUnits[i]) / (header.digitalMax[i] - header.digitalMin[i]);
so it's surely not the good expression

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