Commit debda21d authored by Jana's avatar Jana
Browse files

New features

Nominal to real measured distances checks added.
parent 7bb5eee0
......@@ -122,28 +122,61 @@ if (cg.Print_typos) and (measured_points_all_good):
if (cg.Print_typos) and (nominal_points_all_measured):
print("All nominal points were measured at least once.")
if (cg.Print_typos) and not (all_points_in_lines_measured):
print("Not all points in lines were measured. Continueing in analysis.")
print("Not all points in lines were measured. Continuing in analysis.")
del all_measured_points, nominal_points_all_measured,\
all_points_in_lines_measured
#sorted_measured_points_in_lines
measured_distances_in_lines = {}
if cg.Using_nominal_compare:
nominal_distances_in_line = {}
differences_in_distances = {}
StDev_distances_in_lines = {}
if measured_lines_all_good and measured_points_all_good:
del measured_lines_all_good, measured_points_all_good
# Calculating distance deltas
for line in LoS_measurements:
deltas = ()
if cg.Using_nominal_compare:
deltas_nominal = ()
for i in range (1,len(sorted_measured_points_in_lines[line])):
# delta = fc.slope_distance
print(i) #, delta
pass
#fc.slope_distance
if cg.Using_nominal_compare0:
pass
delta = (LoS_measurements[line][
sorted_measured_points_in_lines[line][i]][0]\
- LoS_measurements[line][
sorted_measured_points_in_lines[line][i-1]][0],)
deltas = deltas + delta
if cg.Using_nominal_compare:
d = fc.slope_distance(
Nominal_coords[
sorted_measured_points_in_lines[line][i-1]],
Nominal_coords[
sorted_measured_points_in_lines[line][i]])
deltas_nominal = deltas_nominal + (d,)
measured_distances_in_lines[line] = deltas
if cg.Using_nominal_compare:
nominal_distances_in_line[line] = deltas_nominal
del deltas_nominal
del line, i, delta, deltas, d
if cg.Using_nominal_compare:
for line in LoS_measurements:
differences_in_distances[line] = np.asarray(
nominal_distances_in_line[line])\
- np.asarray(
measured_distances_in_lines[line])
StDev_distances_in_lines[line] = np.std(
differences_in_distances[line])
if StDev_distances_in_lines[line] == 0:
StDev_distances_in_lines[line] = None
differences_in_distances[line] = tuple(
differences_in_distances[line])
del line
else:
print("Analysis cannot be performed as there are typos and errors in "
"input data. Please correct before running the script again. "
"To help troubleshoot, change Print_typos in config.py to True.")
print('End of the script')
\ No newline at end of file
......@@ -24,6 +24,7 @@ IFM_StDev = 0.001 #mm, from 2-5m based on Leica's MPEs and typical errors
ADM_StDev = 0.007 #mm, from 2-5m based on Leica's typical errors
Print_FIDs = False
Print_typos = False
Print_real2nominal_checks = True
"""Nominal CAD coordinates of Fiducials
Standard SA format with spaces as delimiters and no comments:
......@@ -39,20 +40,13 @@ Epochs_dictionary = {}
Epochs_dictionary[0] = "Testing_measurements_Epoch0.txt"
Epochs_dictionary[1] = "Testing_measurements_Epoch1.txt"
Using_nominal_compare0 = False
Using_nominal_compare1 = False
"""Which Epochs gonna be used and adding the data into the code"""
if len(Which_epochs) == 1:
Measurements_file_name = Epochs_dictionary[Which_epochs[0]]
if Using_nominal_compare:
Using_nominal_compare0 = True
elif len(Which_epochs) == 2:
Measurements_file_name = Epochs_dictionary[Which_epochs[0]]
Measurements_file_name_2 = Epochs_dictionary[Which_epochs[1]]
if Using_nominal_compare:
Using_nominal_compare0 = True
Using_nominal_compare1 = True
elif len(Which_epochs) == 0:
print('No epoch(s) were chosen to analyse. Go to config.py and change it in a variable Which_epochs')
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment