You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a small problem reading some files... There are series that are zeroed is the same is showing error in the physical procedure... Would it be possible to add a condition to the code if the value is other than 0?
readSignalFunctions.R
line 146-161
if (physical) { # conversion mut be possible
digitalOk <- hdr$sHeaders$digitalMin < hdr$sHeaders$digitalMax
physicalOk <- hdr$sHeaders$physicalMin != hdr$sHeaders$physicalMax
digitalErr <- sum (!digitalOk)
physicalErr <- sum (!physicalOk)
if (digitalErr | physicalErr) {
if (digitalErr & physicalErr) {
msg <- "Illegal digital/physical min/max, use physical=FALSE"
} else if (digitalErr) {
msg <- "Illegal digital min/max, use physical=FALSE"
} else if (physicalErr) {
msg <- "Illegal physical min/max, use physical=FALSE"
}
stop (msg)
}
}
The text was updated successfully, but these errors were encountered:
Dear Vagner Fonseca,
Thank you for your close look to the efdReader. However, I am afraid I missed your point.
As fas as I ma aware, the conditions in line 147-148 are exactly as in the EDF+ specs . Zero values for digital/physical min/max are allowed. As an example a non-negative physical range may be mapped to the full digital range (-32,768 - 32,767) to achieve the maximum accuracy.
In other words, restricting the digital to physical mapping to those with non-zero digital/physical min/max values would render legal use of those values impossible.
As an alternative you may use readEdfSignals with the parameter 'physical' set to FALSE. This would eliminate the digital to physical mapping as well.
Or did I miss something?
I encountered a small problem reading some files... There are series that are zeroed is the same is showing error in the physical procedure... Would it be possible to add a condition to the code if the value is other than 0?
readSignalFunctions.R
line 146-161
The text was updated successfully, but these errors were encountered: