Procedure I: Intracellular Lasing
Preparation of Polystyrene Microbead LPs ● TIMING 2-3 h
1 Add polystyrene LPs to a centrifuge tube. (This procedure was optimized using dry fluorescent polystyrene particles; specifically FluoroMax microbeads by ThermoFisher, which are available in green and red). The exact quantity of LPs is not crucial at this stage, but we typically begin with a number of LPs that exceeds the number of cells in the culture dish.
2 Optional: The fluorescence bioassay for uptake quantification requires coating the LP surface with biotin. For this, weigh and dissolve 1 mg of NHS-LC-LC-biotin in 100 µl Dimethyl sulphoxide (DMSO), sonicating the mixture if necessary to ensure that biotin dissolves completely.
! CAUTION Direct exposure to DMSO can cause skin irritation. Wear personal protective equipment including suitable gloves when handling DMSO, and work inside a chemical fume hood to prevent inhalation of fumes.
3 Suspend the LPs in 100 µl of DMSO or biotin/DMSO (for the fluorescent bioassay). Leave the mixture for 30 min.
4 Take the (biotin/)DMSO/LPs solution and add it to 1 ml deionized water (DIW).
▲ CRITICAL Ensure a ratio of DIW:DMSOof 10:1 or higher, otherwise the polystyrene beads will not sediment during centrifugation because the density of the solvent is higher than the density of the microbeads.
5 Vortex the solution for 5 s, centrifuge it at 500 G for 5 min, and remove the supernatant with a pipette.
6 Wash the LPs 5 times. For each washing step, resuspend the LPs in 1 ml of DIW and repeat Step 5. After the last washing step, resuspend the LPs in 1 ml DIW to have a stock solution.
▲ CRITICAL Ensure the DMSO is completely removed during the washing steps. Remaining DMSO will later wash off the biotin, leading to unstained microbead lasers which appear as false positives in the uptake assay.
7 Add 10 µl/ml of Lipofectamine 3000 to the stock solution in DIW and vortex the solution for 5 s. Wait for 30 min.
8 Centrifuge the mixture at 500 G for 5 min and remove the supernatant.
9 Wash the LPs once with DIW and then refill the centrifuge tube with DIW to obtain a LP stock solution.
■ PAUSE POINT You can store the coated microbead lasers for a few hours before proceeding with the cell seeding; however, the best results are achieved when resuming immediately.
10 Centrifuge the LPs/DIW solution at 500 G for 5 min, remove the supernatant, and refill the centrifuge tube with cell culture medium.
Box 2 | Preparation of bespoke semiconductor LPs ● TIMING 1-2 h
1 The starting point of this procedure assumes that LPs have been defined and etched on a semiconductor wafer, leading to free-standing but adhering LPs on the surface of the wafer. Cleave the wafer to obtain a piece of wafer that can fit the opening diameter of the centrifuge tube.
▲ CRITICAL Handle the wafer with K6 style plastic forceps where possible. Physical damage to the wafer can lead to unwanted cleaving or formation of shards in the ultrasonic bath.
! CAUTION Many wafers contain toxic materials, which requires taking precautions for safe handling and disposal. The LPs themselves must not contain any toxic materials or else should be encapsulated to avoid compromising cell viability.
2 In the cell culture hood, sterilize the wafer piece with LPs by submerging it in ethanol for 10 minutes, then leave it in the cell culture hood for approximately 5 min to dry.
3 Insert the wafer piece into a sterile rounded-bottom 2 ml centrifuge tube with the surface containing LPs resting against the tube wall.
4 Add approximately 200 µl (or enough to entirely submerge the wafer piece) of cell culture medium to the tube, close the tube, and seal it with parafilm.
5 Using flexible clamps, place the tube in the ultrasonic bath and sonicate for 30 min.
▲ CRITICAL The tube should be positioned in the bath at an angle of approximately 45° such that the opening of the tube is above the water surface and the side of the wafer piece containing LPs is resting against the lower surface of the tube. We observed that the proximity to another surface during sonication greatly improves the efficiency and speed of the detachment of the LPs into the cell medium.
6 Remove the tube from the ultrasonic bath and sterilize it with 70% IPA prior to placing it in the cell culture hood.
7 Carefully remove the wafer piece from the tube by using fine and sterile tweezers that can reach into the tube, e.g., stainless steel 2A tweezers.
8 To ensure the LPs have been removed, wash the wafer piece in ethanol and inspect the surface. Any iridescence or hue (typically visible to the naked eye for periodic structures including patterned and etched LPs) should no longer be present and the surface should be reflective.
9 Sterilize the single-use membrane filter by dipping it in ethanol and leaving it to dry for 5 min.
10 Disassemble the sterile filter holder, insert the membrane filter on top of the rubber ring, and close the filter holder again.
11 Wet the membrane filter by filling a sterile syringe with 1 ml of cell culture medium and emptying it through the filter into a separate tube for waste collection.
12 Pass the suspension of LPs in cell culture medium through the filter and collect it in a separate tube.
13 Recover remaining disks from the first tube by pipetting an additional 200 µl of cell culture medium into the tube, sonicating the tube for 1 min, and repeating the filtration. The final concentration in the LP stock solution can be estimated from the size of the wafer piece and the density of LPs on its surface. If the protocol is successful, the loss of LP during the cleaning and filtration steps should be well below 50%.
Adding LPs to Cells ● TIMING 1 h
11 Determine the necessary volume of LP suspension needed, based on the concentration of LPs in the stock solution, the number of cells in the dish, and the desired ratio of LPs to cells. LPs can be counted on a hemocytometer to quantify the efficiency of the LP preparation workflow and to determine the necessary volume for the desired ratio of LP to cells.
12 In the cell culture hood, remove the medium from the cell culture dish and wash the cells once with PBS.
13 Add the suspension of LPs in cell medium. If necessary, top up the cell culture dish with more medium.
■ PAUSE POINT Once the LPs are settled to the bottom of the cell culture dish (typically after a few hours), the cells will begin internalizing the LPs; the speed of the uptake will depend on the cell type and the size and geometry of the LPs.
14 Wait for the uptake of LPs (we usually leave the sample overnight to allow settlement and uptake of the LPs). Should additional media changes be required, they must be performed very carefully, as this might wash away non-internalized LPs.
▲ CRITICAL The timing of Steps 12-14 may require further optimization when working with different types of cells or LPs. For small (< 3 µm diameter) LPs, the LP suspension can alternatively be added during splitting and re-seeding of the cell culture. Methods of assessing internalization of the LPs are described in the following sections and should be used during optimization of the LP internalization workflow.
Fluorescence Microscopy Bioassay ● TIMING 2-3 h
15 Prepare the dye solution by mixing 20 µl of ATTO 488-streptavidin stock (1 mg/ml) and 10 µl Hoechst 33342 (2 mM) with 1 ml cell culture medium. The cell-impermeable ATTO 488-streptavidin conjugate selectively binds to the biotin coating of the non-internalized microbead LPs, therefore it can be used as a marker for internalization.
▲CRITICAL The emission spectrum of the dye used to label non-internalized LPs must be well separated from the emission of the LP itself (peak separation > 100 nm) to limit bleed-through of the very strong signal of the LPs into the spectral channel used to assess internalization. We recommend ATTO 488-streptavidin for red fluorescent LPs and ATTO 647N-streptavidin for green fluorescent LPs.
16 Remove the cell culture medium from the cell culture dish with the LPs, add the dye solution to the cells, and incubate for 15 min.
▲CRITICAL Perform all washing steps very carefully and slowly to avoid washing away non-internalized LPs.
17 Remove the dye solution and wash the cells once with PBS.
18 Add 1 ml Paraformaldehyde (PFA, 4% in PBS).
! CAUTION Exposure to PFA can have toxic and carcinogenic effects. Handle PFA in a fume hood, wearing protective equipment including suitable gloves, to avoid skin exposure and inhalation. Use separate equipment (i.e., pipettes, glassware) for handling PFA and ensure appropriate disposal of contaminated waste.
19 After 15 min, remove the PFA and wash the cells three times with PBS, then refill with PBS. Close the culture dish and seal it with parafilm.
■ PAUSE POINT The fixed and stained cells can be stored in a 4°C fridge until imaging is performed.
20 On a fluorescence microscope, image all LPs using their intrinsic fluorescent signal.
▲CRITICAL Image large FOVs with enough LPs for statistical analysis. Ensure excellent image quality of the two LP channels, easing the use of automated tools for particle counting (e.g., the ImageJ measuring function).
21 Image the non-internalized microbead lasers in the same field-of-view (FOV) by recording signal from non-permeable ATTO488-streptavidin or ATTO647N-streptavidin signal.
22 The cells can be co-localized by imaging the Hoechst signal, or from phase-contrast images (Figure 4a).
Fluorescence Activated Cell Sorting (FACS) ● TIMING 0.5 d
23 For FACS sorting, prepare the following samples: i) the cell culture labelled with LPs, ii) a control sample of identical cells without LPs, iii) a sample of just LPs in suspension.
24 Detach the cells following the standard procedure applicable to the cells used and resuspend the cell pellet in FACS buffer (DPBS containing 2% FBS).
▲CRITICAL Transport to external FACS facilities can either be done prior to or following dissociation, depending on the cell type. Cell transport might require designated bio-safety containers, depending on local regulations and cell type.
25 Filter the cell suspension through the 50 µm cell strainer to remove cell clumps and collect the filtered cell suspension into the FACS tube.
26 Sort the cells (Figure 4b) and collect the sorted cells in a centrifuge tube containing cell culture medium. The gating structure of the FACS should include a channel for the LP emission in addition to other quantities of interest, i.e., singlets/agglomerates or live/dead.
27 Seed the sorted cells into an appropriate dish for imaging and leave in the incubator until the cells have attached. Following attachment, the cells can be imaged for additional control of internalization (e.g., with confocal microscopy, Figure 4c), or monitoring cellular uptake by refractive index sensing (Figure 4d), and hyperspectral confocal imaging of the LPs can be performed (Procedure II).
Procedure II: Microscopy and Spectroscopy
PC Setup and Installation ● TIMING 1 d
1 Insert the National Instruments DAQ board and Frame Grabber boards into open PCIe x16 slots in the PC.
2 Download and install the following commercial software programs and drivers from the respective manufacturers or from the data storage devices included with the equipment delivery: LabView, NI MAX, Thorlabs ThorCam, Andor Solis (or equivalent spectrometer software), GenICam CommCam, Teledyne Octoplus Software, and the Physik Instrumente PI Stage control software along with its LabView Drivers.
3 Download the custom-built applications GPScan.vi50, NewGPScan.vi, ConfocalHyperspectral.exe and SapGUI.dll from our repository (available upon request).
4 Create a working directory at a preferred location on the C drive (C:) and place ConfocalHyperspectral.exe and SapGUI.dll in this folder. For convenience, create a desktop shortcut to ConfocalHyperspectral.exe.
5 For data analysis, install MATLAB and Python with the open-source Python modules napari51 and Trackpy52.
6 Download all processing files from the processing repository and place them in your data processing directory. (The processing repository is found here: https://github.com/GatherLab/HyperspectralConfocal---Processing-preliminary-)
Construction of the Confocal Scanning ● TIMING 1 d
7 Start assembly of the microscope body (Figure 5) by placing the optical elements on the surface of the optical table. (Refer to CAD File (available upon request), Supplementary Table 1, Supplementary Note 1, and Supplementary Figures 1 and 2a for more detail on placement of the optical components.) The optical height of the beam path should be fixed at the height of the excitation laser beam. If this is impractical due to spatial constraints, one can first use a periscope or a pair of corner mirrors to raise or lower the beam height, making sure it remains horizontal.
▲ CRITICAL The distance along the optical axis between components where the beam is collimated is not critical, but it is recommended to keep it small where possible. Some components require precise positioning in z and should already be placed roughly in the correct position using a ruler: The spacing of the tube lens (L1) and the confocal scan lens (L2) must be equal to the sum of their respective focal lengths, the camera tube lens (L3) and the fiber coupling lens (L4) must be positioned such that their focus coincides with the camera (CAM1) and the optical fiber mount, respectively.
8 Power on the PC and the linear power supply unit for the motors of the galvo scanner.
9 Open LabVIEW and confirm that there is communication between LabVIEW and the DAQ.
10 Using LabView, set the voltage applied to the galvo mirrors to 0V on both axes to ensure the galvo mirrors are centered prior to beginning alignment. One way to center the galvos is opening the NewGPScan.vi script, setting the ‘VoltageFactors’ to 10e-5, and running the script.
▲ CRITICAL The galvos need to be centered (‘nulled’) prior to starting alignment to ensure that the actual center of the confocal scan is aligned to the optical axis.
11 Turn on the excitation laser. Using the first pair of kinematic mirrors (KM1, KM2), center the beam in the cage system located on the side of the galvo mirrors that faces the laser. To ensure the beam path is not angled, select two positions (e.g., just before FC1 and just before GM) and confirm that the beam is centered at both positions, using the 30 mm cage system alignment target.
! CAUTION Avoid eye exposure to direct or reflected laser beams. Reduce the laser power during alignment and adhere to laser safety precautions including wearing appropriate eye protection. Any open exit apertures of filter cubes in the cage system should be closed off with SM1-threaded caps to block back-reflections.
12 Evaluate the profile of the excitation beam at the exit of the 90:10 beamsplitter cube located underneath the objective (FC2). Confirm the excitation beam gets collimated by L2, either by using a shearing interferometer, or by placing an iris aperture at different distances from the filter cube to check that the diameter of the excitation beam does not change with distance.
13 If necessary, manually move L2 in its mount along the rails of the cage system with the locking screws open until the beam is collimated.
14 Lock the mount holding L2 into place on the rails of the cage system and close the unused opening of FC2 with an SM1 cap to block the transmission of the excitation beam through the 90:10 beamsplitter.
15 Place the 60 mm cage system alignment target in the conjugate plane (CP) between scan and tube lens (the position where the spot size of the excitation beam is smallest) to evaluate the beam position for aligning the galvos to the image center.
16 Loosen the locking screws on both galvo mirrors and manually align the galvo mirrors by gently rotating the motors within their mounting holes until the excitation spot is centered.
17 Place the alignment target just before L2 to center the spot at this position, performing fine adjustments with KM1 and KM2 if needed.
18 Iterate between Step 16 and 17 until the beam is centered at both positions before fixing the lock screws of the galvo mirrors.
19 Optional step: To couple additional laser lines, other inputs of filter cube FC1 can be used. A kinematically locked corner mirror can be inserted in FC1 to allow switching between the different excitation paths. A separate pair of kinematic mirrors should be included on the laser-facing side of FC1 for the alignment of each additional laser. Only this additional pair of kinematic mirrors should be used to center the additional beam at the alignment positions previously described.
Alignment of the Detection ● TIMING 2-3 h
20 For alignment of the camera, start with a low-magnification air objective and a relatively thick fluorescent sample, e.g., a fluorescent microscope slide. Put the fluorescent sample onto the sample holder.
▲ CRITICAL Using a fluorescent sample that is much thicker than the depth of field of the objective ensures that the alignment is independent of the positioning of the sample.
! CAUTION Placing the fluorescent sample at the focus of the excitation laser beam will cause reflection from its surfaces. An image of this reflection is formed on the camera, which can cause damage to the camera chip. Ensure this reflection is blocked by a suitable bandpass filter (LP1) before proceeding.
21 Move the fluorescent sample into the focus of the excitation laser, using the motorized stage in z. First estimate the position of the focus from the working distance of the objective, and then readjust the sample position until a fluorescent spot generated by the excitation beam is visible within the sample by naked eye.
22 Turn on the ThorCam software to connect to the Brightfield camera (CAM1) and display a live image.
23 Manually move the camera tube lens (L3) until the image of the fluorescent spot is in focus, i.e., the spot size in the image is minimized.
▲ CRITICAL STEP Camera CAM1 will later be used for navigation and positioning of samples into the confocal scan field, as well as for the alignment of the confocal detection fiber. Misalignment of CAM1 will make it more difficult to image the correct regions of interest, and any misalignment will likely propagate to the other components. Here, we align the image plane of the camera to the focus of the excitation laser, whose position may be wavelength-dependent due to the possibility of chromatic aberration in the system. Therefore, we recommend performing this step whenever switching between excitation lasers of substantially different wavelengths.
24 Use the kinematic mirror (KM3) to center the spot in the image.
25 For alignment of the confocal detection, the image needs to be focused on the lower surface of the fluorescent slide in the brightfield image. Move the sample in z until the surface structure on the fluorescent slide and the confocal excitation spot are both focused sharply.
26 Visualize the collection path with light coupled into the other end of the optical fiber, e.g., by mounting the fiber face in front of the Brightfield LED or another light source with a wavelength suitable for following the collection path. If using multiple fibers for detection, start with the fiber with the largest core.
27 Place the 30 mm cage system alignment target behind KM5, facing the coupling lens L4, to evaluate the light emerging from the fiber backward along the collection path.
28 Use the kinematic mount of the fiber to center its output on the alignment target.
29 Manually slide L4 along the cage system to collimate the light emerging from the fiber.
30 Remove the alignment target and adjust the power of the excitation laser and the light coupled into the fiber such that they form spots of similar brightness on the camera (Figure 6a).
31 ▲ CRITICAL STEP Minimize the size of the spot formed by the light emanating from the fiber by fine-adjusting L4 with its z-translation mount. For this, it is crucial that the focus of the camera is on the lower edge of the fluorescent slide, such that the fluorescent spot generated by the excitation beam and the reflection of light from the fiber are in focus simultaneously. The image formed by the output of the fiber represents the collection spot and is an indication of the pinhole size. For large fibers (‘open pinhole’), the spot size exceeds the size of the confocal excitation spot (Figure 6a,b), whereas for small core sizes (‘closed pinhole’), the spot sizes are comparable (Figure 6c).
32 ▲ CRITICAL STEP Walk the beam of the collection path, using the two kinematic mirrors KM4 and KM5, such that the two spots are concentric (Figure 6b).
33 Toggle the sample position along z and ensure the image of the output of the fiber defocuses homogenously and symmetrically to check for any angles in the detection path. To eliminate angles, iterate between defocused and focused images and adjust KM4 and KM5 until both images are concentric.
Camera Configuration and Alignment ● TIMING 1 d
34 Turn on the line-scan camera CAM3 and the HyperspectralConfocal and the GenICam camera software programs, as well as the NewGPScan.vi and the galvos.
35 In the HyperspectralConfocal software, set the number of points in x and y to 20 and the acquisition time to 199 µs.
36 In the GenICam software, connect to the correct frame grabber board and camera and load the parameter textfile (params.txt in the directory of the HyperspectralConfocal software) into the ‘hyper terminal’.
37 Increase the number of frames in the HyperspectralConfocal software to a larger number, e.g., 100. Should a different camera model and/or software than those listed in the materials section (Table 3) be used, connect the camera to the PC and configure the acquisition to display the recorded frames in real-time, using a short camera refresh rate of e.g., 10 fps.
38 Turn on the camera CAM2, which is connected to the other output port of the spectrometer and start the software controlling CAM2. If the spectrometer has only one output port, dismount the line-scan camera (CAM3) and mount CAM2. Set the readout for CAM2 to imaging mode and set the grating of the spectrometer to reflection mode (often referred to as ‘0 nm’ in the control software).
39 Place a homogenous, scattering object (e.g., a white piece of paper) in front of the entrance slit of the spectrometer to produce an image of the slit on camera CAM2. Remove the scattering object.
40 Note the pixel number along x where the image of the closed slit is formed. (We will use the following convention to describe the spatial axes: z – along the beam path; y – perpendicular to the beam path, vertical direction; x – perpendicular to the beam path, horizontal direction, which corresponds to the direction of spectral dispersion in the spectrometer).
41 Assemble the cage system for the fiber relay system, at this stage not yet connecting it to the spectrometer and not yet mounting lens L6. FC4 is left empty at this stage but can later be used to relay alternative signals to the spectrometer, or to couple light into the optical fiber with a mirror during the alignment procedure.
42 Coarsely position L5 one focal length away from the fiber adapter plate using a ruler.
43 Turn on the microscope illumination LED until the light following the detection path and emerging from the optical fiber at the spectrometer side forms a spot that can be seen by naked eye.
44 Manually slide L5 along the cage system until the light emerging from the fiber is collimated by L5 and fix its position.
45 Add L6 to the relay system and mount the relay system on the input side of the spectrometer, with L6 roughly positioned such that its focus sits in the plane of the spectrometer entrance slit.
46 If the spectrometer used does not have a cage system adapter, manually pre-align the relay system to the spectrometer slit in x-y, avoiding any tilts of the optical axis of the relay system with respect to that of the spectrometer.
47 Fully open the slit of the spectrometer to display an image of the fiber core on the CCD camera, using the signal from the illumination LED transmitted through the fiber.
48 Move L6 first manually, then with the z-translation mount, to focus the image of the fiber core on CAM2.
49 Adjust the x-y-translation mount of the fiber next to L5 such that the image of the fiber core on the camera is centered along y and positioned at the pixel value corresponding to the position of the closed slit noted in Step 40.
50 With CAM2 now available to accurately detect light emanating from the fiber, the coupling of light from the microscope into the fiber should be aligned more precisely. To achieve this, set the spectrometer grating to a wavelength within the emission spectrum from the used fluorescent target, switch CAM2 to spectral readout, and close the spectrometer entrance slit to a standard measurement setting, e.g., 30 µm for Andor Shamrock spectrometers.
51 Mount the fluorescent slide on the sample holder and turn on the excitation laser.
! CAUTION Reflections of the excitation laser can damage the spectrometer and the connected cameras. Always ensure the spectrometer is protected by a suitable bandpass filter (LP2).
52 Fine-adjust the fiber coupling optomechanics of the confocal detection (KM4, KM5, L4) to maximize the intensity of the fluorescence measured on the camera.
53 Select settings for the grating (type and position) such that the fluorescence signal is as horizontal as possible and equal in brightness on either side of the camera and save a reference spectrum.
54 Switch to the alternate output port in the spectrograph settings to divert the signal to the line-scan camera (CAM3), or, if your spectrometer does not have two output ports, dismount CAM2 and mount the line-scan camera.
55 Optional: If you need to dismount CAM2, acquire the reference spectra needed for the spectral calibration in Step 75 before proceeding.
56 To configure the detection for the next alignment step, set the grating back to reflection mode and set the spectrometer shutter to ‘Open’.
▲ CRITICAL The line-scan camera does not trigger the spectrometer shutter; therefore, it must be kept in the ‘Open’ setting whenever using the line-scan camera.
57 In the HyperspectralConfocal software, click on ‘Acq Spectrum’ and then run the LabView scan (by pressing the run arrow, and then ‘Raster Scan’) to continuously display a live spectrum (see Supplementary Figure 4 for an exemplary screenshot of the GUI).
58 Adjust the fiber translation mount next to L5 along y until the brightness of the central peak, corresponding to a 1D image of the fiber, is maximized.
59 Adjust the position of the line-scan camera (see Supplementary Figure 5 for the camera flange we designed) in the z-direction to focus the peak (i.e., maximizing brightness and minimizing the width of the 1D image of the fiber on the camera).
60 Move the camera in x such that the peak is centered on the detector.
61 Set the grating back to the settings used for the reference spectrum in Step 53.
62 Continuously acquire spectra and (slightly) rotate the line-scan camera until the brightness of the fluorescence is homogenous across the detector (or as similar to the shape of the reference spectrum (Step 53) as possible) .
With the grating again in reflection mode, check the alignment (x-y-z) of the line-scan camera and, if needed, re-align the camera without rotating it.
▲ CRITICAL Misalignment of the line-scan camera will negatively impact the spectral quality and signal-to-noise ratio of subsequent measurements. The camera or the relay might require realignment when switching to a different grating.
63 Fix the lock screws on the camera adapter and adjust the y-position of the fiber mount for maximum signal one more time.
Calibration and Test Image Acquisition ● TIMING 0.5 d
64 Mount the calibration slide on the sample holder and navigate to an area with clearly marked distances for spatial calibration.
65 Bring the pattern into focus on CAM1 and save a transmission brightfield image.
66 Configure the detection such that the transmitted light from the LED reaches the line-scan camera with the spectrometer grating set to reflection mode.
67 Adjust the brightness of the LED such that it produces a clear and bright, but not saturated peak in the live spectrum displayed in NewGPScan.vi.
68 Set the galvo voltages in the HyperspectralConfocal software ‘Scanning Setup’ menu to ±50 V, the number of pixels in x and y to 400, the number of z-steps to 1, and the number of frames to 3. Confirm that the voltage factors in the LabView script are set to 0.1 (which will lead to an absolute applied voltage of ±5 V).
69 Record an image sequence by clicking ‘RecordRAM’ in the HyperspectralConfocal software, followed by ‘Raster Scan’ in NewGPScan.vi.
70 Click on ‘Conv Seq’ to batch-convert the 3 images. The converted images can be found in the directory of the HyperspectralConfocal software. They consist of two panels, both representing the raw image, one with color-coding for dominant wavelength and one with color-coding for intensity. The pattern of the calibration slide should be visible in these images (Supplementary Figure 6).
71 To save the image data, first click on ‘Save One’ and select a destination folder and name for the dataset. By clicking ‘Save Seq’, all image buffers will be saved to the destination folder as separate, numbered image files (e.g., ‘DataName_frame00000.tif’).
72 Load the processed images into your preferred image processing software to determine the actual physical size of the ±50 V scan field and make a note of this value. One can later input this value into the open-source processing functions (Procedure II, Stage 3) for accurate spatial calibration. As expected, the scan field size scales with objective magnification (Supplementary Figure 7), but we recommend repeating the calibration for all objectives that are used on the system routinely.
73 Mount the spectral calibration lamp in the space between KM5 and L4 to couple its signal into the detection fiber.
74 Set the center wavelength of the spectrometer grating to a value that lies within the expected emission range and set the spectrometer output to CAM2.
75 With the spectrometer slit closed to the minimum value, measure the spectrum of the calibration lamp on CAM2.
76 Then set the spectrometer output to the line-scan camera. With the live spectrum displayed in LabView, verify that the current acquisition parameters provide sufficient signal-to-noise ratio to clearly locate the peaks; increase the acquisition time or brightness of the calibration lamp if needed.
77 Acquire and save images of the spectra on the line-scan camera for later processing. Repeat this procedure for each grating that is regularly used on the system.
▲ CRITICAL The spectral calibration is crucial for obtaining accurate measurements, particularly for the calculation of absolute refractive index from the measured spectra. Ensure the measured calibration spectra contain at least 3 well-defined peaks (Supplementary Figure 8).
LP Reference Measurements ● TIMING 2-3 d
78 Prepare two samples for the reference measurements: A suspension of LPs in a medium of well-known, homogenous refractive index and a 3D dispersion of LPs (e.g., LPs in DIW and agarose, Box 3). For our benchmarking and reference measurements, we use FluoRed LPs, which reliably generate lasing spectra of good quality, offer homogenous lasing thresholds of around 0.5 nJ/pulse (Supplementary Figure 9) and emit spectra with resolution-limited lasing peaks. (They are not compatible with Procedure I; therefore, we recommend using dry FluoroMax LPs for experiments requiring intracellular integration).
Box 3 | Preparation of Reference LP samples
1 Preparation of beads in DIW
i. Pipette 15 µl of the FluoRed stock solution into an ibidi imaging dish.
ii. Add 1-2 ml of DIW and gently swirl the dish to homogenously distribute the LPs.
iii. Close the dish and seal it with parafilm.
2 Preparation of a 3D dispersion of beads in agarose
i. Add 1 g of agarose powder and 100 ml DIW to a glass bottle.
ii. Heat the agarose mixture in a microwave until it is liquid and clear.
! CAUTION heating the agarose too quickly can lead to strong bubbling and an increase of pressure in the glass bottle. Take the cap of the bottle off prior to microwaving. Microwave for 30 s at a time, then take out the bottle and gently shake the mixture, before microwaving again until the agarose is clear and liquid.
iii. Pipette 100 µl of FluoRed Stock into an ibidi dish and add 2 ml of the liquid agarose.
iv. Gently shake the ibidi dish to homogenously disperse the microbead LPs, then immediately place the sample into a fridge to quickly cool down and solidify the agarose.
■ PAUSE POINT FluoRed beads in DIW or agarose remain stable for at least a few weeks and can be stored at room temperature. Slight evaporation of water might condense the Agarose matrix, thereby reducing the sample dimensions, predominantly in z, and increasing the refractive index of the medium. The remainder of the agarose stock can be stored in the closed bottle at room temperature and reheated in the microwave for preparing new samples.
79 Keep the excitation beam stationary and configure the detection for displaying a live spectrum in the spectral range of emission from the used LPs, either on the CCD camera (CAM2) or on the line-scan camera (CAM3). For collecting spectra with the line-scan camera, run the continuous spectral acquisition with LabView and set the ‘voltage factors’ to 10e-05 to keep the beam stationary.
80 Visualize the position of the laser beam on the USB camera image (CAM1), e.g., with a fluorescent sample, and mark it with the drawing tool in the ThorCam software. This will ease the positioning of the LPs in the next step.
81 Mount the sample containing LPs suspended in DIW.
82 By moving individual LPs into the excitation spot and observing their spectra, identify a combination of excitation pulse power and pixel dwell time that leads to lasing spectra of good quality. Using pulse energies approximately 5- to 10-fold above the lasing threshold, and scan rates ca. 5-fold slower than the repetition rate of the excitation laser is a good starting point. It is expected that a stationary beam with a typical pulse repetition rate suitable for fast scans will bleach many types of LPs much more quickly (even within seconds) than the continuously moving beam used during scanning measurements.
83 Acquire an x-y-t sequence of images of the DIW sample, following the same workflow as Steps 68-71. (If the ‘voltage factors’ were decreased in Step 79, set them back to 0.1 for correctly calibrated scan fields.)
84 Use the ‘Conv One’ function to check image sharpness and signal-to-noise ratio.
85 Save the image sequence for later processing, including calibration of the refractive index sensing script.
86 Repeat Steps 83-85 for a range of acquisition parameters to compare how different conditions affect the quality of images. Exemplary images we obtained at different scan speeds (e.g., 25 kHz, Figure 7a; 125 kHz, Figure 7b) are included, as well as an example of displaying the results color-coded by wavelength (Figure 7c). The collection efficiency will vary for different objectives (Figure 7d). To assess the signal-to-noise ratio, evaluate the quality of individual spectra (Figure 7e,f) rather than just the intensity-processed images.
87 Connect to the piezoelectric objective scanner (PIStage) through LabView by enabling the ‘stage on’ button, running the script and clicking ‘Connect’. Once you confirm the connection in the pop-up window, the stage will initialize.
! CAUTION The PIStage will move during its initialization for axis referencing. Ensure there is no physical obstruction within the travel range of the objective mounted on the PIStage since collisions could damage the objective or the PIStage.
88 Mount a 3D LP sample on the sample stage, e.g., the dispersion of LPs in agarose.
89 Set up the z-scan by entering a step size (as negative value, in nm) and stack size (as number of slices) in the HyperspectralConfocal software. The 1%w/v agarose matrix is sufficiently transparent so that the imaging parameters established in Steps 82-86 should not require readjustment.
90 Acquire and save the stack. Assuming the objective scanner is turned on, and the stack height and step size have been defined, stacks are acquired automatically by following the same acquisition routine from the x-y-t sequences before. If both the ‘frame number’ and the ‘number of slices z’ are > 1, an x-y-z-t sequence is acquired.
Acquisition of Experimental Data ● TIMING 2-3 h
91 Prepare a sample, referring to Procedure I for cell seeding and LP integration.
▲ CRITICAL Depending on the desired FOV size, optical resolution, and collection efficiency, you might use an immersion objective. When selecting cell culture dishes for imaging, account for compatibility of the dish with the immersion medium.
92 Select imaging parameters for the acquisition. It is important to have prior knowledge of the signal-to-noise ratio of images and spectra for the type of sample and LP to understand the minimum pixel dwell times required for the desired image quality. Additionally, technical limitations and requirements need to be taken into consideration (Box 4).
Box 4 | Choosing Acquisition Parameters
1 Pixel dwell times ≥ 8 µs are supported by the camera configuration.
2 The size of each voxel in x-y should not be larger than half of the diameter of the LPs to avoid under-sampling.
3 The size of voxels in z can be larger when measuring with the ‘open pinhole’ fiber and a low-NA objective, but the image of an individual LP should span at least two z-slices.
4 Reducing the number of pixels in x increases the scan speed for a given spectral acquisition rate, thereby increasing the speed of the faster-moving galvo. The galvo has a maximum line rate of 175 Hz; therefore, faster spectral acquisition rates require additional pixels in x (at least 715 pixels in x at 125 kHz, 571 pixels in x at 100 kHz, etc.).
5 For large measurements, such as x-y-z-t scans, the duration of continuous scans might be limited by the availability of RAM, since the image buffers are held in the RAM until the data is saved by the user. If this is a limiting factor, the active area of the camera can be cropped to read out only the centermost pixels by setting the camera width to a user-defined value in the HyperspectralConfocal software.
6 Due to the camera communication settings, the camera width needs to be an integer multiple of 4. After changing the camera width, re-load the parameter file into the GenICam CommCam software through the hyper terminal.
93 Two representative parameter settings for different measurements are shown in Table 6 and 7 below. Parameter set 1 was used for a high-speed refractive index sensing experiment with polystyrene microbead LPs, where the settings were optimized for speed and spectral resolution. Parameter set 2 was used for a long-term cell tracking experiment with semiconductor nanodisk LPs, where 8 scans of identical settings were run back-to-back to track the cells for 68 h. Here, spatial resolution was given priority over scan speed. For both measurements, we limited the number of pixels read-out by the line-scan camera to the spectral bandwidth of interest, such that the amount of data generated was minimized. It is advisable to acquire and analyze a few test images of LPs in the same sample to confirm that the selected acquisition parameters lead to good quality images and spectra before proceeding.
Table 6 | Spatial parameters for typical hyperspectral scans
| Mag (NA) | FOV (mm) | voxel (µm) | pinhole (µm) | LP d/h (µm) | # buffers
1 | 10x (0.45) | 1.6 × 1.6 × 0.8 | 5.2 × 5.2 × 40 | 105 | 15 | 380
2 | 25x (1.05) | 0.48 × 0.48 × 0.04 | 1.3 × 1.3 × 1 | 10 | 1.8/0.2 | 480
Parameters: Objective magnification and NA (Mag (NA)); size of the FOV and of each voxel in x, y, and z (FOV and voxel); diameter of the optical fiber (pinhole); diameter and where applicable height of the LPs imaged (LP d/h); total number of camera buffers of one continuous scan (# buffers).
Table 7 | Temporal and spectral parameters of typical hyperspectral scans
| dt (µs) | frame (s) | stack (min) | scan (h) | # pixel λ | G (l/mm) | Δλ (nm)
1 | 34 | 3.02 | 0.96 | 0.32 | 680 | 1200 | 0.06
2 | 419 | 60.7 | 40.45 | 8.1 | 600 | 300 | 0.24
Parameters: Pixel dwell time (dt); time to image one x-y plane (frame), one z-stack (stack) and the entire hyperspectral scan (scan); number of pixels on the line-scan camera that were read out (# pixel λ); pitch of the grating used during the measurement (G); spectral resolution achieved in the resulting spectra (Δλ).
94 Start the acquisition. Long-term measurements can run without supervision, and remote access to the PC can be used to save data or restart the scan during the measurement.
▲ CRITICAL Long-term measurements with living cells likely require control of temperature and CO2, for which we recommend using an on-stage incubator.
! CAUTION Prior to leaving during a long-term measurement, ensure that it is safe to operate the laser without supervision, and take precautions to prevent others from entering the lab.
General Data Processing ● TIMING 0.5 d
95 Open a python file or jupyter notebook, import the required modules (Supplementary Code 1, Cell 1). In addition to common scientific libraries, import utils.py (provided along with our code package), which contains elementary data processing functions.
96 To organize the file structure returned by the HyperspectralConfocal software into correct spatial, spectral, and temporal axes, a custom data structure called the acquisition class is used. It stores key acquisition parameters and contains data processing methods, which can directly access the acquisition parameters relevant for correct processing. Any data processing workflow starts by creating an instance of the acquisition class. Call the constructor of the acquisition class, using the name of the directory and the data set as inputs (Supplementary Code 1, Cell 2).
97 Calibrate the acquisition by calling the autoCalibrate method, which takes the name of the log file as the first argument, and the scan field size of your objective at ±50 V (the number determined during Step 72, in µm) as the second argument (Supplementary Code 1, Cell 3).
98 You can also access and change all attributes of the acquisition directly, which also allows overwriting the automatic calibration and uploading data sets from different cameras (Supplementary Code 1, Cell 4).
99 Create hyperspectral images of individual x-y-planes with the construct2D method. For this, you need to specify the planes in z and t from which you want to extract the 2D image. The default version of this function creates an intensity image of the destination plane, which is displayed as one of two panels in a figure, and it returns the intensity counts as a 2D numpy array.
100 Optionally, the method can display and return an additional image containing the positions of the dominant lasing peaks (Supplementary Code 1, Cell 5). Additional keyword arguments allow adjusting thresholds and color scaling of the results (Supplementary Note 3).
101 To extract a single spectrum, determine the x-y position of the pixel of interest at a certain timestep and z-plane.
102 Call the getSingleSpectrum method, using x, y, z, and t as inputs. This method will retrieve the spectrum at the designated position from the original data set and return it as a numpy array, which can optionally be saved as a text file at a specified file path (Supplementary Code 1, Cell 6).
103 Multidimensional, pre-processed data sets can be displayed in the interactive python viewer napari51. Process the stack or time series, using the construct3D or constructT methods for obtaining intensity images, or the constructSpec3D or constructSpecT methods for spectral color-coding (Supplementary Code, Cell 7).
104 To display intensity images, directly load them into the napari viewer, passing the correct spatial calibration, which is stored in the acquisition object, into the napari function call (Supplementary Code, Cell 8).
105 To display spectral data, apply the custom RGBA mapping to the processed images. This method encodes the spectral information as hue in three different color channels, with the brightness corresponding to the real intensity values.
106 Display the resulting ND-RGBA channels in napari, and apply the correct spatial scaling as described for the intensity images above (Supplementary Code, Cell 9).
107 To store the processed images, save screenshots of the viewer window by defining the path of the saved image.
108 To save a series of images, e.g., to create videos of time series or flyovers, create a loop that iterates over different timesteps and/or angles, saving an image at each iteration (Supplementary Code, Cell 10).
Box 5 | A: Analysis for Multi-mode Spectra ● TIMING 1-2 d
1 First, create a folder called ‘fitted’ in your working data directory, where all results of the fitting steps will be stored.
2 Batch-process the images in the data set to detect lasing peaks and store their spatial, spectral, and temporal position in pre-processed text files.
i. For regular hyperspectral confocal data sets, call the fitSpectraToFiles method (Supplementary Code 2, Cell 1). The processed text files are organized into separate columns for each spectrum, where each columns holds information on the position and intensity of the lasing spectrum, followed by a list of the detected peaks, whose precise peak position is determined by fitting a gaussian to the experimental data.
ii. Specify additional settings for the peak detection, which are explained in Supplementary Note 3.
iii. Alternatively, one can batch-process ascii files containing a sequence of spectra, which would be beneficial to apply our multi-mode spectra routine to a data set acquired on a different camera (e.g., Andor Newton camera). To use the ascii function, ensure the ascii file contains the wavelength axis information in its first column, and the spectra in all following columns, which will be interpreted as spectra from a single position at consecutive time-step (Supplementary Code 2, Cell 2).
3 Open the asymptoticExpansion script in MATLAB. Change the name of the source directory and data set to match the acquisition to be processed.
4 Define the upper and lower bounds used for optimization of the three free parameters of the model (i.e., the microbead LP diameter, the radial mode number m, and the external refractive index).
▲ CRITICAL Setting the bounds incorrectly will lead to poor fitting results. Narrower bounds can increase the accuracy of the fit, but also increase the risk of excluding the correct values. Start with spectra from LPs embedded in a medium of homogenous, well-known refractive index to optimize the bounds for the bead diameter, before fitting spectra with a variable external refractive index.
5 Run the script to batch-process all files in the source directory containing the specified name. The script will optimize the two free parameters and add them to the end of each column in the result files. Additionally, the residual error of the mode positions for each fit is added to the columns.
6 Generate result traces from fixed positions (RIU vs time) (Supplementary Code 2, Cells 3-4).
7 Fitted results from hyperspectral confocal scans can be displayed as images with custom color-coding representing various physical quantities. Call the cmapResultsFromFiles and specify which parameter is imported in the returned RGBA maps (fitted refractive index, fitted bead diameter, or the lasing peak position; Supplementary Figure 10 and Supplementary Code 2, Cell 5).
8 Display the ND-RGBA results in napari and export screenshots as described in Steps 106-108 (Supplementary Code 2, Cell 6-7).
9 More accurate results for the absolute refractive index can be achieved with the following calibration step, using spectra obtained from LPs embedded in a medium of homogenous, well-known refractive index such as DIW (e.g., the data measured at Steps 83-85). This calibration must be repeated whenever a new batch or type of LPs are used.
i. Detect the lasing peaks following the same instructions as Box 5, Step 2. Open the asymptoticExpansionCalibration script in MATLAB and change the name of the data set and directory.
ii. Specify the known refractive index of your calibration data set, e.g., 1.33 for DIW.
iii. Leave the bounds of the diameter relatively open to account for divergence from the nominal size of the microbead lasers.
iv. The script will return an internal refractive index and the spread of bead diameters. Update the internal refractive in the fitting script (Box 5, Step 4-5) and the bounds of the diameter to reflect the size spread measured during the calibration.
Box 6 | B: Analysis for Single-mode Spectra ● TIMING 2-3 d
1 Batch-process the data set into x-y-image files organized into a hypercube with z, λ, and t encoded as axis labels. To reduce the size of the resulting data set and speed up to subsequent steps, we have implemented a keyword argument that allows binning (Supplementary Code 3, Cell 1).
2 Add all processed files to a .zip folder by specifying source directory and filename identifier (Supplementary Code 3, Cell 2). You can now delete the batch-processed images from the directory.
▲ CRITICAL Ensure no additional files with the same filename identifier are in the working directory.
3 Feed the .zip folder into the ND tracking algorithm TrackPY52 and specify input parameters.
4 Run the tracking algorithm and export the results as Excel spreadsheet (Supplementary Code 3, Cell 3). The algorithm will auto-detect the centroids of objects in the x-y-z-λ-t parameter space.
5 Create an instance of the trackingData class, which organizes the output from the tracking algorithm, using the name of the tracking data file as an input argument, and the acquisition object created during Box 6, Step 1 (Supplementary Code 3, Cell 4).
6 Display trajectories as images or extract traces of position or wavelength of individual tracked LPs (Supplementary Code 3, Cell 5).