Wire-free Miniscope v4: Difference between revisions

Fsangiul (talk | contribs)
Added info on the scan
Fsangiul (talk | contribs)
Zscan feature info added
 
Line 229: Line 229:
</syntaxhighlight>The '''ewlStart''' and '''ewlStop''' are the first and last plane, respectively. The minimum value for the first plane is 0, and the maximum for the last plane is 255. The '''ewlStep''' defines the granularity, and the '''ewlStepTime''' how much time it will record at each plane. In the settings above, the recording will record 2 seconds on each plane on a span from 10 to 250, with a granularity of 5 planes. Once the settings are chosen, run the notebook as usual to write the settings on the microSD card and follow the steps to start recording.  
</syntaxhighlight>The '''ewlStart''' and '''ewlStop''' are the first and last plane, respectively. The minimum value for the first plane is 0, and the maximum for the last plane is 255. The '''ewlStep''' defines the granularity, and the '''ewlStepTime''' how much time it will record at each plane. In the settings above, the recording will record 2 seconds on each plane on a span from 10 to 250, with a granularity of 5 planes. Once the settings are chosen, run the notebook as usual to write the settings on the microSD card and follow the steps to start recording.  


To show how the Z-scan recording works, we are going to perform a short recording of a resolution slide and we are going to explain the steps to choose the best imaging plane.  
To show how the Z-scan recording works, we are going to perform a short recording of a resolution slide and we are going to explain the steps to choose the best imaging plane. Once the recording is done, the data gets extracted the same way as explained in the previous section. 
[[File:V4 Wire-free resolution slide.gif|border|center|frameless|304x304px]]
[[File:V4 Wire-free resolution slide.gif|center|304x304px|thumb|v4 Wire-Free performing a Z-scan of a resolution slide (compressed and sped up three times for demonstration purposes).]]Recalling the previous section, once the video has been decoded a CSV file gets generated with the header information. The last column holds the plane value for each frame:
* update the repo, if necessary
[[File:V4WF header scan.png|center|frameless|700x700px]]
* change the flag on the "set recording parameters" notebook
To match the frame number to the EWL value we can use [https://fiji.sc/ FIJI]. Once FIJI is open, load the video. It's very important to load all the frames, like shown in the screenshot below
* Select the step features (granularity, time on each step, limits)
[[File:V4 WF FIJI.png|center|thumb|FIJI dialog for opening a video.]]
* Record as usual
Scroll through the video until the image gets focused. On the top left you will find the corresponding frame
* Run the "save video" notebook
[[File:Screenshot 2024-03-21 at 8.41.53 PM.png|center|thumb|FIJI window showing the frame number on the top left]]
* Open the generated csv file and the video on FIJI *without removing any frame*
Going back to the timestamp CSV file, we go to the frame number 603 and check the last column (EWL) value.
* On FIJI, move the slider to check the saved video
[[File:EWL value.png|center|frameless|600x600px]]
* Show how to see which frame are we
Now that the best EWL value has been chosen, the recording can be done as usual. To do this, set the Z-scan flag to False<syntaxhighlight lang="python3">
* Once a frame has been chosen, go to the csv file and check which EWL it has
#v4 Miniscope mode
* To record as normal, set the scan flag to false
 
MINISCOPE_SCAN_MODE = False
</syntaxhighlight>


== MCU Firmware Walkthrough ==
== MCU Firmware Walkthrough ==