Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh] Dynamic reports refactored following emdupre guidelines #467

Closed
wants to merge 37 commits into from

Conversation

javiergcas
Copy link
Collaborator

Closes # .

Changes proposed in this pull request:

  • This code has the structure Elizabeth suggested, which means
  • Event links outside function so calls to plotting functions are simplified
  • Single function to generate all ranked plots
  • Pie plot included
  • Variables are all now lower case and match as much as possible Elizabeth's code
  • Hovering is now formatted better (only 2 decimal digits, units shown when possible)

smoia and others added 30 commits November 11, 2019 09:55
enh:initial commit of dynamic plots
@codecov
Copy link

codecov bot commented Nov 16, 2019

Codecov Report

Merging #467 into master will decrease coverage by 21.72%.
The diff coverage is 15.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #467       +/-   ##
==========================================
- Coverage   82.22%   60.5%   -21.73%     
==========================================
  Files          39      47        +8     
  Lines        2594    3684     +1090     
==========================================
+ Hits         2133    2229       +96     
- Misses        461    1455      +994
Impacted Files Coverage Δ
tedana/reporting/dynamic_figures.py 0% <0%> (ø)
tedana/reporting/KappaRho_DynPlot.py 0% <0%> (ø)
tedana/tests/test_reporting.py 100% <100%> (ø)
tedana/externals/conftest.py 100% <100%> (ø)
tedana/reporting/__init__.py 100% <100%> (ø)
tedana/reporting/static_figures.py 97.84% <100%> (ø)
tedana/workflows/tedana.py 66.39% <100%> (+0.25%) ⬆️
tedana/externals/tempita/__init__.py 13.95% <13.95%> (ø)
tedana/reporting/html_report.py 24.32% <24.32%> (ø)
tedana/externals/tempita/compat3.py 38.23% <38.23%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 444fb28...394fea1. Read the comment docs.

@eurunuela eurunuela requested a review from emdupre November 17, 2019 19:41
Copy link
Collaborator

@smoia smoia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general comment I wouldn't remove the possibility of making figures, just making them not the default (as it was before). The default can be the report, but while that's a great instrument for single subjects and deeper understanding of the results, it's really not helpful in the case of big datasets (multiple subjects/sessions/runs), cause then the intention is to have a good summary of your results to go through with the least time spent on user interface actions (clicks/navigation/...).
If you think that's more a "post_tedana" thing, we can reintegrate it in a post_tedana workflow, but for the moment I would keep everything in the main workflow, as it shouldn't create conflicts.

.gitignore Show resolved Hide resolved
<body>
$body
</body>
</html>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</html>
</html>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not create the templates. This was all @emdupre and @smoia . So unfortunately, I can't comment on this one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment, it looks like you're just suggesting adding a blank line ? Not best-practice for HTML.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad - you're right, just suggesting padding with a blank line. This should only be done in python scripts though, right? Are we enforcing it or no problem if we don't?

.gitignore Show resolved Hide resolved
Copy link
Member

@emdupre emdupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @eurunuela and @javiergcas !

I think I'm a little confused -- we don't want both the KappaRho_DynPlot.py file and the dynamic_figures.py file. If KappaRho_DynPlot is intended to supersede dynamic_figures, can we remove the current dynamic_figures file and rename KappaRho_DynPlot as "dynamic_figures" ?

.gitignore Show resolved Hide resolved
<body>
$body
</body>
</html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment, it looks like you're just suggesting adding a blank line ? Not best-practice for HTML.

@@ -0,0 +1,578 @@
# ---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javiergcas I think this file should be removed and its functionality refactored into the dynamic_figures.py file !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Sorry I just commented below in the wrong comment for this question



# %%
# ----------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section was me trying to get something to quickly test and show. we should remove everything below L335, here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emdupre: I think I'm a little confused -- we don't want both the KappaRho_DynPlot.py file and the dynamic_figures.py file. If KappaRho_DynPlot is intended to supersede dynamic_figures, can we remove the current dynamic_figures file and rename KappaRho_DynPlot as "dynamic_figures" ? Correct, KappaRho_DynPlot supersedes dynamic_figures

@emdupre
Copy link
Member

emdupre commented Nov 24, 2019

I wouldn't remove the possibility of making figures, just making them not the default (as it was before). The default can be the report, but while that's a great instrument for single subjects and deeper understanding of the results, it's really not helpful in the case of big datasets (multiple subjects/sessions/runs), cause then the intention is to have a good summary of your results to go through with the least time spent on user interface actions (clicks/navigation/...).

By "figures" I'll assume you mean static figures, here?

If so, the brainsprite directories should still provide static figures with visualizations of the components, just not their time series or FFT.

@smoia
Copy link
Collaborator

smoia commented Nov 24, 2019

Yes, but spatial maps are not enough to interpret the components. In order to evaluate an IC, the minimal information needed is timeseries and/or FFT and spatial maps. I would even say timeseries are more informative than maps sometimes.
The report is an amazing tool to (1) link all the steps of the analysis together, (2) be able to investigate in a bit more deep manner ME related properties of the components and (3) obtain something that is great for presentations.
The static figures are still a great tool to (1) go through a rich dataset knowing what the rich dataset is representing and (2) going through a rich dataset in a fairly quick way - much quicker than the report or an external tool such as AFNI or fsleyes.
While I believe that the report could be the default output, I don't think we shouldn't be open to different ways to view the results of MEICA. I see how the possibility of opening the results in external tools is not a tedana problem (although we can facilitate the user in the operation, see #426 ), but the visualisation that is outputted is.
We have the code, and I didn't see (given that I still need to finish the review though) any conflict between having also static figures as an output on request and having the report - so I don't see the point not to leave the option of having figures on request.

I might be very passionate about this point because it's fundamental to my preprocessing, but I don't think I'm the only one that would like to go through many components in a way that is between "having a good idea about what a component represents" and "not loosing too much time in navigating a 3d representation and/or setting up the visualisation".

Yet again, if you prefer the figures output to be a post-tedana output (although I don't see the reason for that), I'm sure that @dowdlelt and I can work on making it that way.

@emdupre
Copy link
Member

emdupre commented Nov 24, 2019

Yet again, if you prefer the figures output to be a post-tedana output (although I don't see the reason for that), I'm sure that @dowdlelt and I can work on making it that way.

I'd prefer we don't immediately leap to that as a discussion point -- I don't think it's productive to carry the conversation forward.

I also don't think these points strongly relate to the actual code under consideration (no points to line numbers, etc) so I'll ask that we revisit this discussion once the code firms up a bit.

In general, I'm all for passionate discussions in pull requests but let's keep them productive and focused on the code.

@emdupre emdupre mentioned this pull request Dec 11, 2019
@tsalo tsalo added this to the 0.0.9 milestone Dec 12, 2019
@emdupre emdupre mentioned this pull request Dec 17, 2019
@emdupre
Copy link
Member

emdupre commented Feb 21, 2020

@62442katieb 's PR for linked brainsprites ! : https://github.com/emdupre/tedana/pull/21/files

@stale
Copy link

stale bot commented Jul 19, 2020

This issue has been automatically marked as stale because it has not had any activity in 90 days. It will be closed in 600 days if no further activity occurs. Thank you for your contributions to tedana:tada: !

@stale stale bot added the stale label Jul 19, 2020
@emdupre
Copy link
Member

emdupre commented Jul 20, 2020

This was superseded by #457, so I'm going to close it ! Thanks everyone for your contributions, here !!

@emdupre emdupre closed this Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants