jovo / oopsi Goto Github PK
View Code? Open in Web Editor NEWup-to-date code for model-based inference of spike trains from calcium imaging
License: Apache License 2.0
up-to-date code for model-based inference of spike trains from calcium imaging
License: Apache License 2.0
Nice code! I was trying to do parameter estimation using fast_oopsi, and I found that the likelihood oscillates if I try to estimate the baseline flourescence.
A minimum working example:
V = struct();
V.dt = 0.03
V.est_sig = 1;
V.est_lam = 1;
V.est_gam = 1;
V.est_a = 1;
V.fast_ignore_post = 1;
V.fast_iter_max = 100;
V.fast_plot = 1;
%The critical line
V.est_b = 1;
fast_oopsi(ones(1, 10000), V);
The problem appears to be in estimating b --- if we set V.est_b=0
, then the oscillations disappear.
Hi Joshua,
Could you provide the real calcium trace data that you used for your papers please?
Thanks.
oopsi/demo.m, Line 12:
P.lam = 0.1; % firing rate = lam*dt
Here, I believe the comment should be "firing rate = lam/dt".
To avoid confusion, it may be better to substitute P.lam with P.fr, and use lam exclusively for the expected number of spike counts for each time bin (dt).
I have been trying to quantify spontaneous Ca recordings in the Olfactory bulb, when i came across your very attractive code on Github, fast-oopsi.
As I am new to the concept of spike deconvolution, i tried to include my traces in a Matlab matrix (a modification to your demo.m is attached), but i get an error:
"Undefined function or variable "C1.
Error in fast_oopsi/est_MAP (line 306)
C = C1; % update C
Error in fast_oopsi (line 166)
[n C posts(1)] = est_MAP(F,P);
Error in oopsie_test (line 35)
[data(l).Nhat data(l).Phat] = fast_oopsi(F2,V,P);"
As suggested, I have tried passing each time-series as a vector on its own, but the same error persists.
Could you please help me figure out the problem. Thanks a lot in advance.
Highly obliged for your kind attention
Regards,
Soham
I can't seem to find out and the mystery is killing me
Adding Hill_v1 from https://github.com/jovo/smc-oopsi/tree/master/code/functions will help a bunch!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.