#---------------------------------------------- # calibrationCalculator.py # PAS calibration duration calculator # Fedorov, 20220926 #---------------------------------------------- hvSrtartHex = 0x3D6 # Test 0x47A to see the measured Calibration timing hvStopHex = 0x75B #-------------------------------------------- # do not touch the HV step #-------------------------------------------- hvStep = 0x029 currTime =0.0 print("Time {:9.1f} s, Calibration TC".format(currTime)) #MELE start #currTime += 14.0 # In the reality the delay can be between 10 and 17 seconds currTime += 3.25 # In the reality the delay can be between 1.25 and 4.25 seconds #MELE end currHVint = hvSrtartHex print("Time {:9.1f} s, Set first step and strat data accumulation".format(currTime)) while (currHVint < hvStopHex) : currTime += 24 print("Time {:9.1f} s, CEM HV {:8.1f} V".format(currTime,float(currHVint)*1.221)) currHVint += hvStep currHVint -= hvStep currTime += 0.25 #MELE print("Time {:9.1f} s, Start NM".format(currTime))