autogaita 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {autogaita-0.2.0 → autogaita-0.2.1}/PKG-INFO +1 -1
  2. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_dlc.py +26 -4
  3. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_dlc_multirun.py +2 -2
  4. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_dlc_singlerun.py +2 -2
  5. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita.egg-info/PKG-INFO +1 -1
  6. {autogaita-0.2.0 → autogaita-0.2.1}/setup.py +1 -1
  7. {autogaita-0.2.0 → autogaita-0.2.1}/LICENSE +0 -0
  8. {autogaita-0.2.0 → autogaita-0.2.1}/README.md +0 -0
  9. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/__init__.py +0 -0
  10. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/__main__.py +0 -0
  11. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita.py +0 -0
  12. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_dlc_gui.py +0 -0
  13. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_group.py +0 -0
  14. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_group_gui.py +0 -0
  15. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_icon.icns +0 -0
  16. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_icon.ico +0 -0
  17. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_logo.png +0 -0
  18. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_simi.py +0 -0
  19. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_simi_gui.py +0 -0
  20. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/autogaita_utils.py +0 -0
  21. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/__init__.py +0 -0
  22. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_group_dlcrun.py +0 -0
  23. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_group_simirun.py +0 -0
  24. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_simi_multirun.py +0 -0
  25. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/batchrun_scripts/autogaita_simi_singlerun.py +0 -0
  26. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/dlc_gui_config.json +0 -0
  27. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/group_gui_config.json +0 -0
  28. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita/simi_gui_config.json +0 -0
  29. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita.egg-info/SOURCES.txt +0 -0
  30. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita.egg-info/dependency_links.txt +0 -0
  31. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita.egg-info/requires.txt +0 -0
  32. {autogaita-0.2.0 → autogaita-0.2.1}/autogaita.egg-info/top_level.txt +0 -0
  33. {autogaita-0.2.0 → autogaita-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogaita
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Automatic Gait Analysis in Python
5
5
  Home-page: https://github.com/mahan-hosseini/AutoGaitA/
6
6
  Author: Mahan Hosseini
@@ -333,20 +333,40 @@ def some_prep(info, folderinfo, cfg):
333
333
 
334
334
  def move_data_to_folders(info, folderinfo):
335
335
  """Find files, copy data, video, beamdata & beamvideo to new results_dir"""
336
+ # unpack
337
+ results_dir = info["results_dir"]
338
+ postmouse_string = folderinfo["postmouse_string"]
339
+ postrun_string = folderinfo["postrun_string"]
340
+ os.makedirs(results_dir) # important to do this outside of loop!
341
+ # check if user inputted "_" & "-" for postmouse & postrun strings - if not do it
342
+ # for them
343
+ for candidate_postmouse_string in [postmouse_string, "_" + postmouse_string]:
344
+ for candidate_postrun_string in [postrun_string, "-" + postrun_string]:
345
+ found_it = check_this_filename_configuration(
346
+ info,
347
+ folderinfo,
348
+ candidate_postmouse_string,
349
+ candidate_postrun_string,
350
+ results_dir,
351
+ )
352
+ if found_it: # if our search was successful, stop searching and continue
353
+ break
354
+
355
+
356
+ def check_this_filename_configuration(
357
+ info, folderinfo, postmouse_string, postrun_string, results_dir
358
+ ):
336
359
  # unpack
337
360
  name = info["name"]
338
361
  mouse_num = info["mouse_num"]
339
362
  run_num = info["run_num"]
340
- results_dir = info["results_dir"]
341
363
  root_dir = folderinfo["root_dir"]
342
364
  data_string = folderinfo["data_string"]
343
365
  beam_string = folderinfo["beam_string"]
344
366
  premouse_string = folderinfo["premouse_string"]
345
- postmouse_string = folderinfo["postmouse_string"]
346
367
  prerun_string = folderinfo["prerun_string"]
347
- postrun_string = folderinfo["postrun_string"]
348
- os.makedirs(results_dir) # important to do this outside of loop!
349
368
  whichvideo = "" # initialise
369
+ found_it = False
350
370
  for filename in os.listdir(root_dir):
351
371
  # the following condition is True for data & beam csv
352
372
  if (
@@ -354,6 +374,7 @@ def move_data_to_folders(info, folderinfo):
354
374
  and (prerun_string + str(run_num) + postrun_string in filename)
355
375
  and (filename.endswith(".csv"))
356
376
  ):
377
+ found_it = True
357
378
  # Copy the Excel file to the new subfolder
358
379
  shutil.copy2(
359
380
  os.path.join(root_dir, filename), os.path.join(results_dir, filename)
@@ -378,6 +399,7 @@ def move_data_to_folders(info, folderinfo):
378
399
  )
379
400
  print(this_message)
380
401
  write_issues_to_textfile(this_message, info)
402
+ return found_it
381
403
 
382
404
 
383
405
  def check_and_expand_cfg(data, cfg, info):
@@ -18,9 +18,9 @@ def dlc_multirun():
18
18
  folderinfo["data_string"] = "SIMINewOct"
19
19
  folderinfo["beam_string"] = "BeamTraining"
20
20
  folderinfo["premouse_string"] = "Mouse"
21
- folderinfo["postmouse_string"] = "_25mm"
21
+ folderinfo["postmouse_string"] = "25mm"
22
22
  folderinfo["prerun_string"] = "run"
23
- folderinfo["postrun_string"] = "-6DLC"
23
+ folderinfo["postrun_string"] = "6DLC"
24
24
  # cfg
25
25
  cfg = {}
26
26
  cfg["sampling_rate"] = 100 # base cfg
@@ -16,9 +16,9 @@ def dlc_singlerun():
16
16
  folderinfo["data_string"] = "SIMINewOct"
17
17
  folderinfo["beam_string"] = "BeamTraining"
18
18
  folderinfo["premouse_string"] = "Mouse"
19
- folderinfo["postmouse_string"] = "_25mm"
19
+ folderinfo["postmouse_string"] = "25mm"
20
20
  folderinfo["prerun_string"] = "run"
21
- folderinfo["postrun_string"] = "-6DLC"
21
+ folderinfo["postrun_string"] = "6DLC"
22
22
  # cfg
23
23
  cfg = {}
24
24
  cfg["sampling_rate"] = 100 # base cfg
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogaita
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Automatic Gait Analysis in Python
5
5
  Home-page: https://github.com/mahan-hosseini/AutoGaitA/
6
6
  Author: Mahan Hosseini
@@ -25,7 +25,7 @@ if platform.system() == "Darwin":
25
25
  setup(
26
26
  name="autogaita",
27
27
  python_requires=">=3.10",
28
- version="0.2.0", # rc == release candidate (before release is finished)
28
+ version="0.2.1", # rc == release candidate (before release is finished)
29
29
  author="Mahan Hosseini",
30
30
  description="Automatic Gait Analysis in Python",
31
31
  packages=["autogaita", "autogaita.batchrun_scripts"],
File without changes
File without changes
File without changes