@@ -10,21 +10,27 @@ using PhysiologyAnalysis
1010
1111
1212# ╔═╡This task is for extraction of points, centroids, and ROIs using cellpose
13- img_fn = raw " F:\D ata\T wo Photon\2 025-05-02-GRAB-DA-nirCAT-STR\g rab-nircat-str-kpuff_3x012.tif"
14- stim_fn = raw " F:\D ata\P atching\2 025-05-02-GRAB-DA-STR\2 5502017.abf"
13+ # Kpuff looks really good
14+
15+ # #We should look through the available files and see which ones fit
16+ # img_fn = raw"F:\Data\Two Photon\2025-05-02-GRAB-DA-nirCAT-STR\grab-nircat-str-20hz-100uA001.tif"
17+ # stim_fn = raw"F:\Data\Patching\2025-05-02-GRAB-DA-STR\25502000.abf"
18+
19+ # Good but a big bubble
20+ # img_fn = raw"F:\Data\Two Photon\2025-05-02-GRAB-DA-nirCAT-STR\grab-nircat-str-3s_20hz_30uA_3x006.tif"
21+ # stim_fn = raw"F:\Data\Patching\2025-05-02-GRAB-DA-STR\25502007.abf"
1522
16- # We should look through the available files and see which ones fit
17- img_fn = raw " F:\D ata\T wo Photon\2 025-05-02-GRAB-DA-nirCAT-STR\g rab-nircat-str-20hz-100uA001.tif"
18- stim_fn = raw " F:\D ata\P atching\2 025-05-02-GRAB-DA-STR\2 5502000.abf"
23+ img_fn = raw " F:\D ata\T wo Photon\2 025-05-02-GRAB-DA-nirCAT-STR\g rab-nircat-str-kpuff011.tif"
24+ stim_fn = raw " F:\D ata\P atching\2 025-05-02-GRAB-DA-STR\2 5502015.abf"
1925
20- # We should look through the available files and see which ones fit
21- img_fn = raw " F:\D ata\T wo Photon\2 025-05-02-GRAB-DA-nirCAT-STR\g rab-nircat-str-20hz-100uA001 .tif"
22- stim_fn = raw " F:\D ata\P atching\2 025-05-02-GRAB-DA-STR\2 5502000 .abf"
26+ # %%
27+ img_fn = raw " F:\D ata\T wo Photon\2 025-05-02-GRAB-DA-nirCAT-STR\g rab-nircat-str-kpuff_3x012 .tif"
28+ stim_fn = raw " F:\D ata\P atching\2 025-05-02-GRAB-DA-STR\2 5502017 .abf"
2329
2430data2P = readImage (img_fn);
2531deinterleave! (data2P) # This seperates the movies into two seperate movies
2632
27- spike_train = true
33+ spike_train = false
2834if spike_train
2935 # If we have a electrical stimulus we need to do the spike train analysis
3036 addStimulus! (data2P, stim_fn, " IN 3" , flatten_episodic = true , stimulus_threshold = 0.5 )
3541 addStimulus! (data2P, stim_fn, " IN 2" , flatten_episodic = true )
3642 time2P = data2P. t
3743end
44+ getStimulusProtocol (data2P)
3845
3946# Split the image into 8x8 pixel ROIs
4047pixel_splits_roi! (data2P, 8 )
@@ -62,11 +69,18 @@ println("Found $(length(sig_rois)) significant ROIs")
6269fit_params = get_fit_parameters (roi_analysis)
6370println (" Mean amplitude of significant ROIs: " , mean (first .(fit_params)))
6471
65- fig = plot_roi_analysis (data2P, stim_idx = 2 )
66- display (fig)
67-
68-
6972# %% Test the new simple analysis plot function
7073PhysiologyPlotting. __init__ ()
7174fig_raw = PhysiologyPlotting. plot_analysis (data2P)
72- display (fig_raw)
75+ # display(fig_raw)
76+
77+ # %%
78+ # Save the raw analysis figure
79+ save (raw " F:\D ata\A nalysis\S triatumAnalysis\P otassium Puffs\f ig_raw.png" , fig_raw)
80+
81+ # %%
82+ fig = plot_roi_analysis (data2P, stim_idx = 2 )
83+ display (fig)
84+
85+ # Save the ROI analysis figure
86+ save (raw " F:\D ata\A nalysis\S triatumAnalysis\P otassium Puffs\f ig_roi_analysis.png" , fig)
0 commit comments