Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issues with demo_seeded_CNMF #1467

Open
pgunn opened this issue Feb 12, 2025 · 6 comments
Open

Issues with demo_seeded_CNMF #1467

pgunn opened this issue Feb 12, 2025 · 6 comments

Comments

@pgunn
Copy link
Member

pgunn commented Feb 12, 2025

Two issues:

  1. Right now the notebook saves a temporary file it makes, in the step "Now apply shifts to functional channel", to the notebooks directory rather than the temp directory (this is in mc.apply_shifts_movie() )

This needs to be changed to save in the tmp/ directory so later code in the notebook can find it.

  1. Right now the notebook references a file that the person who contributed it (in 2019) did not add to the codebase, looking for it in a particular path specific to their Mac.
@pgunn pgunn changed the title Issue with demo_seeded_CNMF Issues with demo_seeded_CNMF Feb 20, 2025
@pgunn
Copy link
Member Author

pgunn commented Feb 20, 2025

The second issue may be fairly difficult to fix without a replacement dataset.

I'm addressing the first with a revision to caiman.paths.memmap_frames_filename() to have it by default generate paths that are in $CAIMAN_TEMP (which defaults to $CAIMAN_DATA/temp)

@pgunn
Copy link
Member Author

pgunn commented Feb 20, 2025

@Hendriela By any chance do you still have the avg_mask_fixed.png you were using when developing this? (I know it's unlikely, but I figure it can't hurt to ask)

@Hendriela
Copy link
Contributor

Hey Pat, nice to hear from you 🥳 I hope that you are doing well, cool that you are still working on Caiman!
I did some digging through my trusted laptop (that is still going strong), and found this.
The PNG has the correct file name on my system, could this be what you are looking for?

Image

I am having trouble seeing the context of where you need the file, but I have still a bunch of those reference files and FOV PNGs, so let me know if this is correct or you need something else.

@pgunn
Copy link
Member Author

pgunn commented Feb 21, 2025

That's probably the right thing.

The demo_seeded_cnmf notebook, which you committed many years ago, references the file including the path to it on your Mac:

https://github.com/flatironinstitute/CaImAn/blob/main/demos/notebooks/demo_seeded_CNMF.ipynb

See the cell under "Identify individual features"; the lines are:

# load binary mask
mask = np.asarray(imread('/Users/hheiser/Desktop/testing data/file_00020_no_motion/avg_mask_fixed.png'), dtype=bool)

I'll add this to the datasets available for that notebook so people will have the option to use it with the sample data you provided in the notebook. Thanks!

@Hendriela
Copy link
Contributor

Few things are worse than looking at my own code from 6 years ago...

@pgunn
Copy link
Member Author

pgunn commented Feb 21, 2025

Happens to all of us. I've been working on cleaning and improving the codebase for a long time now and I'm still finding new regrets over my old code.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants