Skip to content

Instantly share code, notes, and snippets.

@MaxClerkwell
Last active March 20, 2025 19:49
Show Gist options
  • Save MaxClerkwell/bbe0b19fcf2f007b89dd25e2229ed832 to your computer and use it in GitHub Desktop.
Save MaxClerkwell/bbe0b19fcf2f007b89dd25e2229ed832 to your computer and use it in GitHub Desktop.
This script can be used to display captured data from an AUTO-INTERN OmnAIScope (https://www.amazon.de/OmnAIScope-AUTO-INTERN-Aufl%C3%B6sung-Scriptbar/dp/B0DY1FJDPC/)

OmnAIScope CSV Plotter

This script is designed to visualize data recorded with the AUTO INTERN OmnAIScope, a USB Analog Signal Recorder. It reads CSV data exported from the OmnAIScope and generates a plot.

To purchase an OmnAIScope, visit: Amazon

To learn more about the OmnAIScope, visit: OmnAIScope Website

Features

  • Reads CSV files recorded with OmnAIScope
  • Displays the data in a plot

Installation

Before running the script, it is recommended to use a virtual environment.

1. Clone Repository & Set Up Virtual Environment

git clone https://gist.github.com/bbe0b19fcf2f007b89dd25e2229ed832.git OmnAIPlot
cd OmnAIPlot
python3 -m venv OmnAIPlot
source OmnAIPlot/bin/activate

2. Install Dependencies

pip install -r requirements.txt

Usage

Run the script with the required arguments:

python OmnAIPlot.py -i data.csv

where:

  • -i, --input specifies the CSV file recorded by OmnAIScope.

This will generate a plot from data.csv and display it using matplotlib.

Dependencies

This script requires the following Python libraries:

contourpy==1.3.1
cycler==0.12.1
fonttools==4.56.0
kiwisolver==1.4.8
matplotlib==3.10.1
numpy==2.2.4
packaging==24.2
pandas==2.2.3
pillow==11.1.0
pyparsing==3.2.1
python-dateutil==2.9.0.post0
pytz==2025.1
six==1.17.0
tzdata==2025.1

Ensure all dependencies are installed before running the script.

Notes

  • The script assumes the first column in the CSV file represents timestamps, and the second column contains the measurement data.
  • If the CSV file has additional columns, they are ignored.

License

This script is provided as-is and is meant for use with the OmnAIScope by AUTO INTERN.

import pandas as pd
import matplotlib.pyplot as plt
import argparse
def load_data(input_path):
df = pd.read_csv(args.input_file, header=0, skipinitialspace=True, encoding="utf-8")
df.columns = df.columns.str.strip()
return df
def show_plot(dataframe):
plt.figure(figsize=(10, 5))
plt.plot(dataframe[dataframe.columns[0]],
dataframe[dataframe.columns[1]],
marker="x", markersize=2, linestyle="-",
label="Values"
)
plt.xlabel("Timestamp [s]")
plt.ylabel("Measurement in [V]")
plt.title("OmnAIScope")
plt.legend()
plt.grid(True)
plt.show()
if __name__ == "__main__":
# parse arguments
parser = argparse.ArgumentParser(description="Read OmnAIScope CSV and plot graph")
parser.add_argument("-i", "--input_file", type=str, help="Filename of OmnAIScope Data")
args = parser.parse_args()
data = load_data(args.input_file)
show_plot(data)
contourpy==1.3.1
cycler==0.12.1
fonttools==4.56.0
kiwisolver==1.4.8
matplotlib==3.10.1
numpy==2.2.4
packaging==24.2
pandas==2.2.3
pillow==11.1.0
pyparsing==3.2.1
python-dateutil==2.9.0.post0
pytz==2025.1
six==1.17.0
tzdata==2025.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment