|
89 | 89 | "fig = subject_progress_figure(df, perf_window=100, summary_matrix_plot=False)" |
90 | 90 | ] |
91 | 91 | }, |
92 | | - { |
93 | | - "cell_type": "code", |
94 | | - "execution_count": null, |
95 | | - "metadata": {}, |
96 | | - "outputs": [], |
97 | | - "source": [ |
98 | | - "import lecilab_behavior_analysis.df_transforms as dft\n", |
99 | | - "import lecilab_behavior_analysis.plots as plots\n", |
100 | | - "df_ch = dft.get_center_hold_df(dft.analyze_df(df))\n", |
101 | | - "plots.plot_mean_and_cis_by_date(df_ch, item_to_show=\"number_of_pokes\", group_trials_by=\"year_month_day\", color='tab:green')\n", |
102 | | - "plots.plot_mean_and_cis_by_date(df_ch, item_to_show=\"hold_time\", group_trials_by=\"year_month_day\", color='tab:red')" |
103 | | - ] |
104 | | - }, |
105 | | - { |
106 | | - "cell_type": "code", |
107 | | - "execution_count": null, |
108 | | - "metadata": {}, |
109 | | - "outputs": [], |
110 | | - "source": [ |
111 | | - "from lecilab_behavior_analysis.df_transforms import add_trial_of_day_column_to_df, add_day_column_to_df\n", |
112 | | - "import matplotlib.pyplot as plt\n", |
113 | | - "\n", |
114 | | - "df = add_day_column_to_df(df)\n", |
115 | | - "df = add_trial_of_day_column_to_df(df)\n", |
116 | | - "\n", |
117 | | - "tdf = df[df[\"year_month_day\"] == \"2025-06-21\"]\n", |
118 | | - "\n", |
119 | | - "tdf[\"port2_holds\"] = tdf.apply(lambda row: utils.get_trial_port_hold(row, 2), axis=1)\n", |
120 | | - "fig, axs = plt.subplots(2, 1, figsize=(10, 5))\n", |
121 | | - "ax1 = plots.plot_number_of_pokes_histogram(tdf, port_number=2, ax=axs[0])\n", |
122 | | - "ax2 = plots.plot_port_holding_time_histogram(tdf, port_number=2, ax=axs[1])\n", |
123 | | - "\n", |
124 | | - "plt.show()" |
125 | | - ] |
126 | | - }, |
127 | 92 | { |
128 | 93 | "cell_type": "code", |
129 | 94 | "execution_count": null, |
|
144 | 109 | "from lecilab_behavior_analysis.figure_maker import session_summary_figure\n", |
145 | 110 | "from lecilab_behavior_analysis.df_transforms import add_trial_of_day_column_to_df, add_day_column_to_df\n", |
146 | 111 | "# select the session you want to plot\n", |
147 | | - "date = \"2025-06-26\"\n", |
| 112 | + "date = \"2025-06-30\"\n", |
148 | 113 | "df = add_day_column_to_df(df)\n", |
149 | 114 | "df = add_trial_of_day_column_to_df(df)\n", |
150 | 115 | "sdf = df[df[\"year_month_day\"] == date]\n", |
|
215 | 180 | ], |
216 | 181 | "metadata": { |
217 | 182 | "kernelspec": { |
218 | | - "display_name": "Python 3", |
| 183 | + "display_name": "dev", |
219 | 184 | "language": "python", |
220 | 185 | "name": "python3" |
221 | 186 | }, |
|
0 commit comments