Loading openflexure_microscope/utilities.py +2 −2 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ def set_properties(obj, **kwargs): setattr(obj, k, v) def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=None): def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=None, asint=True): """Takes key-value pairs of a JSON value, and maps onto an array""" # If no base array is given if not base_array: Loading @@ -39,7 +39,7 @@ def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=N # Do the mapping for axis, key in enumerate(axis_keys): if key in coordinate_dictionary: base_array[axis] = coordinate_dictionary[key] base_array[axis] = int(coordinate_dictionary[key]) if asint else coordinate_dictionary[key] return base_array Loading Loading
openflexure_microscope/utilities.py +2 −2 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ def set_properties(obj, **kwargs): setattr(obj, k, v) def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=None): def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=None, asint=True): """Takes key-value pairs of a JSON value, and maps onto an array""" # If no base array is given if not base_array: Loading @@ -39,7 +39,7 @@ def axes_to_array(coordinate_dictionary, axis_keys=('x', 'y', 'z'), base_array=N # Do the mapping for axis, key in enumerate(axis_keys): if key in coordinate_dictionary: base_array[axis] = coordinate_dictionary[key] base_array[axis] = int(coordinate_dictionary[key]) if asint else coordinate_dictionary[key] return base_array Loading