Compare commits

...

2 Commits

6 changed files with 9 additions and 5632 deletions

View File

@@ -5,4 +5,7 @@
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings">
<option name="renderExternalDocumentation" value="true" />
</component>
</module> </module>

2815
1.csv

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1,7 +1,7 @@
import pandas as pd import pandas as pd
from cycle import cycle from cycle import cycle
filepath = "D:/python_project/1.csv" filepath = "D:/python_project_data/1.csv"
origin_data = pd.read_csv(filepath) origin_data = pd.read_csv(filepath)
row_len = origin_data.shape[0] row_len = origin_data.shape[0]
cow_len = origin_data.shape[1] cow_len = origin_data.shape[1]
@@ -9,12 +9,16 @@ disturb_data = origin_data
algorithm_step = cycle() algorithm_step = cycle()
cow_name = "G1.TTXD1_3" cow_name = "G1.TTXD1_3"
contrast_data = pd.DataFrame()
contrast_data[cow_name+'_origin'] = origin_data[cow_name]
algorithm_step.set_config('{"CYCLE_AMPLITUDE_BASE": 200 , "CYCLE_TIME_BASE": 5 ,"CYCLE_START_ANGLE_BASE": 3.14}') algorithm_step.set_config('{"CYCLE_AMPLITUDE_BASE": 200 , "CYCLE_TIME_BASE": 5 ,"CYCLE_START_ANGLE_BASE": 3.14}')
# algorithm_step.set_config('{"CYCLE_TIME_BASE": 5 }') # algorithm_step.set_config('{"CYCLE_TIME_BASE": 5 }')
for i in range(0,row_len): for i in range(0,row_len):
disturb_data.loc[i,cow_name]=algorithm_step.eval(origin_data.loc[i,cow_name],i) disturb_data.loc[i,cow_name]=algorithm_step.eval(origin_data.loc[i,cow_name],i)
print(disturb_data) print(disturb_data)
disturb_data.to_csv("D:/python_project/1_disturb.csv", index=False) contrast_data[cow_name+'_disturb'] = disturb_data[cow_name]
disturb_data.to_csv("D:/python_project_data/1_disturb.csv", index=False)
contrast_data.to_csv("D:/python_project_data/contrast_data.csv", index=False)
# 以下均为测试性能用 # 以下均为测试性能用