kushalkolar / MESmerize

Platform for Calcium Imaging analysis. DEPRECATED.
GNU General Public License v3.0
58 stars 14 forks source link

fix the edge artifact problem with correlation plot #92

Closed EricThomson closed 9 months ago

EricThomson commented 2 years ago

Fix for issue 62:
https://github.com/kushalkolar/MESmerize/issues/62

Basically, set bord_px to 0. I have been manually doing this with every install of mesmerize for a while, and it seems to cause no problems. Most importantly, the correlation/pnr plots look very good (otherwise, the artifact can overwhelm them, making it hard to estimate the parameters needed for the next step).

Tested on Windows.

kushalkolar commented 2 years ago

According to the demo they use a bord_px value after motion correction, I have to look into it a bit more. https://github.com/flatironinstitute/CaImAn/blob/master/demos/notebooks/demo_pipeline_cnmfE.ipynb

BTW, can you checkout mesmerize/plotting/widgets/colormaps/spectral.png from master, it seems to be replaced with another cmap for some reason.

EricThomson commented 2 years ago

Good point. Let me think of a finer grained way to handle that. That is a bit of a sledgehammer and it does change it from the demo. I haven’t found any effect of border pix param so just set to 0 but people may not like that. Will get to this tonight.

EricThomson commented 2 years ago

Ok I went in with a scalpel this time going for minimal changes: I left the border_px bits in for cnmfe, and only changed the border pix to zero only for the corr_pnr batch instances. This is what I should have done initially! Tested it and no artifact for the visualization so it works as intended.