Skip to content

Commit

Permalink
small change to composer
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed Apr 26, 2023
1 parent 8393b61 commit 84a5649
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/echolocator_lib/composers/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def compose_image_list(self, models: List[CrystalWellNeedingDroplocationModel]):
{"text": "Offset y (\u03BCm)", "class": "T_real_space_target_y"},
{"text": "drop", "class": "T_is_drop"},
{"text": "well centroid x,y", "class": "T_well_centroid_x_y"},
{"text": "auto x,y", "class": "T_auto_target__x_y"},
{"text": "auto x,y", "class": "T_auto_target_x_y"},
{"text": "confirmed x,y", "class": "T_confirmed_target_x_y"},
{"text": "echo coordinate x,y", "class": "T_echo_coordinate_x_y"},
{"text": "use", "class": "T_is_usable"},
Expand Down Expand Up @@ -128,10 +128,16 @@ def compose_image_list(self, models: List[CrystalWellNeedingDroplocationModel]):
t = "no"
html_lines.append("<td class='T_is_drop'>" + str(t) + "</td>")

t = f"{model.well_centroid_x}, {model.well_centroid_y}"
if model.well_centroid_x is None or model.well_centroid_y is None:
t = "-"
else:
t = f"{model.well_centroid_x}, {model.well_centroid_y}"
html_lines.append("<td class='T_well_centroid_x_y'>" + t + "</td>")

t = f"{model.auto_target_x}, {model.auto_target_y}"
if model.auto_target_x is None or model.auto_target_y is None:
t = "-"
else:
t = f"{model.auto_target_x}, {model.auto_target_y}"
html_lines.append("<td class='T_auto_target_x_y'>" + t + "</td>")

if model.confirmed_target_x is None or model.confirmed_target_y is None:
Expand Down

0 comments on commit 84a5649

Please sign in to comment.