Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alejoduarte23/reading_data_from_dewesoft
The following repository retrieves sensor data (acceleration and strains) from both local and cloud databases. It processes the data using classes from another repository called Modal Engine for spectral analysis, modal analysis, and signal processing.
https://github.com/alejoduarte23/reading_data_from_dewesoft
dewesoft matplotlib modal-analysis numpy orm scipy signal-processing sql sqlalchemy
Last synced: 25 days ago
JSON representation
The following repository retrieves sensor data (acceleration and strains) from both local and cloud databases. It processes the data using classes from another repository called Modal Engine for spectral analysis, modal analysis, and signal processing.
- Host: GitHub
- URL: https://github.com/alejoduarte23/reading_data_from_dewesoft
- Owner: AlejoDuarte23
- Created: 2024-07-16T17:10:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T05:28:12.000Z (3 months ago)
- Last Synced: 2024-10-12T05:23:03.144Z (25 days ago)
- Topics: dewesoft, matplotlib, modal-analysis, numpy, orm, scipy, signal-processing, sql, sqlalchemy
- Language: Python
- Homepage:
- Size: 495 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# README:
The following repository fetches data from both local and cloud databases to fetch data from sensors (acceleration and strains) and processes the data using the classes from another repository called Modal Engine for spectral analysis, modal analysis, and signal processing.## Request data from data base
```python
from config import database_uri_local, connection_string, table_name
from orm_model import get_measurements_between_dates, Base, create_engine, sessionmaker , measurements_to_numpy ,create_measurement_class,get_latest_measurementssession = create_session(connection_string)
start_date = datetime(2024, 7, 27, 20, 25, 0, 0)
end_date = datetime(2024, 7, 27, 22, 25, 0, 0)
Measurement = create_measurement_class(table_name)
measurements = get_measurements_between_dates(start_date, end_date, session, Measurement)data_array = measurements_to_numpy(measurements) #Ndarray
```## Process data: Plot spectrogram
```python
from Modal_Engine._engine import (SingleMeasurement,
FFTDomain,
DataVisualizer)def plt_spectrogram(measurement: SingleMeasurement):
fdomain = FFTDomain(measurement,NFFT=2**6)
fdomain.fft()
data_vis1 = DataVisualizer(fdomain)
data_vis1.plot_spectrogram(cmap='jet')file_name = "data/measurements_2024_7_27:20:25_2h.pkl"
data_set_time = "2024/7/27:20:25"
data_array = load_pickle(file_name)
filter = [0, 2, 4]
measurement_1 = SingleMeasurement(name = f"{data_set_time} - Axis: X", fs = 100,file_path= None,
description="2h test")
measurement_1 = measurement_1.set_data(data_array[:,filter]).resample(30)
plt_spectrogram(measurement_1)
```# Result
![Spectrogram](data/spectrogram.png)