Schroeder-Lab / Data

For pre-processing raw data (two-photon, ephys, bonsai, ...) and loading/saving data.
0 stars 3 forks source link

Cell locations #24

Closed mariacozan closed 1 year ago

mariacozan commented 1 year ago

Note that the locs array in the results dictonary (the output from _process_s2p_singlePlane) has the format [Y,X, Z] which is the direct output from suite2p. This is not a major issue, but must be kept in mind when locating the cells in the FOV like this: image This was produced by plotting the X (second column) vs Y (first column) coordinates onto the reference image:

plt.imshow(refImg)
plt.scatter(locs[:,1], locs[:,0], c = "red")

which matches well with the cell locations seen within suite2p: image

I suggest that swapping the columns for X and Y in the locs array to avoid any potential confusion.

Data shown here is from Glaucus/2022-08-10/plane1.

liadJB commented 1 year ago

The reason for Y,X is that that's how arrays work and if one tries to plot X,Y and immediately understand where cells are it will cause more confusion. I would rather stay with Y,X