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

Rescale raw signals only in real_scale mode #56

Merged

Conversation

jpgill86
Copy link
Collaborator

@jpgill86 jpgill86 commented Jul 2, 2019

This PR is a response to #44 and is what I was referring to here: #44 (comment)

@samuelgarcia
Copy link
Collaborator

I think we can go for this.

@jpgill86
Copy link
Collaborator Author

jpgill86 commented Jul 2, 2019

I think that this solution is probably better for the library than #44. It fixes the scaling issue when it matters (real_scale mode) and doesn't do unnecessary scaling in other modes. Using this instead of #44 means I'll have to do a little extra work in my app, but that's OK. The library should perform well. I will merge. 😊

@jpgill86
Copy link
Collaborator Author

jpgill86 commented Jul 2, 2019

P.S.: Thanks for the review!

@jpgill86 jpgill86 merged commit fa09be1 into NeuralEnsemble:master Jul 2, 2019
@jpgill86 jpgill86 deleted the fix-in-real-scale-mode-only branch July 2, 2019 21:25
jpgill86 added a commit to jpgill86/neurotic that referenced this pull request Jul 2, 2019
jpgill86 added a commit to jpgill86/ephyviewer that referenced this pull request Jul 9, 2019
Fixes NeuralEnsemble#58.

Added new `raw_gains` and `raw_offsets` to `TraceViewer_ParamController`, which are distinguished from the adjustable `gains` and `offsets` parameters. For raw signal sources, these values are obtained from the RawIO header. For in-memory signal sources, `raw_gains` = 1 and `raw_offsets` = 0.

New properties `total_gains` and `total_offsets` are added which provide the combined raw and adjustable gains and offsets. In the case of `total_offsets`, this is not simply the sum as you might expect (see detailed comments for explanation).

Parameters to functions that require the total gains and offsets (`get_data` and `on_request_data`) were renamed to avoid confusion.

Distinguishing between raw and adjustable gains and offsets makes it easier to properly place the trace labels and baselines at each trace's zero for both raw and in-memory sources.

Due to this new division of labor, changes made to `compute_rescale` in NeuralEnsemble#56 are effectively reverted.
@jpgill86 jpgill86 added this to the 1.1.0 milestone Jul 14, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants