|
@@ -3,6 +3,21 @@
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": 2,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "### start to get data PK10001A326000123 from 2021-07-06 00:00:00 to 2021-07-07 20:00:00\n",
|
|
|
+ "# get data from 2021-07-06 00:00:00 to 2021-07-07 00:00:00......... \n",
|
|
|
+ "Server Error, retry 1...... \n",
|
|
|
+ "# get data from 2021-07-07 00:00:00 to 2021-07-07 20:00:00......... \n",
|
|
|
+ "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
|
|
|
+ "\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
"source": [
|
|
|
"# 获取数据\r\n",
|
|
|
"import sys\r\n",
|
|
@@ -19,26 +34,13 @@
|
|
|
"df_gps = df_data['gps']\r\n",
|
|
|
"df_accum = df_data['accum']\r\n",
|
|
|
"df_system = df_data['system']"
|
|
|
- ],
|
|
|
- "outputs": [
|
|
|
- {
|
|
|
- "output_type": "stream",
|
|
|
- "name": "stdout",
|
|
|
- "text": [
|
|
|
- "### start to get data PK10001A326000123 from 2021-07-06 00:00:00 to 2021-07-07 20:00:00\n",
|
|
|
- "# get data from 2021-07-06 00:00:00 to 2021-07-07 00:00:00......... \n",
|
|
|
- "Server Error, retry 1...... \n",
|
|
|
- "# get data from 2021-07-07 00:00:00 to 2021-07-07 20:00:00......... \n",
|
|
|
- "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
|
|
|
- "\n"
|
|
|
- ]
|
|
|
- }
|
|
|
- ],
|
|
|
- "metadata": {}
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": null,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
"source": [
|
|
|
"# 下载数据 \r\n",
|
|
|
"import sys\r\n",
|
|
@@ -51,13 +53,13 @@
|
|
|
"st = '2021-07-06 00:00:00'\r\n",
|
|
|
"et = '2021-07-07 20:00:00'\r\n",
|
|
|
"tools.data_download(write_path=write_path, sn=sn, start_time=st, end_time=et, data_groups=['bms'])"
|
|
|
- ],
|
|
|
- "outputs": [],
|
|
|
- "metadata": {}
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": null,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
"source": [
|
|
|
"# 数据预处理\r\n",
|
|
|
"import sys\r\n",
|
|
@@ -79,13 +81,13 @@
|
|
|
"df_bms_pro, df_gps_pro, res_record= dataPrePro.gps_data_judge(df_bms_pro, df_gps_pro)\r\n",
|
|
|
"# gps 数据可靠性判断, 并增加里程和速度至gps数据(根据已合并的数据段判断)\r\n",
|
|
|
"df_bms_pro, df_gps_pro, res_record= dataPrePro.data_gps_judge_after_combine(df_bms_pro, df_gps_pro)"
|
|
|
- ],
|
|
|
- "outputs": [],
|
|
|
- "metadata": {}
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": null,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
"source": [
|
|
|
"# 单cycle指标统计\r\n",
|
|
|
"import sys\r\n",
|
|
@@ -110,77 +112,66 @@
|
|
|
" print(indexSta.chrg_max_pwr_sta(np.array(df_sel_bms['总电压[V]']), np.array(df_sel_bms['总电流[A]'])))\r\n",
|
|
|
" print(indexSta.speed_sta(indexSta.odo_sta(np.array(df_sel_gps['odo'])), indexSta.acc_time_sta(np.array(df_sel_gps['时间戳'])), np.array(df_sel_gps['speed'])))\r\n",
|
|
|
" break"
|
|
|
- ],
|
|
|
- "outputs": [],
|
|
|
- "metadata": {}
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": 2,
|
|
|
- "source": [
|
|
|
- "# 生成pydoc 说明文档\r\n",
|
|
|
- "!python -m pydoc -w LIB\\BACKEND\\DataPreProcess.py"
|
|
|
- ],
|
|
|
+ "metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
|
- "output_type": "stream",
|
|
|
"name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
"text": [
|
|
|
"problem in LIB\\BACKEND\\DataPreProcess.py - ModuleNotFoundError: No module named 'DBManager'\n"
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
- "metadata": {}
|
|
|
+ "source": [
|
|
|
+ "# 生成pydoc 说明文档\r\n",
|
|
|
+ "!python -m pydoc -w LIB\\BACKEND\\DataPreProcess.py"
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": 1,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
"source": [
|
|
|
"from LIB.BACKEND import DBManager, Log\r\n",
|
|
|
"log = Log.Mylog(log_name='signal_monitor', log_level = 'info')\r\n",
|
|
|
"log.set_file_hl(file_name='info.log', log_level='info')\r\n",
|
|
|
"log.set_file_hl(file_name='error.log', log_level='error')\r\n",
|
|
|
"logger = log.get_logger()\r\n"
|
|
|
- ],
|
|
|
- "outputs": [],
|
|
|
- "metadata": {}
|
|
|
- },
|
|
|
- {
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": 6,
|
|
|
- "source": [
|
|
|
- "logger.error(\"ttt5\")"
|
|
|
- ],
|
|
|
- "outputs": [],
|
|
|
- "metadata": {}
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
"execution_count": null,
|
|
|
- "source": [],
|
|
|
+ "metadata": {},
|
|
|
"outputs": [],
|
|
|
- "metadata": {}
|
|
|
+ "source": []
|
|
|
}
|
|
|
],
|
|
|
"metadata": {
|
|
|
"interpreter": {
|
|
|
- "hash": "b3ba2566441a7c06988d0923437866b63cedc61552a5af99d1f4fb67d367b25f"
|
|
|
+ "hash": "69976922f58704918d459eb5dccc4a4074095a997db3fffa9f9946bbc3807710"
|
|
|
},
|
|
|
"kernelspec": {
|
|
|
- "name": "python3",
|
|
|
- "display_name": "Python 3.8.8 64-bit ('base': conda)"
|
|
|
+ "display_name": "Python 3.8.10 64-bit (conda)",
|
|
|
+ "name": "python3"
|
|
|
},
|
|
|
"language_info": {
|
|
|
- "name": "python",
|
|
|
- "version": "3.8.8",
|
|
|
- "mimetype": "text/x-python",
|
|
|
"codemirror_mode": {
|
|
|
"name": "ipython",
|
|
|
"version": 3
|
|
|
},
|
|
|
- "pygments_lexer": "ipython3",
|
|
|
+ "file_extension": ".py",
|
|
|
+ "mimetype": "text/x-python",
|
|
|
+ "name": "python",
|
|
|
"nbconvert_exporter": "python",
|
|
|
- "file_extension": ".py"
|
|
|
+ "pygments_lexer": "ipython3",
|
|
|
+ "version": "3.8.10"
|
|
|
},
|
|
|
"orig_nbformat": 4
|
|
|
},
|