Abstract
Observing the activity of large populations of neurons in vivo is critical for understanding brain function and dysfunction. The use of fluorescent genetically-encoded calcium indicators (GECIs) in conjunction with miniaturized microscopes is an exciting emerging toolset for recording neural activity in unrestrained animals. Despite their potential, current miniaturized microscope designs are limited by using image sensors with low frame rates, sensitivity, and resolution. Beyond GECIs, there are many neuroscience applications which would benefit from the use of other emerging neural indicators, such as fluorescent genetically-encoded voltage indicators (GEVIs) that have faster temporal resolution to match neuron spiking, yet, require imaging at high speeds to properly sample the activity-dependent signals. We integrated an advanced CMOS image sensor into a popular open-source miniaturized microscope platform. MiniFAST is a fast and sensitive miniaturized microscope capable of 1080p video, 1.5 µm resolution, frame rates up to 500 Hz and high gain ability (up to 70 dB) to image in extremely low light conditions. We report results of high speed 500 Hz in vitro imaging of a GEVI and ∼300 Hz in vivo imaging of transgenic Thy1-GCaMP6f mice. Finally, we show the potential for a reduction in photobleaching by using high gain imaging with ultra-low excitation light power (0.05 mW) at 60 Hz frame rates while still resolving Ca2+ spiking activity. Our results extend miniaturized microscope capabilities in high-speed imaging, high sensitivity and increased resolution opening the door for the open-source community to use fast and dim neural indicators.
Main
Miniaturized microscopes used for in vivo neural recordings in small animals allow the activity of large populations of neurons to be visualized during the naturalistic behaviors that are critical to studying how underlying neural circuits guide learning, behavior and decisions1,2,3. Development of miniaturized microscope technology has been rapid, with versions aimed at various applications such as wireless recording4,5,6, wide-field imaging7, optogenetic stimulation 8, volumetric imaging9, dual hemisphere imaging10, and audio triggered recording 4. Yet, limitations exist in frame rates, sensitivity, and resolution of the image sensors currently used.
Most miniaturized microscope technologies, use frames rates of 30 Hz or less, with the maximum reported being 60 Hz (Supplementary Table 1). Imaging genetically-encoded calcium indicators (GECIs) at frame rates of 30 Hz is adequate for many studies which are only concerned with slower Ca2+ dynamics. However, for applications such as transient detection11 or real-time processing, faster frame rates provide a distinct advantage in resolving the ∼40-ms rise times of the calcium transients 12 with high temporal precision and low latency. Moreover, in experiments aimed at studying fast network oscillations such as sharp wave ripples, 13 higher frame rates are necessary to capture faster frequency responses of the population dynamics. GECI GCaMP6f versions are the fastest neural indicator reported with miniaturized microscopes (Supplementary Table 1). However, using even faster neural indicators, such as genetically-encoded voltage indicators (GEVIs), would allow neural imaging experiments to resolve neural activity at the timescales of electrophysiology while retaining imaging advantages in non-invasiveness, genetic-specificity, and stability of interface. To take advantage of these benefits, miniaturized microscope frame rates will need to match these fast temporal kinetics (< 10 ms in some GEVI versions 14,15) requiring significant increases in frame rates (> 200 Hz).
Another important factor is the image sensor’s ability to image dim neural indicators. Due to the inherent tradeoff between exposure time and frame rate, imaging at faster frame rates results in reduced image brightness. When imaging fluorescent indicators such as GECIs and GEVIs, a higher signal can also be achieved by increasing the excitation light power, but this has the downside of increasing photobleaching of the fluorophores and potentially photodamaging tissue. The severity of photobleaching, linked to the excitation light power13,16,17,18,19, reduces the fluorescence signal over time and limits the experimental imaging time length. Thus, improvements in low-light imaging could allow for a reduction of excitation light power while still capturing images bright enough to detect optical activity. All other things being equal, the image sensor with maximum sensitivity, and to a lesser extent pre-digitization gain, will maximize performance.
While many miniaturized microscopes use a similar set of optics, most available miniaturized microscopes use image sensors with pixel resolutions of only 0.5 megapixels and pixel sizes > 3 µm. While the resolution in these systems is constrained by the sensor pixel sizes rather than the optics, designers have largely settled on image sensors with larger pixel sizes to increase sensitivity. Additionally, the total pixel samples in an FOV is dictated by the image sensor pixel density and pixel size. Consequently, increasing the pixel density with smaller pixel sizes, would provide a greater number of samples between anatomical features and improve segmentation analysis to differentiate anatomical structure overlap.
To meet the design challenges of increased frame rates, sensitivity, and resolution, we designed a new open source miniaturized microscope that integrated a Sony STARVIS back-sided illumination CMOS image sensor into our custom designed imaging PCB (Fig. 1, Supplementary Fig. 1, Supplementary Table 2). The result is MiniFAST, a fast and sensitive open-source miniaturized microscope module that provides imaging frame rates up to 500 Hz and an excellent sensitivity/gain ability (up to 70 dB) to image in low signal environments. ompared to other miniaturized microscopes, MiniFAST’s image sensor has 8 times faster frame rates and 4 times greater resolution over other 0.5 M pixel microscopes3,4,8,9,20,21,22 (Fig. 1c). While frame rates of 30 Hz or less have a full 1080p resolution (1920 x 1080 pixels), the image sensor can achieve faster frame rates by imaging subregions of the sensor (ex. 1920 x 55 pixels for 500 Hz). Moreover, the image sensor’s small pixel size of 2.9 µm provides increased spatial resolution when combined with optical lens sets typically used in miniaturized microscopes.
MiniFAST’s image sensor PCB and optical housing (Fig. 1a-b) builds on the V3.2 UCLA Miniscope3, a popular open-source miniaturized miniscope platform, and is compatible with its existing data acquisition module and user GUI. Although MiniFAST’s image sensor PCB can still mate to the V3.2 Miniscope housing, we also designed a custom 3-D printed MiniFAST housing and baseplate which uses keyed locks and magnets to create a quick mating connection. We have found this design significantly reduces animal handling time compared to the V3.2 Miniscope attachment method. Other aspects of MiniFAST’s optical housing are the same as the V3.2 Miniscope incorporating the same optical lens/filter set and manual focus slider. The weight of the MiniFAST module including the image sensor PCB, optical housing, optics, and LED is 3.45 grams and is comparable to the V3.2 Miniscope’s weight of 3.2 grams.
To compare the resolutions of the V3.2 Miniscope and MiniFAST, a resolution test was performed using a USAF 1951 high resolution test target (Edmund Optics #55622) (Fig. 1d). Using the same set of optics, similar frame rates and gain settings, MiniFAST (2.9 µm/pixel) resolved line pairs down to Group 9, Element 3 (645.1 line pairs/mm) and showed an increase in contrast across all Group 8 and Group 9 elements when compared to the V3.2 Miniscope (6 µm/pixel). Binning with a 2×2 average format of the image taken with MiniFAST reveals a similar resolution to the V3.2 Miniscope, demonstrating the increased resolution is achieved by MiniFAST’s decreased pixel size (Supplementary Fig. 2).
To evaluate neural imaging in live mice, after injection of adeno-associated viruses (AAV), we imaged 2 mice transiently expressing the calcium indicator GCaMP6f12 in excitatory neurons in the CA1 region of the hippocampus (Supplementary Video 1 and 2). In one of the mice, during a 17-minute exploration session, we imaged over 100 neurons and detected the expected spatial tuning (Fig. 2, Supplementary Fig. 3). Our novel design was stable over a 2-hour exploratory imaging session (Supplementary Fig. 4) and over month-long periods (Supplementary Figs. 5 and 6) verifying the integrity of the quick-lock baseplate and surgical attachment methodology.
Next, in order to test MiniFAST’s ability to image fast and dim neural indicators such as genetically-encoded voltage indicators (GEVIs), we imaged patch clamped HEK293T cells transfected with the GEVI ACE2N-mNeon15 (Fig. 3a). During 500 Hz imaging sessions with MiniFAST, using a voltage-clamp mode, we electrically evoked a voltage step of −70 mV to +40 mV for pulse widths of 2 and 5-ms at 10 and 50 Hz to produce fluorescence transients. A comparison of electrical recordings with optical recordings revealed that MiniFAST reproduced the induced pulse trains (Fig. 3c-h). Importantly, even at stimulation pulse widths of 2-ms at 50 Hz, each pulse was still detectable with an average peak ΔF/F of −3.8% (Fig. 3h).
Transgenic Thy1-GCaMP6f GECI mice are broadly used, providing stable expression of GECIs in pyramidal neurons over long time scales without the necessity of viral injections24. One potential drawback is that neurons in the Thy1-GCaMP mice typically display dimmer and faster fluorescence signals compared to those generated using viral transfection13,24. To further assess MiniFAST’s ability to resolve activity of dim neural indicators, we imaged CA1 neurons of a Thy1-GCaMP6f GP5.17 mouse exploring an open field at frame rates of 30, 60, 100, 200 and 293 Hz (Fig. 4). Per image sensor specifications, faster frame rates were achieved by decreasing window sizes. The window was positioned over the same cell for the 30, 60, 100, and 200 Hz sessions. However, a nearby region with more active cells was used for the 293 Hz traces where 3 distinct cells were identified in the FOV (Fig. 4a-5). Even with a dim signal, MiniFAST resolved Ca2+ activity of the cells at each frame rate including 3 cells at the 293 Hz frame rate. Although, the slower dynamics of the Ca2+ activity was captured at frames rates as low as 30 Hz, imaging at higher frame rates revealed faster Ca2+ signal kinetics and provided an increased number of data samples for the onset of calcium events. Illustrating the importance of the number of data samples in Ca2+ transient edge detection, imaging with a frame rate of 293 Hz over 150 ms time period provides 43 data samples with a 3.4ms time interval versus only 5 data samples with a 33 ms time interval for a 30 Hz frame rate (Fig. 4d).
Since MiniFAST has the ability to image at fast frame rates in low light conditions, we wanted to evaluate whether imaging with high gain settings and low excitation light values could help reduce photobleaching effects while still being able to track Ca2+ activity at frame rates of 60 Hz. To understand how the excitation light power influences photobleaching, we continuously imaged a Thy1-GCaMP6f GP5.17 mouse over two 20-minute open field sessions where one session used a very low excitation light power of 0.05 mW and the other session used a higher excitation light power of 0.9 mW (Fig. 5a). Plotting the average fluorescence over the image FOV, the normalized fluorescence was impacted minimally for the extremely low power setting of 0.05 mW and decreased by ∼5% for the higher excitation light power of 0.9 mW. To examine this effect in depth, over a total period of 6 days, we performed 5-minute imaging sessions each day (n = 4 mice) with sessions of 0.05 mW and 0.9 mW excitation light power settings (Fig. 5b). For each session, the difference of the average fluorescence of the first and last minute was calculated. Although there was some variation in the day to day changes, higher excitation light power generally resulted in a significantly greater decrease in the fluorescence signal (p < 0.05 ANOVA, F (1, 3) = 6.7, p = 0.02). Next, we analyzed activity across a 0.9 mW excitation light session (58 cells) (Fig. 5c, e) and a 0.05 mW excitation light session (60 cells) (Fig. 5d, f) and found 30 cell ROIs active in both sessions. Importantly, analysis of the Ca2+ activity revealed calcium spiking events are still clearly detectable in the low 0.05 mW excitation light power imaging sessions (Fig. 5f).
Overall, MiniFAST was designed to provide the open-source research community a miniaturized microscope capable of high-speed imaging (up to 500 Hz), high sensitivity to image in dim conditions (gain up to 70 dB) and increased resolution (1920 x 1080 pixels and a 2.9 µm pixel size). To our knowledge, we have been the first to demonstrate use of a miniaturized microscope to image GEVI kinetics at frame rates of 500 Hz, resolving 2 ms duration voltage pulses at 50 Hz (in vitro, Fig. 3). Additionally, we are the first to demonstrate in vivo imaging using a miniaturized microscope at frame rates of ∼300 Hz while resolving Ca2+ activity with dim signals from a Thy1-GCaMP6f transgenic mouse exploring an open field (Fig. 4). Finally, also with Thy1-GCaMP6f mice exploring an open field, we have shown the potential of using ultra-low excitation power settings (0.05 mW) to reduce the severity of photobleaching while still resolving Ca2+ activity at 60 Hz frame rates (Fig. 5).
While photobleaching is a widely recognized phenomenon, the precise kinetics in GECI imaging experiments is not completely understood. Consequently, while our photobleaching experimental results support the downward fluorescence trend typical to photobleaching, more advanced in vivo studies could lead to better photobleaching mitigation strategies. How photobleaching affects bound and unbound fluorophores has not been measured, nor has the effect of differential bleaching of signal (i.e., somatic activity-dependent fluorescence) and noise (either extra-somatic fluorophores or other intrinsic fluorescence). Understanding these effects would give insight into the extent to which variability in photobleaching across animals and sessions is attributable to differences in behavior / neural activity versus protein degradation, and improve our ability to design robust microscopy experiments which measure neural activity over very extended periods.
Looking to the future, practically using miniaturized microscopes for in vivo imaging of GEVIs or other neural indicators with kinetics closely matching action potentials could benefit from further developments in miniaturized microscopes. While we showed it is possible to image a few cells at high frame rates, it would be ideal to record from a larger population of cells. Also, available GEVIs are still prone to severe photobleaching14 which reduces feasibility in long imaging sessions. Another potential use of MiniFAST is to image emerging bioluminescent indicators which are promising because they eliminate the problems of autofluorescence and photobleaching that occurs in fluorescent indicators but are significantly dimmer than GECIS in current versions25,26. Nevertheless, we expect advancements in image sensor technology and protein engineering will continue to provide new capabilities in miniaturized microscopes.
Methods
MiniFAST imaging sensor module and software
MiniFAST is based on a previously described popular open-source miniscope platform, V3.2 Miniscope3, and consists of a custom designed image sensor PCB, a modified optical housing and microscope baseplate. With updated software, MiniFAST’s image sensor PCB is compatible with the existing miniscope data acquisition board (DAQ) and Window’s based GUI. MiniFAST’s CMOS image sensor (Sony IMX290LLR), was chosen for its ability to achieve the design goals of increased resolution, frame rates and sensitivity. As in the previous design, the image sensor PCB design incorporates a single coax cable for power, image sensor data and commanding as well as one additional small wire to externally power the onboard light excitation LED. Powering the LED externally reduces excitation light flicker due to the increased current draw of the image sensor. The external power supply of 4 V requires a small modification to the DAQ board. MiniFAST’s image sensor PCB weighs 2 g compared to 1.7 g for the image sensor PCB of the original system.
The MiniFAST optical housing is similar in design to the V3.2 Miniscope’s optical housing and both incorporate the same achromatic lens, filter sets, excitation LED, half ball lens and GRIN Lens. As before, the focus depth is adjustable by manually sliding the microscope housing. However, MiniFAST’s optical housing is 3-D printed and we have found using the Formlabs Form2 black resin to be the least auto-fluorescent in our imaging wavelengths as previously reported4. MiniFAST also incorporates a larger base to accommodate the larger image sensor size and includes a quick lock baseplate. Importantly, the microscope quick lock base, also 3-D printed, does not require any additional set screws to mate to the optical housing. The mating of the optical housing and the quick lock base uses keyed locks and magnets to hold the microscope firmly in place. This new design results in reduced animal handling time and the need for animals to be anesthetized when following handling techniques previously set forth by Gouveia et al.27. Moreover, MiniFAST’s optical housing, lens set, filter set, LED and baseplate weighs 1.6 g compared to 1.95 g for the original system. The set of filters used during the imaging experiments was the following: excitation filter (Chroma ET470/40x), dichroic mirror (T495lpxr), and emission filter (ET525/50m). Also, the optical set included a half-ball lens (Edmund Optics #47-269), one achromatic lens from the following set (10mm - Edmund Optics #45-207, 15mm - Edmund Optics #45-207, 20mm - Edmund Optics #45-208), and a GRIN lens (Edmunds Optics part numbers noted in text).
The V3.2 Miniscope DAQ firmware and Windows GUI have been updated to integrate the new image sensor’s features such as increased gain, frame rate, black offset, and window position. As before, the GUI supports the ability to simultaneously sync frames of both the microscope and a behavior camera as well as to create a synced 1-ms resolution timestamp file. Notably, during the patch clamp in vitro testing with frame rates up to 500 Hz, the timestamp file accurately aligned the video frames to the timing of the patch clamp voltage pulses.
In vitro whole-cell patch clamp
MiniFAST setup
A 0.2 mm working distance (WD) GRIN lens (1.8 mm diameter, 4 mm length, Edmund Optics part #64-520) was secured to a MiniFAST baseplate with superglue and attached to a MiniFAST microscope. The microscope was then connected to a micromanipulator with an in-house designed 3-D printed bracket. The microscope and micromanipulator setup were positioned so that the GRIN lens of the microscope was directly under an in vitro cell recording chamber. For each patch clamp session, cells were loaded into the recording chamber. The microscope was then focused onto the cells through fine position control using the micromanipulator. An external lamp provided the light source for the brightfield images. MiniFAST’s onboard LED provided the excitation light during fluorescent imaging. To initially find the cells in the field-of-view (FOV), MiniFAST was set to use a full frame (1920 x 1080 pixels), a low frame rate of 10 Hz and an excitation light of ∼1 mW. After a cell was patched, the microscope settings were changed to the decreased window size required by the faster frame rate (1800 x 55 pixels @500 Hz) and the window was positioned to include the cell in the FOV. Then, while pulse voltage trains were delivered through the patch clamp, the cell was imaged at 500 Hz, gain 36 dB, and excitation light of 3.4 mW.
Cell culture preparation
The plasmid ACE2N-mNeon15 was a gift from the Francois St. Pierre lab. HEK293T cells obtained from ATTC were replated on 24 well plates prior to transfection. The cells were transfected using Lipofectamine 2000 Transfection Reagent (Invitrogen) following the manufacturer’s recommendations. Briefly, for each well, 1 ug of plasmid DNA was combined with 1 uL of Lipofectamine 2000 in 50 uL OptiMEM, incubated at room temperature for 20 minutes, and added to 70% confluent HEK293T cells. The plasmid bearing the coding sequence for ACE2N-mNeon under a CMV promoter were purified using ZymoPURE™II Plasmid Midiprep Kit.
Electrophysiology
The cells were held in a recording chamber filled with extracellular recording buffer (in mM: 145 NaCl, 5 KCl, 3 MgCl2, 10 HEPES and 1 CaCl2; pH 7.2; adjusted to 320 mOsm with sucrose). Glass patch pipettes (resistance of 3 to 5 MΩ) were filled with intracellular buffer (in mM: 140 KCl, 10 HEPES and 0.5 EGTA; pH 7.2; adjusted to 320 mOsm with sucrose) and contacted the cell membrane to generate seals ≥ 1 GΩ. For the whole cell configuration, a negative pressure of −70 mmHg was applied inside the pipettes until the cell membrane ruptured. An Axopatch 700 A recorded currents under voltage clamp conditions. The recorded current was filtered at 10 kHz and digitized at 2 kHz using a Digidata 1550 (Molecular Device). For voltage pulses, the cell’s holding potential was set at −70 mV and increased to +40 mV with 2-ms and 5-ms pulse durations at frequencies of 10 Hz and 50 Hz.
Animals
All experimental protocols were approved by the Institutional Care and Use Committee of Rice University and adhered to the National Institute of Health guidelines. For in vivo studies, we used male and female mice that were either wild type (WT) C57BL/6 from Charles River or transgenic C57BL/6J-Tg (Thy1-GCaMP6f) GP5.17Dkim/J from Jackson Laboratories, age > 5 weeks and weight > 20 grams. Mice were group housed until the lens implant surgery after which they were individually housed.
Viral construct
AAV9.CamKII.GCaMP6f.WPRE.SV40 (Titer≥ 1×1013 vg/mL) was purchased from Penn Vector Core.
AAV injection, lens implant and microscope baseplate surgeries
For in vivo imaging experiments, mice underwent stereotaxic surgeries consisting of an AAV injection (WT only mice), lens implant and a baseplate implant. The surgical techniques align with methods described in3,5, but with changes in bonding adhesives. To summarize, for AAV injection and lens implant surgeries, surgery preparation consisted of sterilizing all tools and surgery bench area using autoclave cycles or chemical methods. The GRIN lens was sterilized in a 12-hour ethylene oxide cycle. For all surgeries, mice were anesthetized with 1.5-2.5% isoflurane and 1L/min oxygen. The animal was then placed in a stereotaxic apparatus with the animal resting on a water heater pad and draped with Press’n Seal Cling Film28 to maintain body temperature and provide a sterile field. Ophthalmic ointment was applied to the eyes. The incision site was cleaned with a chlorhexidine scrub, and Lidocaine was administered below the incision site. Throughout the surgery, saline injections were administered subcutaneously (SC) to maintain hydration levels. For the AAV and lens surgeries, mice were SC administered Buprenorphine Slow Release (1 mg kg-1) for post-operative pain and Dexamethasone (4 mg kg-1) to reduce brain edema.
In the WT mice for the AAV injection surgery, we unilaterally injected 500nl of AAV9.CamKII.GCaMP6f.WPRE.SV40 (Penn Vector Core / Addgene) into the dorsal CA1 region of the hippocampus (−2mm anterior-posterior (AP), +2 mm medio-lateral(ML) and −1.65mm ventral positioned relative to bregma) using a Hamilton syringe with an injection rate of 50 nl/min. One week after the AAV injection for the WT mice or as a first surgery on the transgenic mice, a GRIN lens implantation surgery was performed. After the incision was made and skull surface cleaned, the craniotomy location was marked, and the skull was lightly scored with a scalpel. A thin layer of C & B Metabond Cement (Parkell) was then applied to exposed skull areas except at the site of the craniotomy. After waiting five minutes for the Metabond to cure, a 2 mm craniotomy was performed with the center at location −2 mm AP and +1.5 mm ML. Cortical tissue was slowly aspirated using a 30-gauge blunt needle while continually applying sterile saline. Aspiration ceased once the second layer of the corpus callosum striations appeared. After aspiration was complete, bleeding was reduced by placing a small section of gel foamed soaked with sterile saline over the craniotomy site for five minutes. An in-house designed custom 3-D printed lens holder and vacuum line was attached to a stereotaxic bar. A GRIN Lens (1.8 mm diameter, 4 mm length, Edmund Optics #64-519), vacuum secured with the lens holder, was lowered to 1.35 mm below the surface of the skull. With the lens still vacuum secured in the lens holder, a thin layer of Flow-It ALC Dental Composite (Pentron) was applied around the interface of the skull and GRIN lens and then immediately cured for 20 seconds using a UV Curing light (NKSI LY-A180). Application of small amounts of Flow-It and curing continued until a cured layer secured the lens to the skull surface. Then, the vacuum was turned off and the lens holder was slowly lifted away from the lens. To protect the lens, Kwik-Sil (WPI) was added on top of the lens and allowed to cure for 10 minutes. At the end of both the AAV injection surgery and lens surgery, Meloxicam (2 mg kg-1) was administered SC. Meloxicam, Dexamethasone and saline injections were post-operatively given the two days following surgery.
Three weeks after the lens implant surgery, a baseplate surgery was performed. Before the surgery, the sides and bottom of a 3-D printed baseplate was lightly scored to ensure adhesive bonding. During the surgery, with the mouse under anesthesia and secured in a stereotaxic apparatus, the Kwik-Sil was carefully removed from the skull and lens area. Then, the baseplate was secured to a MiniFAST microscope and placed over the lens. With the microscope powered on, the best FOV was found by manually changing angles of the microscope. With the microscope held in the desired position, small amounts of Flow-IT were slowly applied and UV cured to areas below and around the baseplate. Once the microscope and baseplate were completely secure, the microscope was removed from the baseplate and a protective lens cap was then placed over the baseplate. Meloxicam and saline injections were administered post-operatively. Imaging sessions occurred 3-5 days after the completion of the baseplate surgery.
In vivo imaging sessions
After recovering from the baseplate surgery, the mice were habituated to handling27 and to carrying a sham microscope. During imaging sessions, with a MiniFAST microscope attached to the mouse’s baseplate, the mice were placed in a 65 cm by 40 cm open field and allowed to explore freely. A 1.5m 36-gauge data coax cable was used for the main microscope cable and a 2.5m M17/113-RG316 cable was used as an extension to the DAQ. The upgraded Miniscope Windows GUI was used to control and record frames from MiniFAST and sync a behavior camera (Logitech C920 HD Pro Webcam) at 30 Hz.
For the photobleaching experiments, the mice explored the open field for 10 minutes with the microscope attached but powered off to decrease the mouse’s excitability of a novel environment. After, the microscope was powered on and recording sessions were held for 5 or 20 minutes. For the 5-minute session dataset, the 5-minute sessions were repeated for 3 consecutive days with each excitation light value.
Image analysis
High resolution test target analysis
To calculate the contrast in the high-resolution test target images, using MATLAB, a rectangular region of interest (ROI) was manually selected over the line pairs for each group and element numbers. For each ROI, a line profile was calculated by averaging the pixel intensities across every row. Then, the contrast of each element number was calculated as (Imax-Imin)/(Imax + Imin) where Imax is the peak intensity and Imin is the
In vitro imaging analysis
To extract the fluorescence voltage activity of the HEKS cells expressing ACE2N-mNeon, using MATLAB, an ROI was manually selected around the cell soma in one frame. Then, to find the fluorescence intensity, F(t), the ROI was averaged for each frame. For each pulse trial, the baseline F was the average of F(t) across a 100-ms time when no voltage pulses were applied. Then, ΔF/F = (F(t) – F)/F. The pulse train timestamps were aligned to the fluorescent traces.
Calcium traces analysis
For ROI segmentation (Fig. 4, 5 and Supplementary Fig. 4), ImageJ was used to produce background subtracted maximum projection images which were then used in MATLAB for manual curation of ROIs. To calculate the fluorescence activity in each ROI, ΔF/F, MATLAB was used with the following steps. First, to filter out background noise fluctuations, the following formula was applied where FROI(t) is the ROI average for each frame, FBackground(t) is the entire FOV average for each frame, and FAvgBackground is the average of FBackground(t) across all frames. Then, where F is the average of FROI-Filtered(t) across all frames.
Photobleaching analysis
To calculate the rate of photobleaching for the five-minute sessions, ImageJ was used to produce a stack of maximum projections images for every 1000 frames. Then, using MATLAB, an ROI was selected encompassing the majority of the FOV but excluding regions where the microscope housing was visible. Then, for each five-minute session, the initial fluorescence was calculated as the ROI average over the first 4 maximum projection images (∼1 minute) and the final fluorescence was calculated as the ROI average over the last 4 maximum projection images (∼1 minute). MATLAB’s Statistics and Machine Learning Toolbox was used to perform the ANOVA 2-way test with input factors of the 2 excitation light powers and the 4 mice’s 3 separate trials. For the 20-minute session, the ROI average was calculated using a 3-minute moving window and plotted.
Place field analysis
Place fields were computed from an approximately 17-minute-long session (Fig. 2d, 2e, Supplementary Fig. 3). Videos were first motion corrected with CaImAn29. Next, the maximum projection image computed over the videos was used to obtain initial ROIs from an automatic ROI detection algorithm in CaImAn (Fig. 2b). These ROIs were used to initialize the spatial footprints for CNMF-E and to plot fluorescence traces (Fig. 2c). As CA1 activity is sparse, for simplicity of display example fluorescence traces use the mean over an ROI for the baseline. Following CNMF-E deconvolution, the vector of spiking activity was extracted for each ROI. Since these vectors were non-integral valued, they were treated as pseudo spike counts. Animal position was determined by tracking a LED on the microscope assembly. For each ROI, a ratemap was generated by binning the spiking activity vector into 2D spatial bins of dimensions 1 cm x 1 cm and normalizing by the occupancy. Only periods of time when the animal was running (peak speed > 10 cm/s with a threshold of 8 cm/s as the running event boundaries) were considered. The ratemaps were smoothed with a Gaussian kernel of standard deviation 2 cm and normalized to the range [0, 1] for visualization (Fig. 2d, 2e and Supplementary Fig. 3).
For each occupancy-normalized ratemap, “nelpy” a custom Python package https://github.com/nelpy/nelpy, was used to compute the spatial information30. Next the position timestamps were circularly shifted 1000 times by a random amount to generate a shuffle distribution of spatial information. A ratemap was considered a valid place field if it satisfied the following criteria: (1) its corresponding spiking activity vector was nonzero at least 5 times, (2) the total number of non-zero elements in the spiking activity vector divided by the session duration resulted in an overall frequency of < 0.5 Hz, and (3) the spatial information was greater than the 95th percentile of the shuffle distribution.
Project design availability
The MiniFAST 3D-printed housing, hardware, DAQ firmware and updated Miniscope GUI is available at https://github.com/jjuneau1/MiniFAST. Additionally, in the same repository, there are 3-D printed design files for a 1.8mm GRIN lens surgical holder and the MiniFAST patch clamp setup brackets.
Availability of data and analysis code
The experimental data collected and analyzed in this publication is available from the corresponding author upon reasonable request.
The custom analysis code in this publication is available from the corresponding author upon reasonable request.
Competing Interests
The authors declare no competing interests.
Acknowledgements
We thank the Miniscope Team, Framos Technology, the Rice University ARF, E. Orchard, T. Volz, E. Festa and S. Gao for conversations and assistance. This work was supported by funding from the NIH (R21EY029459 and RF1NS110501) and DARPA (N66001-17-C-4012).