Skip to content

Commit d6039c2

Browse files
authored
Merge pull request #84 from AllenNeuralDynamics/fix_bug
fixing bug when data column is not 'data'
2 parents ed3e9fe + 6760040 commit d6039c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/aind_dynamic_foraging_basic_analysis/plot

src/aind_dynamic_foraging_basic_analysis/plot/plot_fip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def fip_psth_stats_plot(ax, stats_df, threshold=0.05):
425425
fip_psth_stats_plot(ax, etrs['stats'], threshold=0.05)
426426
427427
"""
428-
unique_tests = stats_df["name"].unique()
428+
unique_tests = np.unique(stats_df["name"].values)
429429
colors = style.get_colors(list(unique_tests), offset=0.25, cmap_name="plasma")
430430
for test in unique_tests:
431431
significant = stats_df.query("name == @test").query("p < @threshold")
@@ -613,7 +613,7 @@ def compute_hierarchical_error(
613613
# Organize results
614614
for index, val in enumerate(result.index.values):
615615
bootstraps[index]["time"] = val
616-
result["hb_sem"] = [x["data_sem"] for x in bootstraps]
616+
result["hb_sem"] = [x["{}_sem".format(data_column)] for x in bootstraps]
617617

618618
return result, bootstraps
619619

0 commit comments

Comments
 (0)