Tag: Optics

  • Starlyte Nebula Driver FAQ

    TL:DR

    Live Debugging

    Get a Full list of Supported Drivers

    Testing a Specific Driver File

    Testing Host and Sub Devices

    Live Debugging

    Due to the open nature of our driver system, it’s relatively straightforward to write a new driver file for almost any imaginable device in Nebula. However, driver development can be a pain, so I though I’d share some debugging tricks.

    For all commands, we will navigate to the command line using windows Command prompt or powershell. Here I show command prompt syntax. Nebula is commonly installed under program files. So in the windows start bar type “cmd” and press enter. This should open the command prompt. The commands below navigate to the install location.

    cd\
    
    c:\>cd "Program Files"
    
    c:\Program Files>cd Nebula
    
    c:\Program Files\Nebula>

    First, is the use of logging to the command line. When Nebula is launched from the command line, a series of optional switches can be used to report logged output. By opening this alongside the app, it’s very fast to figure out what or where something is going wrong. To see log output, use –printlog.

    c:\Program Files\Nebula>Nebula.exe --printlog

    This launches the app, but shows a live log output on the console at the same time.

    Get a full list of Supported Drivers

    This command will return a complete list of drivers found in the Nebula supported list. To print this list, use:

    c:\Program Files\Nebula>Nebula.exe --listdrivers

    Here is live example of that command and the expected result. A list of drivers is shown, press enter to close the listing.

    Testing a specific Driver File

    Next, let’s load up one of these drivers in the test utility. Now, this is where things get cool! The test utility can load a host device driver, inspect it’s shown devices, attempt to connect them, and even test every sub-device!

    So, let’s assume we have a new camera driver we want to work on. The camera should do things like snap an image, show various properties etc. In my example I use a real UVC (web) camera, and inspect the driver. The driver actually pulls the real camera info and even snaps a test image. The goal of this function is twofold, first to validate a given driver, and second to validate the device itself.

    For this command we will use –testdriver *drivername* and optionally –port *portname*, for example, COM5

    c:\Program Files\Nebula>Nebula.exe --testdriver --driver UVC_Camera

    Here we can watch the expected output in real time. Note a new window is spawned to show us the results for these tests.

    Testing Host and Sub Devices

    Let’s say we have a controller, for example, an ASI or Marzhauser box, which has a Z motor attached. In Nebula, the controller can be thought of as the Host (the resident controlling brain), and the device can be considered an appendage attached to the host. So all drivers must have a Host, but a Host may only have one device. In this example, we use a demo Focus device. First the host is loaded and analyzed, and then, you ca select to test any device provided by that host. I choose option # 1 (focus) and the test runs, even showing my driver has a small error I missed!

    Obviously, if you have a driver which isn’t behaving, please contact us – yet I hope these options provide a first-line of interface for power users, so simple things can be corrected and analyzed quickly!

    -Austin

  • xTool Conversion utilities

    We are about to announce some new products made using the amazing xTool UV laser engraver. Along te way, we needed to convert the 3d files used on the system to SVG. I figured I may as well share that, and so you can find it on my github here .

    Of course, the first thing I made using this engraver was a 3D engraving of the USS Enterprise 1701-D inside of a BK7 Prism. Because why not?!?!

  • 8020 Extrusion Optic Sliders

    For complicated systems which may use reflection or episcopic combined paths, additional pieces of extrusion can be cut and aligned to a core axis quite easily, and even attached in 3 rotations (left, right and “up” from the primary optical axis). Extrusion pieces can be ordered pre-cut, or easily cut to length using a hacksaw. Right angle clamps avoid any angular errors caused by bad cuts. Personally I use a mill to face off the ends, but most people don’t have access to a mill.

    In this image I use the extrusion to align a large optic, with further parts out of frame.

    To make things even easier, it’s nice to be able to mark off critical dimensions on the extrusion with a felt tip pen, which is easily later removed from the anodized surface with IPA.

    In this example a high power excitation input was designed in Zemax to squeeze a bit more power from a fluorescent system. Before building the assembly the profile extrusion was used to verify the field collimation and flatness at the desired focal length.

    I’ve added all of the designs I frequently start from, in STEP format. If someone needs another format please let me know and I’ll export one.

    -Austin

  • Computational imaging continues to grow in microscopy

    The Waller Lab recently had a demo announcement of their awesome implementation of computational imaging. They have some examples on their lytro page, which look really cool! This got me thinking about the last 10 years or so, and how the combination of image capture with control over input and output image fields, has grown into a new force in microscopy today.

    It’s interesting to consider what techniques fit into the field of computational imaging. Optical microscopy has pushed into an ever smaller domain of resolution, to the point that Abbe’s laws need to be avoided in order to pull resolution out of an image. Consider the initial techniques used for this – phase, DIC, confocal, TIRF, and the like are contrast enhancement techniques of enhancing an image’s contrast, by either increasing the signal intensity, or by reducing the surrounding noise/background intensity.  Beginning with the Apotome, and maybe earlier, with deconvolution, a combination of using multiple image samples with post-capture image processing, to gather more information than can be obtained by a single image, started to emerge.

    Building on these first techniques, we can see further sampling methods in the optical domain, like STORM/PALM, where optical control over emission is coupled with high sampling rates, and back-end processing, to statistically avoid Abbe’s laws. I’d imagine FLIM falls into this category as well, using time and multiple images, again to extract more data than may be obtained by a single sample. Non-microscopy applications for yet another method in this domain, the employment of coded apertures, similar to this work from MIT,  are growing in a number of imaging fields.

    This combination, of computing power + controlled image fields, can be employed to do all sorts of as-yet untouched things with a conventional microscope. I can imagine that very soon, we will see a few of the following products available for use:

    • phase contrast, and fluorescent, multi-capture resolution enhancement systems, all built into an “off the shelf” microscope
    • angular changes to fluorescence excitation, used to improve resolution
    • wavelength-based restriction inside an image field, to eliminate the potential for crosstalk in emission
    • multiple excitation power sampling, to pull greater dynamic range from images
    • multiple cameras used with restricting apertures, used to pull focus information, or multiple focal fields, from a single position in a sample

    These are only a few ideas where this can go, but the general path I can see in the future is lower cost components, which are leveraged to do better and better work, which gives more imaging power to a greater number of researchers. At least – that’s a future I’d like to see 🙂

    -Austin

     

     

     

  • Optical Design comes to the iPad!

    Over the past 5 years, almost every project I’ve worked on has required some level of optic design. In many cases, simple designs suffice. For example, projecting an LED can be accomplished at a basic level with an aspheric condenser. But when designs require flat fields, especially corrective elements, or apochromatic performance, it’s time to leverage commercial tools like Zemax. Luckily, I have one of the best Zemax gurus on the planet on hand for such work. But there is a middle ground where I want to work on designs I’d call basic+. This is where there has never been a clear solution. In such cases, the best compromise is to buy experimental grade lenses, and test them empirically.

    Obviously this presents 3 problems:

    • shipping time + setup time = a long iterative design process.
    • when issues are found, the only solution is to snag a few more lenses and test, vs.  modeling a solution.
    • The end result is “good enough” , but it’s unknown as to where other improvements may be found.

    So imagine my surprise when I found an app for ray tracing and modeling, in the App store! Too good to be true – has to be a joke, right? Nope – Check out this short example, showing the Nikon 105mm SLR lens.

    [youtube width=”600″ height=”365″ video_id=”KPwETNTQfFI”]

    You can read more about RayLab here – http://www.raymak.com/wp/  or can download it on the app store here.

    The basic app is ~ $2.00. Adding all of the features will run just under $30. Considering that the cheapest alternative runs ~ $1500, this is an amazing deal. Anyway – I hope others find this as useful as I have!

    Oh one more example – here’s the optical design for a Zeiss 40x objective! Cool huh?!?!

    Zeiss_40_Raylab

    -Austin

  • iPhone 6s Zoom & Resolution

    Ever notice that no matter what zoom setting you use on an iPhone, the resolution of the captured image is the same? This defies convention, as normally, as a sensor is cropped digitally, the resolution of the resulting image should decrease. With Apple iDevices, this isn’t the case. The native resolution is always the same, regardless of the zoom setting used!

    iphone min vs max zoom
    Both of these images have the same XY resolution from the same iPhone 6s!

    But some cropping MUST be going on, as there isn’t an optical zoom assembly inside the iPhone. At the same time, looking at the file sizes of captured images, it’s obvious some compression is employed, and one must assume this compression is near lossless for a given mag, so the Apple gurus must know what the true resolution of a field is, and employ a scaled compression to not exceed the inherent resolution of the captured image. Or rather, that’s what I assume is going on.

    In order to test this theory, I printed an ISO standard test image (ISO 12233 @2014 to be specific), set up my iPhone 6s at a distance of 22″ from the target, and obtained a set of images, increasing in magnification from 1x, to the maximum allowed “zoom”, with as discrete steps as could be managed with touch controls. In total I captured 29 independent magnification steps.

    First, here’s a look at the compression change over mag. For each image captured, I recorded the gross file size. Plotting this shows a direct inverse correlation between mag and filesize. As we know the resolution and bit depth of the file is unity, the only change must be the compression level used for a given mag setting.

    iphone6_mag vs filesize

    So the next question is, how is maximum optical resolution (or rather “system resolution” affected by increases in magnification? The common method used to determine this for microscopy systems is the Rayleigh criterion , which basically says that maximum resolution is determined by the smallest spacing measured between two points (referred to as “minimum resolvable distance”). So in this case, we have a nice set of lines which gradually get closer together, and thinner, and which act as an excellent test standard we can use to compare maximum image resolutions.

    Quick caveat here – my method of determining when minimum resolvable distance has been reached, is to use a dynamic ROI profiling tool on a line scan, and drag the line towards the thinner set of line spacings, until I cannot resolve in the ROI profile window, a measurable separation between the lines. While I admit this isn’t a hyper accurate method, I believe it to be adequate for this purpose. Anyone who might have a better solution is welcome to share!

    So – here’s an example of a measurement on the lowest magnification. The steps to perform this measurement are:

    1. Open sample image using Fiji
    2. increase image zoom until horizontal resolution lines are clearly visible
    3. Draw vertical line
    4. open ROI profiling tool
    5. Move line towards minimum resolution until no separation is visible between one line pair.
    6. Move line back until pair lost is recaptured.
    7. Record result.

    low mag resolution measurement

    So how does resolution compare to zoom? This graph is quite interesting! Note that a subsample of the total available images was filled, once maximum resolution was reached.

    resolution vs mag iphone 6s

    What’s compelling here is that the maximum resolution is reached at a relatively low mag value of ~ 1.496x. Further magnification beyond 1.496x would appear to only reduce field of view, and corresponding filesize. What’s also interesting is that the resolution available to the phone owner can INCREASE by using zoom! This is not normally the case for cameras which employ “digital zoom”.

    How can you leverage this information? The next time you want to capture a distant scene with your iPhone, and want to capture the maximum resolution available while also snagging the greatest FOV, set the zoom to around 30% of the available range, and you’ll have a good balance between resolution and field of view!

    *Notes

    • Zoom was calculated by comparing the size of a target object in each image relative to the lowest magnification image.
    • If you’d like to view the source data collected during this experiment, it’s available here. *Images are also available, please post a request if you’d like them!

    Austin

  • Cutting Filters using a CNC

    SO I had a project where I needed a specific size of beamsplitter and I needed it quickly. Unfortunately, the type I needed wasn’t available from the usual sources, at least, not without a few days of lead time. What to do? It turns out, crazier people than me have been using CNC machines to cut glass!

    So, I made a jig from acrylic, and cooked up a hold down method, and voila, after a few attempts and figuring out how to hold the part, I was able to cut both sides of 2 of these small beamsplitters successfully! Unlike the linked example, I simply used water as a coolant, and submerged the workpiece in a recessed channel in order to provide cooling during the cut. I used a dremel diamond engraving bit, likely not the best choice, but it’s what I had avaailable. Feed speeds were @ 0.61 IPM with an RPM on the spindle @ 2600. Finish was a bit rough, but definitely useable! I figure the difference between my work and the example above is the end mill selection. Anwyay – If you ever find yourself in a similar pickle, and have access to a CNC, it might be worth a shot.

     

Social Media Auto Publish Powered By : XYZScripts.com