Skip to content

Commit

Permalink
Moved signalQuality under info
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickadam authored and alexcastillo committed Nov 9, 2020
1 parent e4857e2 commit 1e15612
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dependencies": {
"dsp.js": "^1.0.1",
"fili": "^2.0.1",
"rxjs": "^6.3.1"
"rxjs": "^6.6.3"
},
"devDependencies": {
"@types/node": "^10.12.10",
Expand Down
17 changes: 10 additions & 7 deletions src/pipes/utility/addSignalQuality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ export const addSignalQuality = ({ dataProp = defaultDataProp } = {}) =>
: epoch[dataProp].map((_, i) => i);
return {
...epoch,
signalQuality: epoch[dataProp].reduce(
(acc, curr, index) => ({
...acc,
[names[index]]: standardDeviation(curr)
}),
{}
)
info: {
...epoch.info,
signalQuality: epoch[dataProp].reduce(
(acc, curr, index) => ({
...acc,
[names[index]]: standardDeviation(curr)
}),
{}
)
}
};
})
);

0 comments on commit 1e15612

Please sign in to comment.