diff --git a/actions/calculate-statistics/attributes.yaml b/actions/calculate-statistics/attributes.yaml index 74a2c3c66..f08f399a2 100644 --- a/actions/calculate-statistics/attributes.yaml +++ b/actions/calculate-statistics/attributes.yaml @@ -1,6 +1,5 @@ registered: '2019-10-04T08:11:18' data: - units: units.csv results: results.csv notebook: 10_calculate_spatial_statistics.ipynb html: 10_calculate_spatial_statistics.html diff --git a/actions/calculate-statistics/data/10_calculate_spatial_statistics.html b/actions/calculate-statistics/data/10_calculate_spatial_statistics.html index 9b43bc021..99f864178 100644 --- a/actions/calculate-statistics/data/10_calculate_spatial_statistics.html +++ b/actions/calculate-statistics/data/10_calculate_spatial_statistics.html @@ -13173,7 +13173,7 @@ div#notebook {
@@ -13225,7 +13225,8 @@ div#notebook {identify_neurons = actions['identify-neurons']
-units = pd.read_csv(identify_neurons.data_path('units'))
+units = pd.read_csv(identify_neurons.data_path('all_non_identified_units'))
+# units = pd.read_csv(identify_neurons.data_path('units'))
units.head()
%matplotlib inline
+units.groupby('action').count().unit_name.hist()
+
data_loader = dp.Data(
@@ -13346,7 +13378,7 @@ div#notebook {
first_row = units[units['action'] == '1849-060319-3'].iloc[0]
@@ -13427,7 +13459,7 @@ div#notebook {
autocorrelogram = sp.autocorrelation(smooth_high_rate_map)
peaks = sp.fields.find_peaks(autocorrelogram)
real_peaks = peaks * bin_size
- autocorrelogram_box_size = box_size * autocorrelogram.shape[0] / smooth_high_rate_map.shape[0]
+ autocorrelogram_box_size = box_size[0] * autocorrelogram.shape[0] / smooth_high_rate_map.shape[0]
spacing, orientation = sp.spacing_and_orientation(real_peaks, autocorrelogram_box_size)
orientation *= 180 / np.pi
@@ -13482,6 +13514,56 @@ div#notebook {
%debug
+
units.to_csv(output_path / "units.csv", index=False)
-results.to_csv(output_path / "results.csv", index=False)
+results.to_csv(output_path / "results.csv", index=False)
statistics_action = project.require_action("calculate-statistics")
@@ -13548,11 +13700,10 @@ div#notebook {
statistics_action.data["units"] = "units.csv"
-statistics_action.data["results"] = "results.csv"
+statistics_action.data["results"] = "results.csv"
copy_tree(output_path, str(statistics_action.data_path()))
@@ -13560,32 +13711,10 @@ div#notebook {
septum_mec.analysis.registration.store_notebook(statistics_action, "10_calculate_spatial_statistics.ipynb")
diff --git a/actions/calculate-statistics/data/10_calculate_spatial_statistics.ipynb b/actions/calculate-statistics/data/10_calculate_spatial_statistics.ipynb
index d8e6b058d..37f7e954a 100644
--- a/actions/calculate-statistics/data/10_calculate_spatial_statistics.ipynb
+++ b/actions/calculate-statistics/data/10_calculate_spatial_statistics.ipynb
@@ -19,7 +19,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "17:02:20 [I] klustakwik KlustaKwik2 version 0.2.6\n"
+ "14:03:52 [I] klustakwik KlustaKwik2 version 0.2.6\n"
]
}
],
@@ -108,76 +108,51 @@
" \n",
" action \n",
" channel_group \n",
- " max_depth_delta \n",
- " max_dissimilarity \n",
- " unit_id \n",
" unit_name \n",
" \n",
" \n",
" \n",
" \n",
" 0 \n",
- " 1834-010319-1 \n",
- " 0 \n",
- " 100 \n",
- " 0.05 \n",
- " 8d8cecbe-e2e5-4020-9c94-9573ca55cdfc \n",
- " 2 \n",
+ " 1849-060319-3 \n",
+ " 1 \n",
+ " 104 \n",
" \n",
" \n",
" 1 \n",
- " 1834-010319-1 \n",
- " 0 \n",
- " 100 \n",
- " 0.05 \n",
- " 5b7fc3e8-b76d-4eed-a876-9ba184e508ac \n",
- " 39 \n",
+ " 1849-060319-3 \n",
+ " 1 \n",
+ " 108 \n",
" \n",
" \n",
" 2 \n",
- " 1834-010319-3 \n",
- " 0 \n",
- " 100 \n",
- " 0.05 \n",
- " 1b42831d-5d71-4cb1-ba85-b5019b56ca2e \n",
+ " 1849-060319-3 \n",
" 1 \n",
+ " 85 \n",
" \n",
" \n",
" 3 \n",
- " 1834-010319-3 \n",
- " 0 \n",
- " 100 \n",
- " 0.05 \n",
- " 270fb3b3-3a7d-4060-bc1a-bc68d2ecab1a \n",
- " 12 \n",
+ " 1849-060319-3 \n",
+ " 1 \n",
+ " 94 \n",
" \n",
" \n",
" 4 \n",
- " 1834-010319-3 \n",
- " 0 \n",
- " 100 \n",
- " 0.05 \n",
- " 6da7e1db-2d4f-4bd7-b45c-a1855aaa2fec \n",
- " 72 \n",
+ " 1849-060319-3 \n",
+ " 1 \n",
+ " 98 \n",
" \n",
" \n",
"\n",
"