Researchers in the Atomic-Molecular-&-Optical-Sciences Group, within the Chemical Sciences Division at Berkeley Lab (LBNL), have developed a novel technique for investigation of nonlinear physical processes with time-resolved measurements scaled at the molecular level. This project was performed to support automation of redundant data processing tasks and to develop open-source visualization tools that increase efficiency of data analysis performed in the laboratory.
- Alleviate restrictive dependencies on generic proprietary visualization software.
- Oversee DAQ remotely, from multiple work stations.
- Provide flexibility of display through additional control options.
- Allow for user driven modifications as the technique evolves.
- Visualize data from multiple sources, for direct comparisons.
- Dynamically generate interactive graph traces of multidimensional data.
- Zoom into user defined quadrants of interest.
- Import datasets from multiple files.
- Quantify quality of data throughout DAQ procedures.
- Enhance ease of analytic collaboration between researchers.
- App Overview
- Background
- Data Processing & Visualization
- Next Steps
- Software Requirements
- Acknowledgements and Contact
5 Python files to run the dashboard:
- [
preprocessing.py
]: Load raw data with Pandas - [
app.py
]: Build the app: Define Dash instance with app variable - [
index.py
]: Entry point: Run the app - [
callbacks.py
]: Define interactivity of visuals - [
layouts.py
]: Dashboard structure
Instructions:
- Install packages listed in Python3 Dashboard requirements.txt file located in the root directory of this repository
- Assign a relative path for datasets in preprocessing.py (DEFAULT: trial dataset in
data
folder located in the root directory) - Run index.py (see Software Requirements below to alternatively launch app with Jupyter)
NOTE: This section is a simplified overview of the UTPS technique.
Advanced & curious readers may discover a more thorough overview in the assets folder.
The raw data are voltage signals representing variations to well characterized laser light after it interacts with a carefully prepared molecular target. The technique requires three laser pulses to arrive on target in a precisely timed sequence. To control the timing, two remotely operated motors (A.K.A. "delay-axes") vary the path length of each pulse by directing them through a labrynth of optics.
The response of a molecule to light occurs very, very rapidly so timing is an important challenge faced by the reasearchers. To overcome this hurdle the team conducts a methodical scan over a calculated range of motor positions (which directly convert to time delays) through a series of evenly spaced steps. This scanning process is repeated several times, over the course of several hours, providing a fair amount of opportunity for equipment to malfunction, changes in the laboratory environment to occur, etc. This dashboard is used to aid in identification of the optimally timed sequence of interaction-events and to understand fluctuations in the data, as well as to make new discoveries supported by the U.S. Department of Energy's Basic Energy Sciences Program.
-
Configuration #1 : "3-Pulse Experiment"
- Excitation (pump) Pulse
- Kerr Gating (drive) Pulse --> Photodiode #3
- Probing Pulse --> Photodiodes #1 & #2 (no cross polarizer)
-
Configuration #2 : "No Probe Experiment"
- Excitation (pump) Pulse
- Kerr Gating (drive) Pulse
- Probe BLOCKED
-
Configuration #3 : "No Drive Experiment"
- Excitation (pump) Pulse
- Drive BLOCKED
- Probing Pulse
trial_output05.tsv
: Description (source | data dictionary)
Notes about the data:
- n = Total number of motors moving, through a set of predetermined positions, during each scan.
- n = 1: Motor for Pump-Pulse to Probe-Pulse Delay Axis (T)
- n = 2: Motor for Kerr-Gating-Drive-Pulse to Probe-Pulse Delay Axis (Tau)
- n = 3: Motor for polarization control (hypothetical future implementation)
- n = 4: Motor for sample position control (hypothetical future implementation)
- Dimensions of motor position are millimeters, with a direct conversion to femtoseconds
- The tab separated text files store original research data from 8 independent channels acquired with NIDAQ-National Instruments Data Acquisition software.
- Channels are 0-indexed from 0-7
- Future research may incorporate more channels than 8.
- An error may consist of a communication error b/w laser-motor system & acquisition computer. Motors will be reinitialized, and the scan is restarted.
- Raw data is aggregated by averaging all ACTUAL motor positions, grouped by each TARGET position.
- Create a remove subplot feature
- Add a box and whisker plot to scan data
- Present dataset synopsis on dashboard
- Support real-time updates
- Include warning response for clearing input
- Deploy with Heroku
See requirements.txt listed in root directory
To render dashboard from Jupyter
- Edit app.py
COMMENT OUT:
app = dash.Dash(__name__, suppress_callback_exceptions=True, external_stylesheets=[themes.SPACELAB])
UNCOMMENT:
from jupyter_dash import JupyterDash
app = JupyterDash(__name__, suppress_callback_exceptions=True, external_stylesheets=[themes.SPACELAB])
- Install additional requirements listed above
- Launch app-jupyter.ipynb in place of index.py
- [
Dash Python User Guide
] (Documentation): (Dash.Plotly Reference Guide) - [
Dash Bootstrap Components
] (Documentation): (source) - [
Plotly Graphing Library: Creating and Updating Figures
] (Documentation): (source) - [
Heatmap Graph Object
] (Documentation): (Plotly API Reference) - [
Scatter Graph Object
] (Documentation): (Plotly API Reference) - [
Community Forum
] (User Support): (Plotly) - [
Charming Data
] (Video Tutorials): (YouTube Channel)
Time-Resolved Ultrafast Transient Polarization Spectroscopy...
Review of Scientific Instruments: (source)Ultrafast Dynamics of Excited Electronic States in Nitrobenzene...
Journal of Physical Chemistry A: (source)
- Data located in the
relative_path
directory are stored as Pandas DataFrames in the list-objectdata_dict
.
Column | Data Type | Variable | Location | Description |
---|---|---|---|---|
#errors | int | data_dict[i] | preprocessing.py | Miscommunication "connection" error flag |
scan# | int | data_dict[i] | preprocessing.py | Name of the trial run for each experiment |
motor-target_n | float | data_dict[i] | preprocessing.py | Position targeted by nth motor |
motor-actual_n | float | data_dict[i] | preprocessing.py | Position reported by nth motor |
data_channel_n | float | data_dict[i] | preprocessing.py | Raw signal from two photodiodes |
Component ID | Library | Name | Filename | Description |
---|---|---|---|---|
add_graph | Dash Bootstrap | Subplots | layouts.py | Appends a duplicate dashboard to existing state |
Callback Name | Output | Arguments | Filename | Description |
---|---|---|---|---|
update_active_filename | filename{idx} | *args_nclicks | callbacks.py | Based on n-clicks, updates active filename |