This project provides a Python-based graphical user interface (GUI) for visualizing, analyzing, and extracting data from TDMS files. The application allows users to select regions of an image, compute statistics, and save results.
- Load and visualize data from
.tdmsfiles. - Select channels and scan directions dynamically from dropdown menus.
- Manually select areas of interest on the image.
- Compute and display statistics for the selected region.
The following Python packages are required to run the application:
numpy
pandas
matplotlib
tk
nptdms
openpyxl
All the commands below are executed in the terminal
-
Clone the repository:
git clone https://github.com/CHILLQQ/cells_quadrants_extractor cd cells_quadrants_extractor -
Install the dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Use the GUI to:
- Load
.tdmsfiles using the "Load Data File" button. - Select scan direction and channel from the dropdown menus.
- Specify the size of the selection rectangle and physical dimensions.
- Select a region on the image by dragging the mouse.
- Compute statistics for the selected area.
- Save the selected area to files.
- Load
- Load Data File: Opens a dialog to load a
.tdmsfile. - Save Selected Area: Saves the selected region as a
.npyfile. - Compute Stats: Computes and displays mean and standard deviation for the selected region.
- Add New Area: Creates a new area selection object that is plotted on top of the previously plotted ones.
- Save Coordinates: Saves coordinates of all selected areas of the current file into a
.txtfile. - Save Im: Save the current image with all selected areas plotted as a
.pngfile. - Drop: Drop the current selections and start over.
- Scan Direction: Select scan direction (e.g., "Retrace (Frame 2)" or "Trace (Frame 1)").
- Channel: Select an AFM channel from the loaded file.
- Rectangle Size (px): Specify the size of the selection rectangle in pixels (default: 256).
- Load a
.tdmsfile containing data. - Select the desired scan direction and channel.
- Use the mouse to select a region of interest on the image by pressing Add new area button.
- Press Save Selected Area button to export all the channels for the selected area.
- Keep repeeting steps 3 and 4 until enough areas are selected.
- Press Save Im to save the image of the file with all the selected areas.
- Press Add New Area one more time to save the coordinates of the latest selected area.
- Press Save Coordinates to save a list of coordinates of all selected areas.
