Enh/add time agregation selection #204

Merged
fraimondo merged 7 commits from enh/add_time_agregation_selection into main 2023-03-28 09:41:13 +00:00
fraimondo commented 2023-03-27 14:19:22 +00:00 (Migrated from github.com)

For BOLD data, it might make sense to aggregate (or even select) samples over time.

This PR adds two parameters to the Sphere/Parcel aggregation markers.

  • time_method
  • time_method_params

This parameters allow to specify a function that will be applied after extracting the signals from the spheres/parcels and computing the method parameter.

Additionally, a select function was added, which allows to "pick" data at this step.

For BOLD data, it might make sense to aggregate (or even select) samples over time. This PR adds two parameters to the Sphere/Parcel aggregation markers. * `time_method` * `time_method_params` This parameters allow to specify a function that will be applied after extracting the signals from the spheres/parcels and computing the `method` parameter. Additionally, a `select` function was added, which allows to "pick" data at this step.
github-actions[bot] commented 2023-03-27 14:26:38 +00:00 (Migrated from github.com)
PR Preview Action v1.3.0
Preview removed because the pull request was closed.
2023-03-28 09:45 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.3.0 :---: Preview removed because the pull request was closed. 2023-03-28 09:45 UTC <!-- Sticky Pull Request Commentpr-preview -->
codecov[bot] commented 2023-03-27 14:38:53 +00:00 (Migrated from github.com)

Codecov Report

Merging #204 (6151f29) into main (9743a8f) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
+ Coverage   93.24%   93.33%   +0.08%     
==========================================
  Files          80       80              
  Lines        3392     3435      +43     
  Branches      628      644      +16     
==========================================
+ Hits         3163     3206      +43     
  Misses        151      151              
  Partials       78       78              
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 93.32% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
junifer/markers/parcel_aggregation.py 100.00% <100.00%> (ø)
junifer/markers/sphere_aggregation.py 100.00% <100.00%> (ø)
junifer/stats.py 100.00% <100.00%> (ø)
## [Codecov](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#204](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (6151f29) into [main](https://codecov.io/gh/juaml/junifer/commit/9743a8f57cf81d40e3a63caeca65e9321e403dd8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (9743a8f) will **increase** coverage by `0.08%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/juaml/junifer/pull/204/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #204 +/- ## ========================================== + Coverage 93.24% 93.33% +0.08% ========================================== Files 80 80 Lines 3392 3435 +43 Branches 628 644 +16 ========================================== + Hits 3163 3206 +43 Misses 151 151 Partials 78 78 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `93.32% <100.00%> (+0.08%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/markers/parcel\_aggregation.py](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL3BhcmNlbF9hZ2dyZWdhdGlvbi5weQ==) | `100.00% <100.00%> (ø)` | | | [junifer/markers/sphere\_aggregation.py](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL3NwaGVyZV9hZ2dyZWdhdGlvbi5weQ==) | `100.00% <100.00%> (ø)` | | | [junifer/stats.py](https://codecov.io/gh/juaml/junifer/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdGF0cy5weQ==) | `100.00% <100.00%> (ø)` | |
synchon (Migrated from github.com) requested changes 2023-03-27 15:37:47 +00:00
synchon (Migrated from github.com) commented 2023-03-27 15:23:33 +00:00

Added => Add to keep the language consistent.

`Added` => `Add` to keep the language consistent.
synchon (Migrated from github.com) commented 2023-03-27 15:24:34 +00:00

nitpick: ... parcels and spheres respectively ...

nitpick: `... parcels and spheres respectively ...`
@ -32,6 +32,12 @@ class ParcelAggregation(BaseMarker):
method_params : dict, optional
synchon (Migrated from github.com) commented 2023-03-27 15:27:06 +00:00

method =>

``method``

or,

:term:`method`
`method` => ``` ``method`` ``` or, ``` :term:`method` ```
@ -37,6 +37,12 @@ class SphereAggregation(BaseMarker):
(default "mean").
synchon (Migrated from github.com) commented 2023-03-27 15:34:39 +00:00

method =>

``method``

or,

:term:`method`
`method` => ``` ``method`` ``` or, ``` :term:`method` ```
@ -144,3 +154,41 @@ def winsorized_mean(
win_mean = win_dat.mean(axis=axis)
synchon (Migrated from github.com) commented 2023-03-27 15:37:02 +00:00

Might be better to explicitly mention list of what basic type we expect.

Might be better to explicitly mention list of what basic type we expect.
synchon (Migrated from github.com) commented 2023-03-27 15:37:08 +00:00

Same as above.

Same as above.
synchon (Migrated from github.com) commented 2023-03-27 15:36:24 +00:00

Missing type annotation for pick and drop.

Missing type annotation for `pick` and `drop`.
synchon (Migrated from github.com) approved these changes 2023-03-28 08:56:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!204
No description provided.