Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wela
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Swain Lab
wela
Commits
aa41e05f
Commit
aa41e05f
authored
5 months ago
by
pswain
Browse files
Options
Downloads
Patches
Plain Diff
added to gallery
parent
75d0aff7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/gallery/plot_binned.pdf
+0
-0
0 additions, 0 deletions
examples/gallery/plot_binned.pdf
examples/run_gr.py
+1
-1
1 addition, 1 deletion
examples/run_gr.py
src/wela/dataloader.py
+11
-3
11 additions, 3 deletions
src/wela/dataloader.py
with
12 additions
and
4 deletions
examples/gallery/plot_binned.pdf
+
0
−
0
View file @
aa41e05f
No preview for this file type
This diff is collapsed.
Click to expand it.
examples/run_gr.py
+
1
−
1
View file @
aa41e05f
...
...
@@ -26,4 +26,4 @@ for dataname in datasets:
)
# dl.save()
# If use_tsv=True,
t
pkl files are created as backup only.
# If use_tsv=True, pkl files are created as backup only.
This diff is collapsed.
Click to expand it.
src/wela/dataloader.py
+
11
−
3
View file @
aa41e05f
...
...
@@ -320,7 +320,11 @@ class dataloader:
if
self
.
a2g_dict
[
key_index
]
not
in
signals_available
:
raise
Exception
(
f
"
The key index
{
key_index
}
is unavailable.
"
)
# get indices for all buds
bud_indices
=
self
.
get_bud_indices
(
grouper
,
key_index
)
bud_indices
=
self
.
get_bud_indices
(
grouper
=
grouper
,
key_index
=
key_index
,
tmax_in_mins_dict
=
tmax_in_mins_dict
,
)
# get key_index data
r_df
=
self
.
get_key_index_data
(
grouper
=
grouper
,
...
...
@@ -425,11 +429,15 @@ class dataloader:
else
:
raise
Exception
(
f
"
{
key_index_path
}
cannot be found.
"
)
def
get_bud_indices
(
self
,
grouper
,
key_index
):
def
get_bud_indices
(
self
,
grouper
,
key_index
,
tmax_in_mins_dict
):
"""
Use key_index to get a multi-index for all buds.
"""
key_index_path
=
self
.
a2g_dict
[
key_index
]
print
(
"
Getting data to identify bud indices...
"
)
record
=
grouper
.
concat_signal
(
key_index_path
,
mode
=
"
raw_daughters
"
)
record
=
grouper
.
concat_signal
(
key_index_path
,
mode
=
"
raw_daughters
"
,
tmax_in_mins_dict
=
tmax_in_mins_dict
,
)
bud_indices
=
record
.
droplevel
(
"
mother_label
"
).
index
return
bud_indices
...
...
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