Skip to content

Commit b30e4fc

Browse files
committed
flydra_core: formatting
1 parent de71dcb commit b30e4fc

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

flydra_core/attic/MainBrain.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ class MainBrain(object):
257257
)
258258

259259
class RemoteAPI:
260-
261260
# ================================================================
262261
#
263262
# Methods called locally
@@ -492,7 +491,6 @@ def receive_missing_data(self, cam_id, framenumber_offset, missing_data):
492491
camn_received_time,
493492
points_distorted,
494493
) in missing_data:
495-
496494
corrected_framenumber = framenumber - framenumber_offset
497495
if len(points_distorted) == 0:
498496
# No point was tracked that frame, send nan values.
@@ -915,8 +913,8 @@ def get_all_params(self):
915913
return all
916914

917915
def start_listening(self):
918-
""" the last thing called before we work - give the config callback watchers a callback
919-
to check on the state of the mainbrain post __init__ """
916+
"""the last thing called before we work - give the config callback watchers a callback
917+
to check on the state of the mainbrain post __init__"""
920918
self.save_config()
921919

922920
def set_config_change_callback(self, handler):
@@ -1039,10 +1037,14 @@ def start_recording(self, raw_file_basename=None, *cam_ids):
10391037
if not raw_file_basename:
10401038
if self.experiment_uuid is not None:
10411039
raw_file_basename = os.path.join(
1042-
self.config["save_movie_dir"], self.experiment_uuid,
1040+
self.config["save_movie_dir"],
1041+
self.experiment_uuid,
10431042
)
10441043
else:
1045-
raw_file_basename = os.path.join(self.config["save_movie_dir"], nowstr,)
1044+
raw_file_basename = os.path.join(
1045+
self.config["save_movie_dir"],
1046+
nowstr,
1047+
)
10461048

10471049
if len(cam_ids) == 0:
10481050
cam_ids = self.remote_api.external_get_cam_ids()
@@ -1106,10 +1108,14 @@ def start_small_recording(self, raw_file_basename=None, *cam_ids):
11061108
if not raw_file_basename:
11071109
if self.experiment_uuid is not None:
11081110
raw_file_basename = os.path.join(
1109-
self.config["save_movie_dir"], self.experiment_uuid,
1111+
self.config["save_movie_dir"],
1112+
self.experiment_uuid,
11101113
)
11111114
else:
1112-
raw_file_basename = os.path.join(self.config["save_movie_dir"], nowstr,)
1115+
raw_file_basename = os.path.join(
1116+
self.config["save_movie_dir"],
1117+
nowstr,
1118+
)
11131119

11141120
if len(cam_ids) == 0:
11151121
cam_ids = self.remote_api.external_get_cam_ids()
@@ -1224,7 +1230,7 @@ def __del__(self):
12241230
self.quit()
12251231

12261232
def _safe_makedir(self, path):
1227-
""" raises OSError if path cannot be made """
1233+
"""raises OSError if path cannot be made"""
12281234
if not os.path.exists(path):
12291235
os.makedirs(path)
12301236
return path
@@ -1551,7 +1557,6 @@ def _service_save_data(self):
15511557
observations_2d,
15521558
obs_Lcoords,
15531559
) in list_of_3d_data:
1554-
15551560
if len(obs_frames) < MIN_KALMAN_OBSERVATIONS_TO_SAVE:
15561561
# only save data with at least N observations
15571562
continue

0 commit comments

Comments
 (0)