Intensity Calibration of HR4000 Without Using a Calibration Lamp
Building Wrapper Library to use PICam SDK in LabVIEW
This project is a simple C++ wrapper for the PICam SDK. The purpose of this wrapper is to resolve necessary pointers, perform data conversions, and expose certain functions to LabVIEW. The wrapper is designed to be used in LabVIEW as a DLL. The wrapper is not a complete wrapper for the PICam SDK, but it does provide a good starting point for developing a more complete wrapper.
Optical/Chemical Kinetics (Update 2023/10/02)
I have added an updated Mathematica file here
named as “DecayModelling.nb” that has more details on how to drive the model from
a set of differential equations and initial conditions. Additionally, it has
all the analytical solution at the end with thoughtfully organized modules.
The modules can be mixed and matched to build several models.
Wandering Baseline Correction
For my experiment which was related to picking signal from a sensitive
load sensor I needed a way to remove the wandering baseline. The
sensor was connected to small fish and the resulting signal
suffers from natural wandering baseline. Simply taking
a mean of buffered data could not give an acceptable result,
therefore I wrote this piece of LabVIEW code.
Create Fixed Length String from the LabVIEW Controls' Label and Value
For the programs I wrote, I wanted to save all the controls values and theirs labels
along with some remarks on the experiments to a text file. This file could be used
later to reproduce the same result or report the used parameters.
Fast Bidirectional Data Communication Between LabVIEW and Python
I have put together a demo project that passes JSON object between LabVIEW and Python over
UDP socket. There are several advantages here compare to my previous demo.
A Simple OMR Study Program (for Zebrafish)
For my experiment I was set to make program that can trigger swimming behaviour in an head-fixed adult zebrafish. This kind of behaviour can be triggered by presenting a moving grating. To do so I made simple animation for different kind of moving grating that can trigger the swimming in upward, downward, left, right, forward and backward direction in Blender. The with a simple labview program I can read the frames and have control over the frame-rate.
Control Ableton Live with OSC through Max for Live
One can’t imageing to what extent a bored man can go! To prove this I always wanted to control my Ableton Live set with my iPad. I wanted to have full control. I started with TouchOSC but I found it very limiting. They I saw “TouchAble” and “LK”. “LK” looks like a great piece of work with an active maintanance. So I bought that. Then before actually making any music I thought wouldn’t it be cool if I could make my own control surface! Well it is very very cool. I also always wanted to learn Max so I found this a good opportunity to learn and build something that I can use along with LK.
Detecting Cell Units (Neurons) and Their Activies
The past two years as my first postdoc project I started building a two photon microscope and virtual reality setup. The setup runs in a close loop so the animal behaviour can be mapped to its brain activity. To extract the neurons activities I ended up using CaImAn package in Matlab. To ease my pain and build a smooth pipeline for my application I build a script that calls CaImAn function in a certian order. The script starts with a popup that ask for user input for essential parameters and then ask for the image file. At the end, after the script finishes it will clean up the unncessary variables and save the rest for the user’s reference as a “.mat” file in the same directory.
UDP Sender/Receiver between LabVIEW and Python
I have been developing and imaging system that can monitor the brain activity at cellular level in a transgenic adult zebrafish brain. The imaging is done while the animal is swimming in an immersive virtual reality environment. The animal is head-fixed and forces are recoded with a load cell. With the sensors data I could get necessary metric to navigate in a 3D rendering environment. In our case, we used Panda3D which can be scripted in Python. The main challenge was how to send the meterics recorded in LabVIEW to the Python script. There are several ways to that, such as, Python node VI in LabVIEW, ActivX object, TCP and UDP. I chose UDP as I need fast (less than 10 ms) communication. ActiveX and Python node VI were not fast enough for my application. Although UDP is a lossy protocol, it is still suitable for my application.
3D Models
This repository is dedicated to all my home-brewed very experimental and functional 3D models. Feel free to use them how you see fit.
Complex Temporal Profile Fitting in MatLab (Lifetime Mapping in Time-resolved Transient Absorption Microscope (TAM) Images)
I tried to put together a demo file and project to demonstrate the procedure to undergo to map the lifetime or amplitude or etc to transient absorption images. The work was published in July 2020 that helped to shed light on grain boundaries relaxation dynamics.
Projectile Motion with Drag Force in Mathematica
As far as I rememeber this is my frist fully accomplished project.
I had to calculate and compare a projectile’s motion without and with the
air resistance (drag force). I basically keep this here for my own personal pleasure as a thing to remember.
If you evaluate the “Projectile-Comparison.nb” in this
repository you should be able to get something like below
Optical/Chemical Kinetics
This is a Mathematica file that evaluates a series of different kinetics from their differential equation form. Depending on whether doing chemistry or photochemistry this can find the concentration of products or the excitons respectively. The conditions are a typical summation of exponential decays, to profiles with a rise feature or a condition that the decay is proceeded after a spike (rise = decay time-constant).
Crystal Growth by Chemical Vapor Transport Technique (CVT)
During my master degree I managed to grow some ZnSSe crystals by CVT technique. To do that I had to find the right calibration curve for the temperature difference inside the tube-furnace. To do so I had to calculate the pressure of the possible species in the vaccum tube using the chernove bulk diffusion model.
Fitting TCSPC data in MatLab
I put together a small example of a typical TCSPC measurement. I used PicoHarp 300 from Picoquant. Great system but you are limited to their fitting software which can be something you not really looking for. Of course it can fit typical summation of exponential functions but if your fitting model is specific you might want to do this in MatLab or some other environement. Picoquant made availabe an script that can load picoquant proprietory files in MatLab. From Matlab you have unlimited freedom to deal with your data they way you want.
Phasor Analysis to Improve Resolution Enhancement in STED with Less Laser Power
STED is a well-known technique to achieve sub-diffraction resolution in fluorescent microscopy. This technique along with two other techniques recieved the noble prize in 2014. On chanllenge in STED is the second intense laser beam to deplete the excited state. One workaround to overcome this to some extend was publish here.
Reference Ciruite desing for a Sine Wave to Square Wave converter and DC Level Shitfter
In my past experiment I had to build a circuit to convert -1 to 1 sine wave to 0 to 1 sqare wave. It
was mostly due to saving cost and better inegration with the lock-in amplifier. I Used the THS3202EVM
board which is a evaluation board for the high-speed current amplifier. The simulation file in NI Multisim
format can be found in this repository
Multi-component Exponential Fitting algorithms in MatLab
Coming soon … I will update this page with all the codes I have written in MatLab to process multi-exponential decays. The instrument response function (IRF) can be synthsized or acquried then be numerically convoluted with the model for precise lifetime calculation. Alternatively, the model can be evaluated with the IRF in mind. Hopefully they can serve as an starting point or a reference for various applications.
Active and Passive Electronic Filter
I designed several filters (active and passive) to prevent the input saturation of lockin at different modulation frequencies. Over to this project I uploaded several active and passive filter designs that I used for my projects.
Tuned Amplifier (Replace Lockin with a simple circuit)
During my PhD program there were some concerns about the long time constant of the lock-in amplifer (SRS-844) which caused
directional bluring (along the fast axis) in our laser scanning microscope. Knowing the fact that lock-in amplifers are
costly I got the motivation to simulate and build an analogue circuit to overcome this. I was aware of a paper that discussed
a module (tuned amplifier) to replace a lock to detect estmulated Raman scattering (SRS) signal. I basically replated their work
which was also originated from a paper from 1992. Here I attach my design as a reference in case anyone wants to implement it in
therir system. In my case I got a funding source to buy a faster lock-in amplifier so I did not pursue this further. To get
design and PCB schematic files head over to this project.
Series of Macros for Repetitive Image Processing
My project typically involved extracting features from a time-resolved images. I was trying to get meaningfull metrics to compare mophological features and lifetime values accross the stack of images. To ease my pain I tried to automate as many operations as can. It all ended up with bunch of imagej macros that I am shairing here for others as a reference to get some ideas in case of doing something similar.
Laser Scanning Microscope Acquisition GUI in Labview
This is a post dedicated to the LSM acquisition software me and my co-woker (slash mentor Joy Chung). Most of the primary work has been layed out for me by Joy. I had minor contirbution to bring it together and refine the aesthetics. This LabVIEW is written over couse of 5 years and evolved kind of with me during my PhD and it’s very dear to me. I hope this can be useful for others as well as tool as is, a scheme how the the time resolved LSM interface should look like or as a code template for trouble shooting.