Skip to content

Commit

Permalink
added correct check for location
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaPoliti committed Nov 8, 2023
1 parent 3a088ca commit c338f38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions science_jubilee/tools/WebCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import matplotlib.pyplot as plt
import numpy as np

from labware.Labware import Well
from labware.Labware import Well, Location
from typing import Tuple, Union
from .Tool import Tool

Expand Down Expand Up @@ -38,11 +38,13 @@ def from_config(cls, machine, index, name, config_file: str,
return cls(machine=machine, index=index, name=name,**kwargs)

@staticmethod
def _getxyz(location: Union[Well, Tuple]):
def _getxyz(location: Union[Well, Tuple, Location]):
if type(location) == Well:
x, y, z = location.x, location.y, location.z
elif type(location) == Tuple:
x, y, z = location
elif type(location)== Location:
x,y,z= location._point
else:
raise ValueError("Location should be of type Well or Tuple")

Expand Down

0 comments on commit c338f38

Please sign in to comment.