Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Glyb
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
François LAURENT
Glyb
Commits
ded95650
Commit
ded95650
authored
3 years ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
4-quick-landscapes.ipynb released on 210810
parent
de258ddb
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
notebooks/3-roi.ipynb
+8
-29
8 additions, 29 deletions
notebooks/3-roi.ipynb
notebooks/4-quick-landscapes.ipynb
+310
-36
310 additions, 36 deletions
notebooks/4-quick-landscapes.ipynb
notebooks/former-analyses-reworked.ipynb
+2200
-15493
2200 additions, 15493 deletions
notebooks/former-analyses-reworked.ipynb
with
2518 additions
and
15558 deletions
notebooks/3-roi.ipynb
+
8
−
29
View file @
ded95650
...
@@ -52,38 +52,17 @@
...
@@ -52,38 +52,17 @@
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"ename": "KeyboardInterrupt",
"output_type": "stream",
"evalue": "",
"text": [
"few roi found: 6\n",
"few roi found: 5\n",
"few roi found: 5\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov018.txt\n",
"few roi found: 8\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov006.txt\n",
"few roi found: 4\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov020.txt\n",
"few roi found: 6\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov003.txt\n",
"few roi found: 4\n",
"few roi found: 5\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov015.txt\n",
"few roi found: 7\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov012.txt\n",
"no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov016.txt\n",
"global max density is below the threshold: 0.04466814859471522 < 0.05\n"
]
},
{
"ename": "RuntimeError",
"evalue": "no roi found",
"output_type": "error",
"output_type": "error",
"traceback": [
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-3-6e2a6552cfe5>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mdf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataframe\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m \u001b[0mroi_centers\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdensity_based_roi\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m.05\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# candidate ROI\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0mb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRWAnalyzer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m<ipython-input-3-9a96db07a9a3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mdf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataframe\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m \u001b[0mroi_centers\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdensity_based_roi\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m.04\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# candidate ROI\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0mb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mRWAnalyzer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/github/TRamWAy/tramway/analyzer/roi/utils.py\u001b[0m in \u001b[0;36mdensity_based_roi\u001b[0;34m(locations, min_kernel_density, target_pattern_size, step_size_factor, dr, kernel_density)\u001b[0m\n\u001b[1;32m 66\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'few roi found: {}'\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mroi_centers\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 68\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'no roi found'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 69\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 70\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mroi_centers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/github/TRamWAy/tramway/analyzer/roi/utils.py\u001b[0m in \u001b[0;36mdensity_based_roi\u001b[0;34m(locations, min_kernel_density, target_pattern_size, step_size_factor, dr, kernel_density)\u001b[0m\n\u001b[1;32m 39\u001b[0m \u001b[0mgrid\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mc_\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0m_x\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreshape\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0m_y\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreshape\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 41\u001b[0;31m \u001b[0mlog_density\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mepanechnikov_density\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mxy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgrid\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtarget_pattern_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 42\u001b[0m \u001b[0mlog_density\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlog_density\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreshape\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgrid_x\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgrid_y\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 43\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mRuntimeError\u001b[0m: no roi found"
"\u001b[0;32m~/github/TRamWAy/tramway/analyzer/roi/utils.py\u001b[0m in \u001b[0;36mepanechnikov_density\u001b[0;34m(xy, eval_at, target_pattern_size)\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mxy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 18\u001b[0;31m \u001b[0mlog_density\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscore_samples\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0meval_at\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 19\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mlog_density\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/.local/lib/python3.8/site-packages/sklearn/neighbors/_kde.py\u001b[0m in \u001b[0;36mscore_samples\u001b[0;34m(self, X)\u001b[0m\n\u001b[1;32m 199\u001b[0m \u001b[0mN\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtree_\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msum_weight\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 200\u001b[0m \u001b[0matol_N\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0matol\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mN\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 201\u001b[0;31m log_density = self.tree_.kernel_density(\n\u001b[0m\u001b[1;32m 202\u001b[0m \u001b[0mX\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mh\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbandwidth\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkernel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkernel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0matol\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0matol_N\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 203\u001b[0m rtol=self.rtol, breadth_first=self.breadth_first, return_log=True)\n",
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
]
]
}
}
],
],
...
...
%% Cell type:code id:d4080a30 tags:
%% Cell type:code id:d4080a30 tags:
```
python
```
python
from
tramway.analyzer
import
*
from
tramway.analyzer
import
*
a
=
RWAnalyzer
()
a
=
RWAnalyzer
()
a
.
spt_data
=
spt_data
.
from_ascii_files
(
r
'
../data/interim/210503_Glyb-Eos/210503_Glyb-Eosmov[0-9][0-9][0-9].txt
'
)
a
.
spt_data
=
spt_data
.
from_ascii_files
(
r
'
../data/interim/210503_Glyb-Eos/210503_Glyb-Eosmov[0-9][0-9][0-9].txt
'
)
a
.
spt_data
.
localization_precision
=
sigma
=
.
0106
a
.
spt_data
.
localization_precision
=
sigma
=
.
0106
a
.
spt_data
.
frame_interval
=
dt
=
.
015
a
.
spt_data
.
frame_interval
=
dt
=
.
015
```
```
%% Cell type:markdown id:2ff19c3a tags:
%% Cell type:markdown id:2ff19c3a tags:
# Define ROI
# Define ROI
%% Cell type:code id:e7857aa3 tags:
%% Cell type:code id:e7857aa3 tags:
```
python
```
python
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
def
roi_as_dataframe
(
bounding_boxes
,
columns
=
None
):
def
roi_as_dataframe
(
bounding_boxes
,
columns
=
None
):
bb
=
np
.
stack
([
np
.
r_
[
lb
,
ub
]
for
lb
,
ub
in
bounding_boxes
],
axis
=
0
)
bb
=
np
.
stack
([
np
.
r_
[
lb
,
ub
]
for
lb
,
ub
in
bounding_boxes
],
axis
=
0
)
if
columns
is
None
:
if
columns
is
None
:
if
bb
.
shape
[
1
]
==
4
:
if
bb
.
shape
[
1
]
==
4
:
columns
=
[
'
x
'
,
'
y
'
]
columns
=
[
'
x
'
,
'
y
'
]
elif
bb
.
shape
[
1
]
==
6
:
elif
bb
.
shape
[
1
]
==
6
:
columns
=
[
'
x
'
,
'
y
'
,
'
t
'
]
columns
=
[
'
x
'
,
'
y
'
,
'
t
'
]
else
:
else
:
raise
ValueError
(
'
undefined column names
'
)
raise
ValueError
(
'
undefined column names
'
)
return
pd
.
DataFrame
(
bb
,
columns
=
[
'
'
.
join
((
coord
,
bound
))
for
coord
in
columns
for
bound
in
(
'
min
'
,
'
max
'
)
])
return
pd
.
DataFrame
(
bb
,
columns
=
[
'
'
.
join
((
coord
,
bound
))
for
coord
in
columns
for
bound
in
(
'
min
'
,
'
max
'
)
])
```
```
%% Cell type:code id:32804b7d tags:
%% Cell type:code id:32804b7d tags:
```
python
```
python
from
tramway.analyzer.roi.utils
import
*
from
tramway.analyzer.roi.utils
import
*
side
=
1.
side
=
1.
min_transloc
=
200
min_transloc
=
200
for
f
in
a
.
spt_data
:
for
f
in
a
.
spt_data
:
df
=
f
.
dataframe
df
=
f
.
dataframe
roi_centers
=
density_based_roi
(
df
,
.
04
)
# candidate ROI
roi_centers
=
density_based_roi
(
df
,
.
04
)
# candidate ROI
b
=
RWAnalyzer
()
b
=
RWAnalyzer
()
b
.
spt_data
=
spt_data
.
from_dataframe
(
df
[[
'
n
'
,
'
x
'
,
'
y
'
,
'
t
'
]])
b
.
spt_data
=
spt_data
.
from_dataframe
(
df
[[
'
n
'
,
'
x
'
,
'
y
'
,
'
t
'
]])
b
.
spt_data
.
localization_error
=
a
.
spt_data
.
localization_error
b
.
spt_data
.
localization_error
=
a
.
spt_data
.
localization_error
b
.
roi
=
roi
.
from_squares
(
roi_centers
,
side
)
b
.
roi
=
roi
.
from_squares
(
roi_centers
,
side
)
selected_roi
=
[]
selected_roi
=
[]
for
r
in
b
.
roi
:
for
r
in
b
.
roi
:
r_df
=
r
.
crop
()
r_df
=
r
.
crop
()
r_df
=
r
.
discard_static_trajectories
(
r_df
)
r_df
=
r
.
discard_static_trajectories
(
r_df
)
if
min_transloc
<=
len
(
r_df
):
if
min_transloc
<=
len
(
r_df
):
selected_roi
.
append
(
r
.
bounding_box
)
selected_roi
.
append
(
r
.
bounding_box
)
if
selected_roi
:
if
selected_roi
:
c
=
RWAnalyzer
()
c
=
RWAnalyzer
()
c
.
spt_data
=
spt_data
.
from_ascii_file
(
f
.
source
)
c
.
spt_data
=
spt_data
.
from_ascii_file
(
f
.
source
)
c
.
roi
=
roi
.
from_bounding_boxes
(
roi_as_dataframe
(
selected_roi
))
c
.
roi
=
roi
.
from_bounding_boxes
(
roi_as_dataframe
(
selected_roi
))
c
.
roi
.
to_ascii_file
(
f
.
source
[:
-
4
]
+
'
-roi.txt
'
)
c
.
roi
.
to_ascii_file
(
f
.
source
[:
-
4
]
+
'
-roi.txt
'
)
else
:
else
:
print
(
f
'
no roi for file
{
f
.
source
}
'
)
print
(
f
'
no roi for file
{
f
.
source
}
'
)
```
```
%% Output
%% Output
few roi found: 6
few roi found: 5
few roi found: 5
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov018.txt
few roi found: 8
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov006.txt
few roi found: 4
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov020.txt
few roi found: 6
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov003.txt
few roi found: 4
few roi found: 5
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov015.txt
few roi found: 7
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov012.txt
no roi for file ../data/raw/210503_Glyb-Eos/210503_Glyb-Eosmov016.txt
global max density is below the threshold: 0.04466814859471522 < 0.05
---------------------------------------------------------------------------
---------------------------------------------------------------------------
RuntimeError
Traceback (most recent call last)
KeyboardInterrupt
Traceback (most recent call last)
<ipython-input-3-
6e2a6552cfe5
> in <module>
<ipython-input-3-
9a96db07a9a3
> in <module>
7 df = f.dataframe
7 df = f.dataframe
8
8
----> 9 roi_centers = density_based_roi(df, .0
5
) # candidate ROI
----> 9 roi_centers = density_based_roi(df, .0
4
) # candidate ROI
10
10
11 b = RWAnalyzer()
11 b = RWAnalyzer()
~/github/TRamWAy/tramway/analyzer/roi/utils.py in density_based_roi(locations, min_kernel_density, target_pattern_size, step_size_factor, dr, kernel_density)
~/github/TRamWAy/tramway/analyzer/roi/utils.py in density_based_roi(locations, min_kernel_density, target_pattern_size, step_size_factor, dr, kernel_density)
66 print('few roi found: {}'.format(len(roi_centers)))
39 grid = np.c_[_x.reshape((-1,1)),_y.reshape((-1,1))]
67 else:
40
---> 68 raise RuntimeError('no roi found')
---> 41 log_density = epanechnikov_density(xy, grid, target_pattern_size)
69
42 log_density = log_density.reshape(len(grid_x),len(grid_y))
70 return roi_centers
43
RuntimeError: no roi found
~/github/TRamWAy/tramway/analyzer/roi/utils.py in epanechnikov_density(xy, eval_at, target_pattern_size)
16
17 estimator.fit(xy)
---> 18 log_density = estimator.score_samples(eval_at)
19
20 return log_density
~/.local/lib/python3.8/site-packages/sklearn/neighbors/_kde.py in score_samples(self, X)
199 N = self.tree_.sum_weight
200 atol_N = self.atol * N
--> 201 log_density = self.tree_.kernel_density(
202 X, h=self.bandwidth, kernel=self.kernel, atol=atol_N,
203 rtol=self.rtol, breadth_first=self.breadth_first, return_log=True)
KeyboardInterrupt:
%% Cell type:markdown id:37585b0e tags:
%% Cell type:markdown id:37585b0e tags:
# Reload and inspect a few ROI
# Reload and inspect a few ROI
%% Cell type:code id:7064300b tags:
%% Cell type:code id:7064300b tags:
```
python
```
python
a
.
roi
=
roi
.
from_ascii_files
()
a
.
roi
=
roi
.
from_ascii_files
()
a
.
time
=
time
.
TimeWindow
(
duration
=
window_duration
,
shift
=
window_shift
)
a
.
time
=
time
.
TimeWindow
(
duration
=
window_duration
,
shift
=
window_shift
)
a
.
tesseller
=
tessellers
.
KMeans
a
.
tesseller
=
tessellers
.
KMeans
a
.
tesseller
.
resolution
=
.
1
a
.
tesseller
.
resolution
=
.
1
```
```
%% Cell type:code id:f1248422 tags:
%% Cell type:code id:f1248422 tags:
```
python
```
python
for
r
in
a
.
roi
:
for
r
in
a
.
roi
:
df
=
r
.
crop
()
df
=
r
.
crop
()
df
=
r
.
discard_static_trajectories
(
df
)
df
=
r
.
discard_static_trajectories
(
df
)
assignment
=
a
.
sampler
.
sample
(
df
)
assignment
=
a
.
sampler
.
sample
(
df
)
a
a
a
.
tesseller
.
mpl
.
animate
(
assignment
)
a
.
tesseller
.
mpl
.
animate
(
assignment
)
```
```
%% Cell type:code id:3e8a5658 tags:
%% Cell type:code id:3e8a5658 tags:
```
python
```
python
help
(
a
.
tesseller
.
mpl
.
animate
)
help
(
a
.
tesseller
.
mpl
.
animate
)
```
```
%% Cell type:code id:b4d78654 tags:
%% Cell type:code id:b4d78654 tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
notebooks/4-quick-landscapes.ipynb
+
310
−
36
View file @
ded95650
This diff is collapsed.
Click to expand it.
notebooks/former-analyses-reworked.ipynb
+
2200
−
15493
View file @
ded95650
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment