⏲️ Real-Time Behavioral Scoring with Excel Export 🖥️KivyMD
Problem:
Our lab's method for quantifying freezing behavior (a proxy for their fear response)
in experimental test subjects involved a labor-intensive and error-vulnerable process.
Observers manually check each subject for freezing behavior every ten seconds,
recording results on paper. These observations are individually aggregated by hand,
into minute intervals to calculate the percentage of freezing time per minute.
The data is then manually transferred to an Excel spreadsheet and reformatted
for statistical analysis and graphing. This multi-step process not only creates a
significant bottleneck in data analysis but also increases the likelihood of introducing errors,
thus compromising the efficiency and accuracy of the research.
Solution:
To streamline the quantification of freezing behavior and minimize errors,
a Kivy-based graphical user interface (GUI) application was developed.
This application allows observers to record freezing behavior in real-time by
selecting the subject's status (check-box indicating freezing or not) on a screen
at ten-second intervals. The backend of the application performs automated calculations
and formats the data into an Excel spreadsheet, detailing the percentage of freezing
time per minute. This automated process eliminates manual data handling and formatting,
reducing errors and accelerating data processing. The resulting spreadsheet is immediately
compatible with the lab’s statistical analysis software, facilitating seamless further analysis.
The application also includes user-friendly controls and visual feedback to enhance the
recording process and ensure data accuracy.
Freezing Quantification UI
Video demonstrating the desktop application's functionality
🧮 End Weight of Diluent Calculator 🖥️PySimpleGUI
Problem:
The problem involved accurately quantifying the amount of pure ethanol
(EtOH) ingested by test subjects from the gram weight consumed of a percent ethanol solution in water.
The method requires measuring the solution's weight change before and
after consumption. Since ethanol has a lower density than water, the
solution’s weight per milliliter deviates from pure water, complicating
direct weight-based calculations. The task was to account for this density
variation to determine the exact volume of pure ethanol consumed.
Solution:
To solve this problem, a desktop application was developed that enables
users to input the specific gravity of the stock liquid, the target volume
percentage (Vol/Vol) for dilution in water, and the desired final volume.
The application calculates the required quantities of each component in
milliliters to create the specified final solution. Additionally, it
provides the corresponding weights in grams for each component, allowing
precise formulation and ensuring accurate knowledge of the weight of the
stock liquid in each milliliter of the final solution. While initially
designed to handle ethanol solutions, the application can be used for any
liquid with a known specific gravity, making it a versatile tool for
various dilution calculations.
Desktop Application's UI
Short video demonstrating the desktop application's functionality
Click Link to Try My App Emulated on Streamlit
Streamlit Emulation Preview Image
🧪 3:2 Solution Calculator 🖥️PySimpleGUI
Problem:
To prep laboratory animals for surgical procedures, a 3:2 anesthetic
solution needed to be created. The amounts to use are straight forward if someone needs
exactly 5 units of total volume of final solution, however, this is often
not the case. Doing these calculations by hand takes valuable procedure
time and can be vulnerable to error.
Solution:
Using Python and the PySimpleGUI framework, a desktop application was
designed for calculating any final volume's component amounts
requiring a 3:2 mixture. The app increases workflow efficiency and
eliminates human error as well as the arduous rigors of pencil and paper mathing.
Desktop Application's UI
Short video demonstrating the desktop application's functionality
Click Link to Try My App: PySimpleGUI Emulated on Streamlit
Streamlit Emulation Preview Image
💉 Mg/Kg Dose Calculator for Gram Body Weights 🖥️Tkinter
Problem:
Accurate drug dosing is critical
in experimental research involving animal subjects, especially for
tests that depend on precise drug formulations. In our lab, we trained
students who were new to scientific research and animal models of
neurobiology. A significant challenge they faced was converting between
different units: animals are weighed in grams, drugs are measured in
grams, but dosing calculations must be expressed in milligrams of drug
per kilogram of animal body weight. This complexity in unit
conversions frequently lead to confusion and errors among novice
scientists, impacting the accuracy and reliability of dosing.
Solution:
To reduce confusion around unit
conversions and prevent calculation errors in drug dosing, a Tkinter
desktop application with three key functionalities was developed.
This application facilitates accurate drug formulation with three
primary calculation functions:
Calculating the required drug weight in both
grams and milligrams based on the total volume of solution to be
prepared and the desired mg/kg dose
Determining the drug weight needed in grams
and milligrams using the individual weights of animals in grams and
the mg/kg dose
Computing the total drug weight in grams and
milligrams by considering the combined weight of the animals and the
specified mg/kg dose
By automating these calculations, the application aids novice
scientists in achieving accurate dosing with ease and confidence.
Tkinter UI
Short video demonstrating the desktop application's functionality
⏱️ Behavioral Timer with Excel Data Output 🖥️Tkinter Openpyxl
Problem:
In our laboratory, we needed to
quantify specific behaviors of animal test subjects during social
interactions by tracking their frequency and duration. This process
required continuous human observation, without the ability to look
away to write paper notes or enter numerical data to a screen.
Additionally, the need to monitor multiple behaviors and capture
discrete occurrences in real time could not be effectively managed
with traditional tools such as stopwatches or multiple timers,
which would lead to inefficient and inaccurate data collection.
Solution:
A Tkinter desktop application was developed to address the need for
detailed behavioral quantification. The application enables the user
to quantify three different behaviors during one interaction session
by recording total time and bout durations, and includes a tally for
an additional discrete, fleeting behavior. With an easy-to-navigate
interface, the application facilitates user input and outputs all data
into a user-defined Excel spreadsheet for efficient data handling and
analysis.
Tkinter UI
Short video demonstrating the desktop application's functionality