get more accurate

This commit is contained in:
2024-09-07 16:47:14 +08:00
parent 4c409ace18
commit 095f63d154
7 changed files with 15 additions and 15 deletions

View File

@@ -1,15 +1,15 @@
from dragon import *
kPitchToTest=0.450338
kPitchToTest=mp.mpf("0.45033740")
kDeltaThetaBeg=0
kDeltaThetaEnd=2*2*3.1415926
kTotalSteps=100000
kTotalSteps=10000
kStepDeltaTheta=(kDeltaThetaEnd-kDeltaThetaBeg)/kTotalSteps
kParallelNum=24
tasks_list=[i for i in np.arange(kDeltaThetaBeg, kDeltaThetaEnd, kStepDeltaTheta)]
task_list_per_process=[tasks_list[i::kParallelNum] for i in range(kParallelNum)]
print(f"len(task_list_per_thread)={len(task_list_per_process)}",file=sys.stderr)
def ProcessEntryPoint(arg):
dragen = Dragon(mp.mpf(kPitchToTest)/(2*mp.pi))
dragen = Dragon(kPitchToTest/(2*mp.pi))
delta_theta_list, process_id = arg
logf=open(f"sufficiency_test_{process_id}.log","w")
print(f"calculating delta_theta_list={delta_theta_list} with process_id={process_id}",file=logf)
@@ -29,7 +29,7 @@ if __name__ == "__main__":
else:
print("OK")
# Now generate an gif for human to check
dragen = Dragon(mp.mpf(kPitchToTest)/(2*mp.pi))
dragen = Dragon(kPitchToTest/(2*mp.pi))
kTotalFrames=100
kStepDeltaTheta=(kDeltaThetaEnd-kDeltaThetaBeg)/kTotalFrames
frame_list=[]