-
Notifications
You must be signed in to change notification settings - Fork 44
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
Start v3 implemention #18
Open
dicklyon
wants to merge
8
commits into
master
Choose a base branch
from
carfac-v3-start
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
628c358
Start v3 implemention
dicklyon 3ab484e
Add files via upload
dicklyon ab450a0
Fixes per robsc's comments on PR 18
dicklyon 6975bde
Some SYN improvements; still needs a lot of work.
dicklyon 17f5564
Reparameterized, better design phase
dicklyon b79778a
Move SYN constants from code into default parameters
dicklyon 0181d1e
Make agc_weights work better across sample rate and n_fiber changes
dicklyon 6cbf240
Delete .DS_Store
dicklyon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function [syn_out, firings, state] = CARFAC_SYN_Step(v_recep, coeffs, state) | ||
% Drive multiple synapse classes with receptor potential from IHC, | ||
% returning instantaneous spike rates per class, for a group of neurons | ||
% associated with the CF channel, including reductions due to synaptopathy. | ||
|
||
% Normalized offset position into neurotransmitter release sigmoid. | ||
x = (v_recep - coeffs.v_halfs) ./ coeffs.v_widths ; | ||
|
||
% This sigmoidal release_rates is relative to a max of 1, usually way lower. | ||
s = 1 ./ (1 + exp(-x)); | ||
release_rates = (1 - state.reservoirs) .* s; % z = w*s | ||
|
||
% Smooth once with LPF (receptor potential was already smooth): | ||
state.lpf_state = state.lpf_state + coeffs.lpf_coeff * ... | ||
(coeffs.a2 .* release_rates - state.lpf_state); % this is firing probs. | ||
firing_probs = state.lpf_state; % Poisson rate per neuron per sample. | ||
% Include number of effective neurons per channel here, and interval T; | ||
% so the rates (instantaneous action potentials per second) can be huge. | ||
firings = coeffs.n_fibers .* firing_probs; | ||
|
||
% Feedback, to update reservoir state q for next time. | ||
state.reservoirs = state.reservoirs + coeffs.res_coeff .* ... | ||
(coeffs.a1 .* release_rates - state.reservoirs); | ||
|
||
% Make an output that resembles ihc_out, to go to agc_in. | ||
syn_out = (coeffs.n_fibers .* (firing_probs - coeffs.spont_p)) * coeffs.agc_weights; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is a macos fragment and I don't think it belongs here.