Data Preparation (STFT) #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 1: Importing Necessary Libraries
Before data preparation begins, the code imports essential libraries for data manipulation, visualization, and machine learning.
Step 2: Loading the CSV Files
The code reads vibration data from 16 CSV files, each representing a different bolt loosening case.
Visual Representation:
Each DataFrame (
df1,df2, ...,df16) contains raw vibration data:Step 3: Storing DataFrames in a List
All DataFrames are stored in a list for easy iteration.
Step 4: Renaming Columns for Consistency
The code standardizes the column names across all DataFrames to ensure consistency.
Visual Representation:
Step 5: Extracting Signals from Each DataFrame
Signals from both sensors are extracted and stored in separate lists.
signal_sensor1: List of NumPy arrays containing data from sensor 1 for each case.signal_sensor2: Similar list for sensor 2.Visual Representation:
Step 6: Visualizing Raw Vibration Signals
The code plots the raw signals to understand the data visually.
(Note: As this is a text-based medium, please imagine a plot with two lines representing sensor 1 and sensor 2 signals over time.)