An ultra-small 3D computational microscope Supplementary Information 1. Mask Fabrication Customized pattern including pinholes of different sizes for calibration and other geometries for imaging sample is patterned in the chromium photomask. Standard 4-inch chromium photomask, which is a glass substrate with 530nm of AZ1500 resist on top of 120nm of deposited chromium layer baked for 30 minutes in 103 degree C, is used. The photomask is patterned using Heidelberg MicroPG 101, UV-laser scanning pattern generator. Geometries for patterning are created in AutoCAD and saved in DXF format (Figure 1). Using the provided software (uPG101 exposure wizard) the prepared file is fed to the pattern generator. Laser power of 12mW and exposure level of 50% is set in the wizard. Patterned area of the mask is exposed according to the CAD file once the exposure starts. Exposed mask is developed and etched. Residual photoresist is removed using resist-stripping chemical. Lastly, mask is investigated under the light-field microscope to verify the lithography result. Fig S1. Overview of the pattern fabricated on the photomask. Different sizes of squares are placed along the axis to be used for calibration. Squares with gradually decreasing sizes are placed along the axis for locating smaller square pinholes easily. Letters and numbers used as sample object are placed on top-left and top-right, respectively. Line of various width and spacing are placed bottom-left, and square grids are placed bottom-right. 2. Direct-binary-search algorithm and convergence plot. Direct-binary-search algorithm is implemented in Matlab to perform object reconstruction. Detailed description and the flow char of the direct-binary-search algorithm is described in the reference [1]. One difference from the traditional DBS is the use of multilevel instead of binary level. Perturbation size defines the difference between each level. Therefore small perturbation size implies subtle change in the recovered object per iteration, therefore slower convergence toward the solution. Figures presented in the main text are the result of DBS with perturbation size of 0.005. Iteration terminates when no pixel change has detected. Fig S2. Convergence of the DBS algorithm for reconstructing number-2 object. Zero initial solution and 0.005 perturbation size is used. Above DBS session converged after 78 iterations that took about 5 minutes. 3. Preconditioning the cannula images Number of image processing techniques is used to precondition the captured cannula images before they are input to DBS script. HDR (high-dynamic-range) technique is used to preserve the information of the image otherwise lost when underexposed and overexposed. The Unibrain Fire-i400 provides a control to change exposure in 511 levels. Each exposure level corresponds to the exposure time that manufacture specifies. First, images are taken at 51 different exposure levels to perform film function recovery, described in detail in reference 1. Calibration images are taken at 8 different exposure levels, which are determined to cover the exposure from mostly-underexposed exposure level to mostly-overexposed exposure level. Recovered film function is used to build HDR image of each calibration images. HDR image are built in the same manner for object images at multiple exposure levels, properly chosen to include underexposure to overexposure levels, but not necessarily at same exposure levels used for capturing calibration images. Also, to eliminate the effect of background leakage light, the cannula HDR image of the leakage light is captured by moving the cannula aperture to the position where blocked completely by chromium. The leakage light image is the subtracted both from each calibration image as well as the object image. Each image is clipped to only include the region of interest to reduce the image size, which helps to speed up the optimization process. The boundary of the clipping is defined by the background image, as it bounds the region where the most of the optical power exits, and also because the region where background subtraction did not occur cannot be used to reconstruction as they contain background component. (This part might not be super clear and need better wording). By utilizing aforementioned computational technique, we built the high quality images that well preserve the intensity profile of the cannula speckle patterns with relatively low priced camera. Fig S3. Flow chart of pre-conditioning of the captured cannula images. The end product of the preconditioning is a truncated 295 pixels by 281 pixels HDR image with high signal-to-noise ratio. 4. Localization of the pixel using weighted centroid To test the sensitivity as shown in the main text, we found weighted centroid of the object image to determine the pinhole location with resolution less than calibration step size. Weighted centroid of x-axis is calculated as x_c = sum(x*pixel)/sum(x), where x is the position and p is the amplitude of the corresponding pixel. Weighted centroid of y-axis and z-axis is calculated in the same manner. For example, the figure 4 below shows the zoomed-in view of the 10μm square-pinhole reconstruction with the weighted centroid of the object, indicated by red x marker. Fig 4.(b) is the reconstruction result of same 10μm spare pinhole, shifted by 1μm in x direction. While the resulting image does not clearly shows the shift, as the shift is less than the size of pixel, weighted centroid, the red marker, gives us accurate quantitative location information from the pixel lump and measures about 1.2μm in centroid shift. Therefore, when the object is moved by step size smaller than the calibration step size, we can predict location of features at a finer accuracy than the calibration step size using weighted centroid. Fig S4. Zoomed-in view of the reconstruction image of 10μm square pinhole (a) at the reference location, and (b) 1μm shifted in x-axis from the reference. Red marker indicates the weighted centroid of the object. In the case of the object composed of multiple, isolated point sources, such as fluorescent microspheres, weighted centroid of each object can be found by sectioning the image into connected-component pixel groups to perform centroid calculation of each component. 5. Light Tools Simulation for Deformation Sensitivity Analysis Light Tools is a commercial ray tracing software developed by Synopsys Optical Solutions Group for optical modeling of illumination systems. Light Tools provides a convenient way of modeling the cannula imaging system without the need of custom software development. Fig S5. Light Tools screen capture. Zoom-in view of the fiber tip looking at the object letter A is shown. Letter A is a surface illumination source of which the image is captured at the other side of the cannula (receiver plane). There are three components in the simulation to replicate the cannula experiment. First, cylinder of 200μm in diameter and 14.7mm long made of silica is made to represent the fiber optic cannula. Second, illumination source is placed in front of cannula entrance face. Finally, receiver plane is placed at the exit face to capture the cannula image. Using automation script, calibration is performed in the same manner it was performed in the experiment. Point source (2μm square) is placed 500μm away from the entrance face to replicate the experiment. While point source is shifted in a raster scan manner to cover the full field of view, corresponding images are stored to form a calibration database. Once calibrated, point source is replaced with a sample object, letter A, to be later reconstructed using DBS. Fig S6. Effect of number of simulated rays on image reconstruction. (a)-(d) shows a reconstruction image when 5, 10, 25, and 50 million rays are used, respectively, to simulate the cannula image formed by the letter A object. Size of the scale bar is 20μm. As shown in figure 6, letter A is properly reconstructed using DBS, although the quality of the image depended upon number of simulated rays. Increasing number of rays however comes at a price of increased simulation time. For the practical purpose, 5 million rays (Fig 6.(a)) are used for the following deformation analysis. Fig S7. Light Tools Simulation for Deformation Analysis. (a) Reference reconstruction image without deformation is shown. Then, (a) cannula image is captured when cannula length is modified to 14.5mm and 14.9mm from 14.7mm and then recovered using the same calibration data (b). Lateral expansion and contraction is tested the same way, except it changed diameter by ±2μm (c). Lastly, straight cylinder is replaced with a sub-section of a torus to simulate bent cannula. (d). Noted angles on images represent the angle between entrance face and exit face of the bent cannula. Deformation analysis results above shows image reconstruction results when the cannula is deformed in three different ways: change in length, change in diameter, and bending. Length and diameter deformation simulates thermal expansion and contraction, or other uniform mechanical forces. Results indicate there is very little effect in image quality when length and diameter is changed by more than 1%. On the other hand, bending causes the image to degrade significantly, causing the image to almost disintegrate at 0.34 degree. Note the amount of noise in the original image without deformation. While the images produced in the case of lateral and axial deformation seem noisy, it is likely to be caused by the limited rays used in the simulation, not the deformation, as it is shown in the Figure 7. References [1] M. Seldowitz, J. Allebach, and D. Sweeney, "Synthesis of digital holograms by direct binary search," Appl. Opt. 26, 2788-2798 (1987) [2] P. E. Debevec and J. Malik, in Proceedings of the 24th Annual Conference on Computer Graphics and Interac- tive Techniques, SIGGRAPH ’97 (ACM Press/AddisonWesley Publishing Co., New York, NY, USA, 1997) pp. 369–378.