..
This commit is contained in:
+6
-6
@@ -391,17 +391,17 @@ class HttpServerEnhanced(QThread):
|
|||||||
|
|
||||||
if ip_address == "192.168.100.236" or msg.get("id","") == "1#SCANNER":
|
if ip_address == "192.168.100.236" or msg.get("id","") == "1#SCANNER":
|
||||||
dev_name = "Scanner1"
|
dev_name = "Scanner1"
|
||||||
chop_num = 200
|
chop_num = 1
|
||||||
elif ip_address == "192.168.100.237" or msg.get("id","") == "2#SCANNER":
|
elif ip_address == "192.168.100.237" or msg.get("id","") == "2#SCANNER":
|
||||||
dev_name = "Scanner2"
|
dev_name = "Scanner2"
|
||||||
chop_num = 200
|
chop_num = 1
|
||||||
|
|
||||||
if direction == "UP":
|
if direction == "UP":
|
||||||
channelA = channelA[chop_num:-200]
|
channelA = channelA[chop_num:-1]
|
||||||
channelB = channelB[chop_num:-200]
|
channelB = channelB[chop_num:-1]
|
||||||
elif direction == "DOWN":
|
elif direction == "DOWN":
|
||||||
channelA = channelA[200:-chop_num]
|
channelA = channelA[1:-chop_num]
|
||||||
channelB = channelB[200:-chop_num]
|
channelB = channelB[1:-chop_num]
|
||||||
|
|
||||||
save_filename = f'{time.strftime("%Y%m%d_%H%M%S")}_{dev_name}_{direction}.csv'
|
save_filename = f'{time.strftime("%Y%m%d_%H%M%S")}_{dev_name}_{direction}.csv'
|
||||||
data_path = self.save_data_to_csv(save_filename, channelA, channelB)
|
data_path = self.save_data_to_csv(save_filename, channelA, channelB)
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class XRayDataProcessor:
|
|||||||
for ch in ['CH1', 'CH2']:
|
for ch in ['CH1', 'CH2']:
|
||||||
p = self.results[ch]['params_opt']
|
p = self.results[ch]['params_opt']
|
||||||
e = np.sqrt(np.diag(self.results[ch]['params_cov']))
|
e = np.sqrt(np.diag(self.results[ch]['params_cov']))
|
||||||
print(f"\n{ch}通道:")
|
print(f"\n{ch}通道 {self.pipe_diameter}:")
|
||||||
print(f"Q0 = {p[0]:.1f} ± {e[0]:.1f}")
|
print(f"Q0 = {p[0]:.1f} ± {e[0]:.1f}")
|
||||||
print(f"μ = {p[1]:.6f} ± {e[1]:.6f} mm⁻¹")
|
print(f"μ = {p[1]:.6f} ± {e[1]:.6f} mm⁻¹")
|
||||||
print(f"offset = {p[2]:.1f} ± {e[2]:.1f}")
|
print(f"offset = {p[2]:.1f} ± {e[2]:.1f}")
|
||||||
|
|||||||
Reference in New Issue
Block a user