Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
653ffc9
first commit :boom: :pray:
the-moliver Aug 26, 2017
59dfb55
spike deconvolution can now be used for STA :boom: :boom:
the-moliver Aug 26, 2017
08615a5
return field for cell specimen ids :muscle:
the-moliver Aug 27, 2017
9945041
incorporating natural scenes seemed to easy :pray:
the-moliver Aug 27, 2017
e339ecd
bug fixes for natural scenes :pray:
the-moliver Aug 27, 2017
4ed5cf5
use correct warp function for natural scenes :shit:
the-moliver Aug 27, 2017
3b09f0d
get mask cutout and fix nasty bug in sta :boom:
the-moliver Aug 27, 2017
67d9956
bug fixes for working sta :pray: pray: :boom:
the-moliver Aug 29, 2017
e2022e4
keras generator :boom: :boom:
the-moliver Aug 30, 2017
9ba13f0
add l0 methods…slightly different calling method now
jewellsean Aug 30, 2017
aaa6c73
Merge branch 'master' of https://github.com/jewellsean/swdb_2017_tools
jewellsean Aug 30, 2017
74e07bb
Merge branch 'master' of https://github.com/AllenInstitute/swdb_2017_…
jewellsean Aug 31, 2017
cb3b943
add matrix similarity test
jewellsean Sep 1, 2017
1c2ddb4
change order of smooth and Z transform
jewellsean Sep 1, 2017
5d16a4a
standardize, smooth, standardize
jewellsean Sep 1, 2017
b2e50d0
shallow copy added
jewellsean Sep 1, 2017
404fec5
copies
jewellsean Sep 1, 2017
7db14c6
try nparray copy
jewellsean Sep 1, 2017
3b716e4
remove defaults
jewellsean Sep 1, 2017
2e41f02
remove initial standardization
jewellsean Sep 1, 2017
e6058f6
correlated measure bootstrap
jewellsean Sep 1, 2017
d557141
update to non signal processing function
jewellsean Sep 1, 2017
7343c7b
index out of list
jewellsean Sep 1, 2017
2830654
index out of corr
jewellsean Sep 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions projects/deconvolution-inference/ca_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import event_detection as ed

def ca_deconvolution(ddf_trace):
def ca_deconvolution(ddf_trace, l0 = False):
""" perform calcium image deconvolution

This function performs several calcium image
Expand All @@ -11,7 +11,7 @@ def ca_deconvolution(ddf_trace):

1. OASIS (https://github.com/j-friedrich/OASIS)
2. Event detection script from Peter

3. AR-FPOP

input:
ddf_trace: a 1d-numpy array of length n (the number of
Expand All @@ -26,7 +26,6 @@ def ca_deconvolution(ddf_trace):

Add functionality for the following methods

3. AR-FPOP
4. ML Spike
5. One of the supervised methods?

Expand All @@ -45,6 +44,17 @@ def ca_deconvolution(ddf_trace):
tmp[times_new] = heights_new
out['event_detection'] = tmp

# Method 3 FastLZeroSpikeInference
if (l0):
import arfpop_ctypes as af

# Some default parameters that need to be tuned!
gam = 0.99
penalty = 0.25
constraint = False

ar_fit = af.arfpop(ddf_trace, gam, penalty, constraint)
out['arfpop'] = ar_fit['pos_spike_mag']

return out

Expand Down
Loading