autogaita 0.2.0__tar.gz → 0.2.2__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.
- {autogaita-0.2.0 → autogaita-0.2.2}/PKG-INFO +1 -1
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_dlc.py +26 -4
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_group.py +4 -1
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_simi.py +50 -46
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_dlc_multirun.py +2 -2
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_dlc_singlerun.py +2 -2
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita.egg-info/PKG-INFO +1 -1
- {autogaita-0.2.0 → autogaita-0.2.2}/setup.py +1 -1
- {autogaita-0.2.0 → autogaita-0.2.2}/LICENSE +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/README.md +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/__init__.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/__main__.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_dlc_gui.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_group_gui.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_icon.icns +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_icon.ico +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_logo.png +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_simi_gui.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/autogaita_utils.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/__init__.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_group_dlcrun.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_group_simirun.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_simi_multirun.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/batchrun_scripts/autogaita_simi_singlerun.py +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/dlc_gui_config.json +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/group_gui_config.json +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita/simi_gui_config.json +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita.egg-info/SOURCES.txt +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita.egg-info/dependency_links.txt +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita.egg-info/requires.txt +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/autogaita.egg-info/top_level.txt +0 -0
- {autogaita-0.2.0 → autogaita-0.2.2}/setup.cfg +0 -0
|
@@ -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):
|
|
@@ -170,7 +170,7 @@ def some_prep(folderinfo, cfg):
|
|
|
170
170
|
# see if there's a config json file and add to cfg dict
|
|
171
171
|
for g_idx, group_dir in enumerate(group_dirs):
|
|
172
172
|
with open(
|
|
173
|
-
os.path.join(group_dir
|
|
173
|
+
os.path.join(group_dir, CONFIG_JSON_FILENAME), "r"
|
|
174
174
|
) as config_json_file:
|
|
175
175
|
config_vars_from_json = json.load(config_json_file)
|
|
176
176
|
for key in config_vars_from_json.keys():
|
|
@@ -1520,6 +1520,9 @@ def twoway_RMANOVA(stats_df, g_avg_dfs, g_std_dfs, stats_var, folderinfo, cfg):
|
|
|
1520
1520
|
interaction_effect_pval = ANOVA_result["p-unc"][2]
|
|
1521
1521
|
else:
|
|
1522
1522
|
interaction_effect_pval = ANOVA_result["p-GG-corr"][2]
|
|
1523
|
+
# NU - understand why its nan sometimes. For now use uncorrected int pval
|
|
1524
|
+
if np.isnan(interaction_effect_pval):
|
|
1525
|
+
interaction_effect_pval = ANOVA_result["p-unc"][2]
|
|
1523
1526
|
if interaction_effect_pval < 0.05: # if interaction effect is sig, do multcomps
|
|
1524
1527
|
multcomp_df = multcompare_SC_Percentages(stats_df, stats_var, folderinfo, cfg)
|
|
1525
1528
|
save_stats_results_to_text(
|
|
@@ -1593,6 +1593,8 @@ def plot_joint_z_by_y(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1593
1593
|
sampling_rate = cfg["sampling_rate"]
|
|
1594
1594
|
dont_show_plots = cfg["dont_show_plots"]
|
|
1595
1595
|
plot_joints = cfg["plot_joints"]
|
|
1596
|
+
legend_outside = cfg["legend_outside"]
|
|
1597
|
+
color_palette = cfg["color_palette"]
|
|
1596
1598
|
|
|
1597
1599
|
# some prep
|
|
1598
1600
|
max_cycle_num = 0
|
|
@@ -1615,15 +1617,11 @@ def plot_joint_z_by_y(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1615
1617
|
sc_num = len(run_cycles)
|
|
1616
1618
|
try: # handle only 1 run in "stuff by y" plots
|
|
1617
1619
|
ax[j][r].set_prop_cycle(
|
|
1618
|
-
plt.cycler(
|
|
1619
|
-
"color", sns.color_palette(cfg["color_palette"], max_cycle_num)
|
|
1620
|
-
)
|
|
1620
|
+
plt.cycler("color", sns.color_palette(color_palette, max_cycle_num))
|
|
1621
1621
|
)
|
|
1622
1622
|
except:
|
|
1623
1623
|
ax[j].set_prop_cycle(
|
|
1624
|
-
plt.cycler(
|
|
1625
|
-
"color", sns.color_palette(cfg["color_palette"], max_cycle_num)
|
|
1626
|
-
)
|
|
1624
|
+
plt.cycler("color", sns.color_palette(color_palette, max_cycle_num))
|
|
1627
1625
|
)
|
|
1628
1626
|
# check for bodyside-specificity
|
|
1629
1627
|
if joint + "Y" in all_steps_data.columns:
|
|
@@ -1647,25 +1645,25 @@ def plot_joint_z_by_y(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1647
1645
|
ax[j].plot(this_y, this_z, label=this_label)
|
|
1648
1646
|
# axis stuff
|
|
1649
1647
|
try:
|
|
1650
|
-
if
|
|
1648
|
+
if legend_outside is True:
|
|
1651
1649
|
ax[j][r].legend(
|
|
1652
1650
|
fontsize=SC_LAT_LEGEND_FONTSIZE,
|
|
1653
1651
|
loc="center left",
|
|
1654
1652
|
bbox_to_anchor=(1, 0.5),
|
|
1655
1653
|
)
|
|
1656
|
-
elif
|
|
1654
|
+
elif legend_outside is False:
|
|
1657
1655
|
ax[j][r].legend(fontsize=SC_LAT_LEGEND_FONTSIZE)
|
|
1658
1656
|
median_z_val = [round(np.median(ax[j][r].get_yticks()), 2)]
|
|
1659
1657
|
median_z_val_label = [str(median_z_val[0])] # has to be of same len
|
|
1660
1658
|
ax[j][r].set_yticks(median_z_val, median_z_val_label)
|
|
1661
1659
|
except:
|
|
1662
|
-
if
|
|
1660
|
+
if legend_outside is True:
|
|
1663
1661
|
ax[j].legend(
|
|
1664
1662
|
fontsize=SC_LAT_LEGEND_FONTSIZE + 3,
|
|
1665
1663
|
loc="center left",
|
|
1666
1664
|
bbox_to_anchor=(1, 0.5),
|
|
1667
1665
|
)
|
|
1668
|
-
elif
|
|
1666
|
+
elif legend_outside is False:
|
|
1669
1667
|
ax[j].legend(fontsize=SC_LAT_LEGEND_FONTSIZE + 3)
|
|
1670
1668
|
median_z_val = [round(np.median(ax[j].get_yticks()), 2)]
|
|
1671
1669
|
median_z_val_label = [str(median_z_val[0])] # has to be of same len
|
|
@@ -1689,6 +1687,8 @@ def plot_angles_by_time(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1689
1687
|
sampling_rate = cfg["sampling_rate"]
|
|
1690
1688
|
dont_show_plots = cfg["dont_show_plots"]
|
|
1691
1689
|
angles = cfg["angles"]
|
|
1690
|
+
legend_outside = cfg["legend_outside"]
|
|
1691
|
+
color_palette = cfg["color_palette"]
|
|
1692
1692
|
|
|
1693
1693
|
# some prep
|
|
1694
1694
|
max_cycle_num = 0
|
|
@@ -1704,9 +1704,7 @@ def plot_angles_by_time(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1704
1704
|
for run_cycles in all_cycles[legname]: # run loop (color-cycler-reset)
|
|
1705
1705
|
sc_num = len(run_cycles)
|
|
1706
1706
|
ax[a].set_prop_cycle(
|
|
1707
|
-
plt.cycler(
|
|
1708
|
-
"color", sns.color_palette(cfg["color_palette"], max_cycle_num)
|
|
1709
|
-
)
|
|
1707
|
+
plt.cycler("color", sns.color_palette(color_palette, max_cycle_num))
|
|
1710
1708
|
)
|
|
1711
1709
|
# check for bodyside-specificity
|
|
1712
1710
|
if angle + "Angle" in all_steps_data.columns:
|
|
@@ -1726,13 +1724,13 @@ def plot_angles_by_time(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1726
1724
|
this_label = generate_sc_latency_label(this_sc_idx, sampling_rate)
|
|
1727
1725
|
ax[a].plot(this_time, this_angle, label=this_label)
|
|
1728
1726
|
# legend
|
|
1729
|
-
if
|
|
1727
|
+
if legend_outside is True:
|
|
1730
1728
|
ax[a].legend(
|
|
1731
1729
|
fontsize=SC_LAT_LEGEND_FONTSIZE,
|
|
1732
1730
|
loc="center left",
|
|
1733
1731
|
bbox_to_anchor=(1, 0.5),
|
|
1734
1732
|
)
|
|
1735
|
-
elif
|
|
1733
|
+
elif legend_outside is False:
|
|
1736
1734
|
ax[a].legend(fontsize=SC_LAT_LEGEND_FONTSIZE)
|
|
1737
1735
|
# figure stuff
|
|
1738
1736
|
f[a].supxlabel("Time (s)")
|
|
@@ -1753,6 +1751,8 @@ def plot_stickdiagram(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1753
1751
|
sampling_rate = cfg["sampling_rate"]
|
|
1754
1752
|
dont_show_plots = cfg["dont_show_plots"]
|
|
1755
1753
|
plot_joints = cfg["plot_joints"]
|
|
1754
|
+
legend_outside = cfg["legend_outside"]
|
|
1755
|
+
color_palette = cfg["color_palette"]
|
|
1756
1756
|
|
|
1757
1757
|
# some prep
|
|
1758
1758
|
max_cycle_num = 0
|
|
@@ -1766,9 +1766,7 @@ def plot_stickdiagram(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1766
1766
|
sharey=True,
|
|
1767
1767
|
gridspec_kw={"hspace": 0},
|
|
1768
1768
|
)
|
|
1769
|
-
color_cycle = plt.cycler(
|
|
1770
|
-
"color", sns.color_palette(cfg["color_palette"], max_cycle_num)
|
|
1771
|
-
)
|
|
1769
|
+
color_cycle = plt.cycler("color", sns.color_palette(color_palette, max_cycle_num))
|
|
1772
1770
|
|
|
1773
1771
|
# plot
|
|
1774
1772
|
for r, run_cycles in enumerate(all_cycles[legname]): # run loop (axis)
|
|
@@ -1827,25 +1825,25 @@ def plot_stickdiagram(legname, all_steps_data, all_cycles, info, cfg):
|
|
|
1827
1825
|
ax.plot(this_ys, this_zs, color=this_color, lw=STICK_LINEWIDTH)
|
|
1828
1826
|
# axis stuff
|
|
1829
1827
|
try:
|
|
1830
|
-
if
|
|
1828
|
+
if legend_outside is True:
|
|
1831
1829
|
ax[r].legend(
|
|
1832
1830
|
fontsize=SC_LAT_LEGEND_FONTSIZE,
|
|
1833
1831
|
loc="center left",
|
|
1834
1832
|
bbox_to_anchor=(1, 0.5),
|
|
1835
1833
|
)
|
|
1836
|
-
elif
|
|
1834
|
+
elif legend_outside is False:
|
|
1837
1835
|
ax[r].legend(fontsize=SC_LAT_LEGEND_FONTSIZE)
|
|
1838
1836
|
median_z_val = [round(np.median(ax[r].get_yticks()), 2)]
|
|
1839
1837
|
median_z_val_label = [str(median_z_val[0])] # has to be of same len
|
|
1840
1838
|
ax[r].set_yticks(median_z_val, median_z_val_label)
|
|
1841
1839
|
except:
|
|
1842
|
-
if
|
|
1840
|
+
if legend_outside is True:
|
|
1843
1841
|
ax.legend(
|
|
1844
1842
|
fontsize=SC_LAT_LEGEND_FONTSIZE + 3,
|
|
1845
1843
|
loc="center left",
|
|
1846
1844
|
bbox_to_anchor=(1, 0.5),
|
|
1847
1845
|
)
|
|
1848
|
-
elif
|
|
1846
|
+
elif legend_outside is False:
|
|
1849
1847
|
ax.legend(fontsize=SC_LAT_LEGEND_FONTSIZE + 3)
|
|
1850
1848
|
median_z_val = [round(np.median(ax.get_yticks()), 2)]
|
|
1851
1849
|
median_z_val_label = [str(median_z_val[0])] # has to be of same len
|
|
@@ -1869,11 +1867,13 @@ def plot_joint_z_by_average_SC(legname, average_data, std_data, sc_num, info, cf
|
|
|
1869
1867
|
bin_num = cfg["bin_num"]
|
|
1870
1868
|
plot_SE = cfg["plot_SE"]
|
|
1871
1869
|
joints = cfg["joints"]
|
|
1870
|
+
legend_outside = cfg["legend_outside"]
|
|
1871
|
+
color_palette = cfg["color_palette"]
|
|
1872
1872
|
|
|
1873
1873
|
# plot
|
|
1874
1874
|
f, ax = plt.subplots(1, 1)
|
|
1875
1875
|
ax.set_prop_cycle(
|
|
1876
|
-
plt.cycler("color", sns.color_palette(
|
|
1876
|
+
plt.cycler("color", sns.color_palette(color_palette, len(joints)))
|
|
1877
1877
|
)
|
|
1878
1878
|
x = np.linspace(0, 100, bin_num)
|
|
1879
1879
|
for joint in joints: # joint loop (lines)
|
|
@@ -1887,9 +1887,9 @@ def plot_joint_z_by_average_SC(legname, average_data, std_data, sc_num, info, cf
|
|
|
1887
1887
|
ax.plot(x, this_z, label=joint)
|
|
1888
1888
|
ax.fill_between(x, this_z - this_std, this_z + this_std, alpha=0.2)
|
|
1889
1889
|
# legend adjustments
|
|
1890
|
-
if
|
|
1890
|
+
if legend_outside is True:
|
|
1891
1891
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
1892
|
-
elif
|
|
1892
|
+
elif legend_outside is False:
|
|
1893
1893
|
ax.legend()
|
|
1894
1894
|
ax.set_xlabel("Percentage")
|
|
1895
1895
|
ax.set_ylabel("z (m)")
|
|
@@ -1912,13 +1912,13 @@ def plot_angles_by_average_SC(legname, average_data, std_data, sc_num, info, cfg
|
|
|
1912
1912
|
bin_num = cfg["bin_num"]
|
|
1913
1913
|
plot_SE = cfg["plot_SE"]
|
|
1914
1914
|
angles = cfg["angles"]
|
|
1915
|
+
legend_outside = cfg["legend_outside"]
|
|
1916
|
+
color_palette = cfg["color_palette"]
|
|
1915
1917
|
|
|
1916
1918
|
# plot
|
|
1917
1919
|
f, ax = plt.subplots(1, 1)
|
|
1918
1920
|
ax.set_prop_cycle(
|
|
1919
|
-
plt.cycler(
|
|
1920
|
-
"color", sns.color_palette(cfg["color_palette"], len(angles["name"]))
|
|
1921
|
-
)
|
|
1921
|
+
plt.cycler("color", sns.color_palette(color_palette, len(angles["name"])))
|
|
1922
1922
|
)
|
|
1923
1923
|
x = np.linspace(0, 100, bin_num)
|
|
1924
1924
|
ax.set_xlabel("Percentage")
|
|
@@ -1937,9 +1937,9 @@ def plot_angles_by_average_SC(legname, average_data, std_data, sc_num, info, cfg
|
|
|
1937
1937
|
x, this_angle_val - this_std, this_angle_val + this_std, alpha=0.2
|
|
1938
1938
|
)
|
|
1939
1939
|
# legend adjustments
|
|
1940
|
-
if
|
|
1940
|
+
if legend_outside is True:
|
|
1941
1941
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
1942
|
-
elif
|
|
1942
|
+
elif legend_outside is False:
|
|
1943
1943
|
ax.legend()
|
|
1944
1944
|
ax.set_ylim(ANGLE_PLOTS_YLIMITS)
|
|
1945
1945
|
figure_file_string = (
|
|
@@ -1962,11 +1962,13 @@ def plot_y_velocities_by_average_SC(legname, average_data, std_data, sc_num, inf
|
|
|
1962
1962
|
sampling_rate = cfg["sampling_rate"]
|
|
1963
1963
|
plot_SE = cfg["plot_SE"]
|
|
1964
1964
|
joints = cfg["joints"]
|
|
1965
|
+
legend_outside = cfg["legend_outside"]
|
|
1966
|
+
color_palette = cfg["color_palette"]
|
|
1965
1967
|
|
|
1966
1968
|
# plot
|
|
1967
1969
|
f, ax = plt.subplots(1, 1)
|
|
1968
1970
|
ax.set_prop_cycle(
|
|
1969
|
-
plt.cycler("color", sns.color_palette(
|
|
1971
|
+
plt.cycler("color", sns.color_palette(color_palette, len(joints)))
|
|
1970
1972
|
)
|
|
1971
1973
|
x = np.linspace(0, 100, bin_num)
|
|
1972
1974
|
for joint in joints: # joint loop (lines)
|
|
@@ -1981,9 +1983,9 @@ def plot_y_velocities_by_average_SC(legname, average_data, std_data, sc_num, inf
|
|
|
1981
1983
|
ax.plot(x, this_y, label=joint)
|
|
1982
1984
|
ax.fill_between(x, this_y - this_std, this_y + this_std, alpha=0.2)
|
|
1983
1985
|
# legend adjustments
|
|
1984
|
-
if
|
|
1986
|
+
if legend_outside is True:
|
|
1985
1987
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
1986
|
-
elif
|
|
1988
|
+
elif legend_outside is False:
|
|
1987
1989
|
ax.legend()
|
|
1988
1990
|
ax.set_xlabel("Percentage")
|
|
1989
1991
|
ax.set_ylabel("Velocity (Y in m / " + str(int((1 / sampling_rate) * 1000)) + "ms)")
|
|
@@ -2009,13 +2011,13 @@ def plot_angular_velocities_by_average_SC(
|
|
|
2009
2011
|
sampling_rate = cfg["sampling_rate"]
|
|
2010
2012
|
plot_SE = cfg["plot_SE"]
|
|
2011
2013
|
angles = cfg["angles"]
|
|
2014
|
+
legend_outside = cfg["legend_outside"]
|
|
2015
|
+
color_palette = cfg["color_palette"]
|
|
2012
2016
|
|
|
2013
2017
|
# plot
|
|
2014
2018
|
f, ax = plt.subplots(1, 1)
|
|
2015
2019
|
ax.set_prop_cycle(
|
|
2016
|
-
plt.cycler(
|
|
2017
|
-
"color", sns.color_palette(cfg["color_palette"], len(angles["name"]))
|
|
2018
|
-
)
|
|
2020
|
+
plt.cycler("color", sns.color_palette(color_palette, len(angles["name"])))
|
|
2019
2021
|
)
|
|
2020
2022
|
x = np.linspace(0, 100, bin_num)
|
|
2021
2023
|
for angle in angles["name"]: # angle loop (lines)
|
|
@@ -2030,9 +2032,9 @@ def plot_angular_velocities_by_average_SC(
|
|
|
2030
2032
|
ax.plot(x, this_y, label=angle)
|
|
2031
2033
|
ax.fill_between(x, this_y - this_std, this_y + this_std, alpha=0.2)
|
|
2032
2034
|
# legend adjustments
|
|
2033
|
-
if
|
|
2035
|
+
if legend_outside is True:
|
|
2034
2036
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
2035
|
-
elif
|
|
2037
|
+
elif legend_outside is False:
|
|
2036
2038
|
ax.legend()
|
|
2037
2039
|
ax.set_xlabel("Percentage")
|
|
2038
2040
|
ax.set_ylabel("Velocity (degree / " + str(int((1 / sampling_rate) * 1000)) + "ms)")
|
|
@@ -2058,11 +2060,13 @@ def plot_y_acceleration_by_average_SC(
|
|
|
2058
2060
|
sampling_rate = cfg["sampling_rate"]
|
|
2059
2061
|
plot_SE = cfg["plot_SE"]
|
|
2060
2062
|
joints = cfg["joints"]
|
|
2063
|
+
legend_outside = cfg["legend_outside"]
|
|
2064
|
+
color_palette = cfg["color_palette"]
|
|
2061
2065
|
|
|
2062
2066
|
# plot
|
|
2063
2067
|
f, ax = plt.subplots(1, 1)
|
|
2064
2068
|
ax.set_prop_cycle(
|
|
2065
|
-
plt.cycler("color", sns.color_palette(
|
|
2069
|
+
plt.cycler("color", sns.color_palette(color_palette, len(joints)))
|
|
2066
2070
|
)
|
|
2067
2071
|
x = np.linspace(0, 100, bin_num)
|
|
2068
2072
|
for joint in joints: # joint loop (lines)
|
|
@@ -2076,9 +2080,9 @@ def plot_y_acceleration_by_average_SC(
|
|
|
2076
2080
|
ax.plot(x, this_y, label=joint)
|
|
2077
2081
|
ax.fill_between(x, this_y - this_std, this_y + this_std, alpha=0.2)
|
|
2078
2082
|
# legend adjustments
|
|
2079
|
-
if
|
|
2083
|
+
if legend_outside is True:
|
|
2080
2084
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
2081
|
-
elif
|
|
2085
|
+
elif legend_outside is False:
|
|
2082
2086
|
ax.legend()
|
|
2083
2087
|
ax.set_xlabel("Percentage")
|
|
2084
2088
|
ax.set_ylabel(
|
|
@@ -2108,13 +2112,13 @@ def plot_angular_acceleration_by_average_SC(
|
|
|
2108
2112
|
sampling_rate = cfg["sampling_rate"]
|
|
2109
2113
|
plot_SE = cfg["plot_SE"]
|
|
2110
2114
|
angles = cfg["angles"]
|
|
2115
|
+
legend_outside = cfg["legend_outside"]
|
|
2116
|
+
color_palette = cfg["color_palette"]
|
|
2111
2117
|
|
|
2112
2118
|
# plot
|
|
2113
2119
|
f, ax = plt.subplots(1, 1)
|
|
2114
2120
|
ax.set_prop_cycle(
|
|
2115
|
-
plt.cycler(
|
|
2116
|
-
"color", sns.color_palette(cfg["color_palette"], len(angles["name"]))
|
|
2117
|
-
)
|
|
2121
|
+
plt.cycler("color", sns.color_palette(color_palette, len(angles["name"])))
|
|
2118
2122
|
)
|
|
2119
2123
|
x = np.linspace(0, 100, bin_num)
|
|
2120
2124
|
for angle in angles["name"]: # angle loop (lines)
|
|
@@ -2128,9 +2132,9 @@ def plot_angular_acceleration_by_average_SC(
|
|
|
2128
2132
|
ax.plot(x, this_y, label=angle)
|
|
2129
2133
|
ax.fill_between(x, this_y - this_std, this_y + this_std, alpha=0.2)
|
|
2130
2134
|
# legend adjustments
|
|
2131
|
-
if
|
|
2135
|
+
if legend_outside is True:
|
|
2132
2136
|
ax.legend(loc="center left", bbox_to_anchor=(1, 0.5))
|
|
2133
|
-
elif
|
|
2137
|
+
elif legend_outside is False:
|
|
2134
2138
|
ax.legend()
|
|
2135
2139
|
ax.set_xlabel("Percentage")
|
|
2136
2140
|
ax.set_ylabel(
|
|
@@ -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"] = "
|
|
21
|
+
folderinfo["postmouse_string"] = "25mm"
|
|
22
22
|
folderinfo["prerun_string"] = "run"
|
|
23
|
-
folderinfo["postrun_string"] = "
|
|
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"] = "
|
|
19
|
+
folderinfo["postmouse_string"] = "25mm"
|
|
20
20
|
folderinfo["prerun_string"] = "run"
|
|
21
|
-
folderinfo["postrun_string"] = "
|
|
21
|
+
folderinfo["postrun_string"] = "6DLC"
|
|
22
22
|
# cfg
|
|
23
23
|
cfg = {}
|
|
24
24
|
cfg["sampling_rate"] = 100 # base cfg
|
|
@@ -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.
|
|
28
|
+
version="0.2.2", # 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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|