Required: data , N neuron centers, number of iterations and I |
1: successively take mean of e.g. 30 frames ⊳ operate on decimated data |
2: initialize centers using greedy (or group lasso) method from [8] |
3: downscale spatially using local mean: |
4: generate patches around centers |
5: initialize spatial background as 20% percentile, neural shapes as Gaussians within patch: |
6: initialize temporal background as , neural activities as data at centers: |
7: fori = 1, …, do |
8: ← HALSactivity() |
9: ← HALSshape() |
10: initialize activities as mean of for each neuron ⊳ back to full data |
11: initialize shapes by zero-order-hold upsampling of |
12: generate patches P |
13: fori = 1, …, Ido |
14: C ← HALSactivity(Y, A, C, 5) ⊳ note the increased inner iterations |
15: A ← HALSshape(Y, A, C, P, 5) |
16: denoise C using OASIS [18] |
17: returnA, C |
1: function HALSactivity(Y, A, C, I = 1) |
1: function HALSshape(Y, A, C, P, I = 1) |
2: U = A⊤Y |
2: U = CY⊤ |
3: V = A⊤A |
3: V = CC⊤ |
4: fori = 1, …, Ido |
4: fori = 1, …, Ido |
5: forn = 1, …, Ndo |
5: forn = 1, …, N + 1 do |
6: |
6: |
7: |
7: |
8: returnC |
8: returnA |