Ejemplo n.º 1
0
import numpy as np
import openpyxl as excel
import matplotlib.pyplot as plt
from ProcessClass_10 import ProcessSignal

test = ProcessSignal('200924')
test.files_classification()
csv_types = test.read_type_file()
csv_signals = csv_types['signal_files']
csv_signal_nums = csv_types['signal_nums']
excel_dicts = test.read_excel(csv_signal_nums)['numbers']
magnetron_nums = excel_dicts['magnetron']
plasma_nums = excel_dicts['noise']
print('Magnetron nums are:', magnetron_nums, 'REB nums are:', plasma_nums)
pl_densities = np.zeros(len(csv_signals))
integrals = np.zeros(len(csv_signals))
nums = np.zeros(len(csv_signals))
test.reduce_fft()
for i, csv_signal in enumerate(csv_signals):
    csv_signal_num = csv_signal[3:6]
    file = test.open_file(csv_signal, reduced=True)
    pl_density = test.read_excel(
        csv_signal)['dicts'][csv_signal_num]['Ток плазмы, А']
    pl_densities[i] = pl_density
    time = file['time']
    voltage = file['voltage']
    t, u, dt = file['time'], file['voltage'], file['time_resolution']
    fft = test.fft_amplitude(t, u, dt)
    freqs = fft['frequency']
    amps = fft['amplitude']
    n_dt_2 = (t[-1] - t[0])**2
Ejemplo n.º 2
0
def write_file(exp_num):
    fft_test = ProcessSignal(f'{exp_num}')
    fft_test.files_classification()