|
@@ -6,7 +6,7 @@ from service.trans_service import get_wave_conf, save_df_to_db, get_or_create_wa
|
|
|
get_wave_data, delete_exist_wave_data
|
|
|
from utils.file.trans_methods import *
|
|
|
from utils.systeminfo.sysinfo import get_available_cpu_count_with_percent
|
|
|
-
|
|
|
+from os.path import *
|
|
|
|
|
|
class WaveTrans(object):
|
|
|
|
|
@@ -55,8 +55,6 @@ class WaveTrans(object):
|
|
|
for point in mesure_poins:
|
|
|
map_dict[wave_conf[point]] = point.replace('conf_', '')
|
|
|
|
|
|
- map_dict['rotational_speed'] = 'rotational_speed'
|
|
|
-
|
|
|
with multiprocessing.Pool(split_count) as pool:
|
|
|
file_datas = pool.starmap(self.get_data_exec, [(base_param_exec, i) for i in all_files])
|
|
|
|
|
@@ -69,14 +67,12 @@ class WaveTrans(object):
|
|
|
|
|
|
if mesure_point_name in map_dict.keys():
|
|
|
result_list.append(
|
|
|
- [wind_turbine_name, time_stamp, sampling_frequency, 'rotational_speed', [float(rotational_speed)]])
|
|
|
-
|
|
|
- result_list.append(
|
|
|
- [wind_turbine_name, time_stamp, sampling_frequency, mesure_point_name, mesure_data])
|
|
|
+ [wind_turbine_name, time_stamp, rotational_speed, sampling_frequency, mesure_point_name,
|
|
|
+ mesure_data])
|
|
|
|
|
|
df = pd.DataFrame(result_list,
|
|
|
- columns=['wind_turbine_name', 'time_stamp', 'sampling_frequency', 'mesure_point_name',
|
|
|
- 'mesure_data'])
|
|
|
+ columns=['wind_turbine_name', 'time_stamp', 'rotational_speed', 'sampling_frequency',
|
|
|
+ 'mesure_point_name', 'mesure_data'])
|
|
|
df['time_stamp'] = pd.to_datetime(df['time_stamp'], errors='coerce')
|
|
|
df['mesure_point_name'] = df['mesure_point_name'].map(map_dict)
|
|
|
df.dropna(subset=['mesure_point_name'], inplace=True)
|