-
Notifications
You must be signed in to change notification settings - Fork 95
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
[DOC] Improve documentation of computefeats2 #458
[DOC] Improve documentation of computefeats2 #458
Conversation
tedana/stats.py
Outdated
data_vn = stats.zscore(data, axis=-1) | ||
|
||
# get betas of `data`~`mmix` and limit to range [-0.999, 0.999] | ||
data_R = get_coeffs(data_vn, mmix, mask=None) | ||
# Avoid abs(data_R) = 1 or -1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the standardized parameter estimates from a multiple regression are not the same as correlation coefficients and often go above or below what is possible with correlation coefficients, this step also avoids values > 1 or < -1.
tedana/stats.py
Outdated
@@ -74,10 +74,15 @@ def computefeats2(data, mmix, mask=None, normalize=True): | |||
# demean masked data | |||
if mask is not None: | |||
data = data[mask, ...] | |||
# normalize data (minus mean and divide by std) in the last dimension | |||
# so that least-squares estimates represent correlation values (data_R) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say they "approximate" correlation values, because this conversion isn't technically valid as far as I can tell.
@CesarCaballeroGaudes : in addition to considering @tsalo 's comments above, could you make sure we pass the linter ? Thanks ! |
@all-contributors add @CesarCaballeroGaudes for documentation, code ! |
I've put up a pull request to add @CesarCaballeroGaudes! 🎉 |
Also worth noting when it comes to computefeats2: the results seems to be treated as Fisher's R-to-Z-transformed z-values, but not at z-statistics. In order to "convert" them to z-statistics, we do the following: tedana/tedana/metrics/kundu_fit.py Lines 178 to 182 in be175c7
That is, we essentially z-score each component's z-value map separately, which I don't think is appropriate. The z-values (really just normally-distributed correlation coefficients) shouldn't necessarily have a mean of zero, so perhaps doing the variance normalization (minus mean-centering), as is done when Moreover, since all of the component z-value maps have the same degrees of freedom, we should be able to normalize all of the maps at once using the same scaling factor. |
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=======================================
Coverage 81.93% 81.93%
=======================================
Files 39 39
Lines 2530 2530
=======================================
Hits 2073 2073
Misses 457 457
Continue to review full report at Codecov.
|
I changed the comments following your suggestions and passed linter. Just doing it to close this PR. Some of these comments will disappear in the new version of stats.py that I am working on where the lines of the Fisher's transformation disappear. Therefore, the only relevant change is in kundu_fit.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@CesarCaballeroGaudes Is this ready to merge? |
Yes, it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ! Only suggestions are that we write things out in full if they're in docstrings, since there's no harm in being explicit, there 😸
Thanks, @CesarCaballeroGaudes !!
Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu>
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=======================================
Coverage 81.93% 81.93%
=======================================
Files 39 39
Lines 2530 2530
=======================================
Hits 2073 2073
Misses 457 457
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=======================================
Coverage 81.93% 81.93%
=======================================
Files 39 39
Lines 2530 2530
=======================================
Hits 2073 2073
Misses 457 457
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry I missed the review request before now @tsalo
Thanks !! I think there are a few suggestions that were not committed -- not sure if it's because you disagree or they were just missed ? Let me know, happy either way ! |
Hi @CesarCaballeroGaudes! @emdupre made a few suggestions above (#458 (review)) and you marked them resolved without including them (which means you've dismissed those suggestions). Can you clarify if that's what you meant to do? My guess is that you clicked "resolve" thinking that you wanted to "commit the suggestion" and accept? If that's the case you need to go back up to those suggestions, click "unresolve suggestion" and then click the "commit this suggestion" button. Does that make sense? Happy to chat in the gitter channel if not! |
Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu>
95ade44
@KirstieJane sorry for the delay in responding. Yes, I was meant to accept it, but I'm not very familiar with the procedure. Please let me know if I did it correctly now. |
Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks again @CesarCaballeroGaudes ! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Thanks for clarifying these mathematical details @CesarCaballeroGaudes !
I cannot merge this PR because it seems I don't have write access |
@CesarCaballeroGaudes I'll merge it now, and maybe @emdupre can handle the permissions issue? |
* Reorganize metrics. * Some more work on organizing metrics. * Add signal_minus_noise_z metric. * Variable name change. * edited gitignore after testing * Revert "edited gitignore after testing" This reverts commit 28098e1. * fix the +0 -0 absurdity and actually commit * silly underscore go away * style fix * I swear I can spell things. * Move comptable. * more style * Move T2* cap into decay function. * Split up metric files. * Adjust cluster-extent thresholding to match across maps. * Partially address review. Lots of great refactoring by @rmarkello. * Make DICE broadcastable. * Clean up signal-noise metrics and fix compute_countnoise. * Simplify calculate_z_maps. * Fix dice (thanks @rmarkello) * use index, doesn't have component * add the scree to the outputs * Improve documentation. * Fix import. * Fix imports. * Get modularized metrics mostly working. * Fix bugs in metric calculations. All metrics should be calculated on *masked* data. Any metric maps should also be masked. * Revert changes to decision tree. * Finish reverting. * Fix viz. * Fix style issues * More??? * Fix bug in generate_metrics. * Add initial tests. * Improve docstrings, add shape checks, and reorder functions. * Fix assertions. * Fix style issue. * Add metric submodules to API docs. * Improve reporting for T_to_Z transform. * Fix bugs in new modularized dependence metrics. * [MNT] Drop versioneer from requirements (#481) * MNT: Drop versioneer from requirements The versioneer package is not a requirement to use versioneer. * MNT: Add versioneer to a new "dev" extra * [ENH] Adds maPCA decomposition algorithm (#435) * Create fix/decomp branch * Started writing GIFT version in Pythonn as we found it selects a reasonable number of components * Advanced on new PCA computation * Solved NAN issues and added testing data * Solved est_indp_sp bug * PCA is SOLVED! Hooray! * PR request ready version of the PCA fix * fix: avoid circular imports * Bug fixes and started working on docstrings * [FIX] Clean up some variables in GIFT PCA (#453) * Added version argument (#415) * Added version argument * changed import of __version__ * [REF] No pytest_cache dir * [ENH] Dockerfile for dev testing * [DOC] Add docs for code testing to CONTRIBUTING * [REF] Docker org can't have hyphens Just use tedana/tedana-dev namespace * Changed default export in gzipped nifti (#416) * Changed default export in gzipped nifti * Updated extension of files in tests * [FIX] Update typo in .gitignore Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * [REF, DOC] Use logging to generate reports (#424) * Use logging for report/references generation. * Improve ContextFilter docstring. * Remove broken newlines. * Make the style good. * [ENH][TST] Overhauls CI completely (#418) * Adds integration and five echo skipping * Style fixes * Updates config for CircleCI * Attempts to fix YML * [TEST] Update Dockerfile to match new integr tests * [TEST] Fixes integration tests in Docker image * [FIX] Remove intermediate IO files * Resolves merge conflict, adds output check * Some fixes * [TEST] Updates dev_tool testing infra * [TEST] Fixes pytest integration path checking * [TEST] CircleCI uses Docker image to run tests * [FIX] Minor dev_tool issues for CircleCI * [TEST] Use variable for integration test filename * Attempts to fix CircleCI style check * Revert "Attempts to fix CircleCI style check" This reverts commit 769f4b7. * Attempt to fix tput call * Adds checkout to code in YML * [TEST] Integration tests run in parallel * [TEST] Separate data downloads from Docker build * [TEST] Update integration test data path * [TEST] CircleCI uses good Docker * [TEST] No version check in circleci * [TEST] Checkout for get_data / style check * Attempts to fix integration test inclusion * [TEST] Checkout for get_data / style check * [FIX] Fix circleci config hopefully * [FIX] No / workdir for circleci machine * [FIX] Use ~ for coverage in circleci * Switches integration tests to truncated length data * [FIX] Actually merge coverage files * [FIX] Coverage cache path circleci * [TEST] Integration test outputs in tests/data * [FIX] circleci config bug * [TEST] Major testing infra overhaul Docker image considerably slimmed down (only test python 3.6 locally), added new dev_requirements.txt to make conda yaml files obsolete, added Makefile to make testing easier locally (if you aren't using the Docker image), and removed integration test data downloads from separate script and into the integration tests themselves * [TEST] Massive CircleCI config regression @tsalo had it right --- moving towards a fully Dockerized implementation was not the way forward for a simple Python package. * [TEST] Better integration testing? At least, more equivalent to what was happening before, where we check that ONLY the expected output files are generated (no more, no less) * [FIX] CircleCI workflow issue * [MNT] No flake8-putty * [FLK] New flake8 error detected * [TEST] Run style check separately @leej3 said it's not fair to stop running tests for a few minor style errors, and he's usually right so.... * [TEST] Py37 for all non-unit test stuff * [WIP,TEST,DOC] Builds docs in CircleCI (#428) * [REF] Fix up dev vs non-dev requirements.txt * [TEST] Build docs in CircleCI Also modifies the building of the py37 environment a bit since it's shared between so many things * [REF] Change tab-delimited files from txt extension to tsv (#429) * Change comptables and log from txt to tsv. * Prevents shell expansion in API (#431) * enh: add stale-bot (#430) * edited gitignore after testing * Revert "edited gitignore after testing" This reverts commit 28098e1. * fixing typo and clarity * cleaning up approach introduction * more cleanup in approach * adding initial plot to pubs page * correcting plots * removing comment parts * getting live plots working on publication page * clean up and adding more WIP details * completing live TE plot from spreasheet * changing outputs to nii.gz * adding TR and Vox dim subplots * initial adding of output details * fixing tables * rearranging to considerations and recomendations * seperating out considerations section * technically spelling things correct * started fixing titles * addinf figures for what is ME page * title clarification * Add information about GE * adding mutliecho questions to the FAQ * initial adding to multiecho * multiecho page figures and explanations * pipeline and phsyics updated * typo * fix headings * possibly clean latex? * we have eight echoes * more details in approach * title change * adding software details * clean up of multiecho * additional considerations! * typo * update plots * due credit in faq * more details on multi echo, usage * tedana does accept BRIK/HEAD * someone wanted sentences seperated * life by a thousand little edits * GrAmMaRs * other software! * links to api in approach * white space? * [ENH] Make png default (#427) * Makes --png default, adds --nopng * Fixes integration test for --nopng * Adds correction to integration test outputs * Update docs/faq.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * MRI scanners != BBQ * Update docs/approach.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update docs/approach.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Apply suggestions from code review, thanks a million Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * echo cleanup, and kundu 3 banish * noted png default * completely changed the QC section * pls wrk Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * docs: add jbteves as a contributor (#442) * docs: update README.md * docs: update .all-contributorsrc * docs: add eurunuela as a contributor (#441) * docs: update README.md * docs: update .all-contributorsrc * [ENH][TST] Feature/parallel integration (#437) * Adjusts makefile to include three-echo and five-echo, remove integration * Adjusts CircleCI config to do the same as makefile * Removes doc auto-building via CircleCI * [FIX] Adds check for just one component (#405) * Adds check for just one component * [ENH] Consolidate stats unit tests and fix linting errors in tests (#421) * Consolidates stats unit tests * Changes to simpler assert for stats errors * Oof linting Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Clean up some variables. * Fix output name. * Fix bugs and use TruncatedSVD in GIFT. * Normalization of data added * doc: fix linting errors * Second if statement in _checkOrder does not check for None values now, as these should never be given to the function. Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Style editing to gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Style editing to gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Removed silly comment inherited from MATLAB Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Removed print statement int gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Commented TruncatedSVD as it does not provide the functionality we are looking for. Also, made some edits after the comments from Elizabeth * Removed unused import * Changed some of the print statements to make them more user friendly * Adds documentation * Fixes PCA memory madness * Fixes linter errors * Now accounting for imprecission in kurtosis calculation * Edited autocorr docstring * GIFT PCA doesn't use the var normalized now in order to get the same number of components as the original GIFT algorithm. This is something we should definitely discuss * Corrections to style * Changed test output expected * Removed GIFT notebook * Made MDL the default and added GIFT reference * Removed GIFT testing data * Changes as commented in PR review * Style fix * Changed variable names to make them more readble * Style fix * Style fix * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Changes suggested in PR review * More changes based on PR review suggestions * Changes to workflows/tedana.py based on PR review suggestions * Changes to decomposition/pca.py based on PR review suggestions * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * More review changes * Style fixes * Finished with PR review suggestinos * Update tedana/decomposition/gift.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Update tedana/decomposition/gift.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Renamed gift to ma_pca and added some math notes * Added more maths-related comments * Renamed ma_pca function * Added unit test for maPCA and fixed a typo in ma_pca.py * Added unit test for maPCA and fixed a typo in ma_pca.py * Added unit test for ent_rate_sp inside maPCA * Added test for constant input to ent_rate_sp * Documentation fix Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Documentation fix Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Removed if statements in ent_rate_sp as they were never going to be accessed in our case. Also addressed some PR review comments. * Style fix * Update tedana/decomposition/ma_pca.py Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Update tedana/decomposition/ma_pca.py Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Addresses documentation suggestions * [TST] Expands integration (#482) * Expands integration testing to include mapca and several of its options * [REF] Remove the sourceTEs option (#493) * [REF] Removes mle option (#495) * Removes mle option * [REF] Remove confusing variable copy (#498) * mmix -> mmix_new * Change variable name. * add new plot to all tests * removing to_numpy(), plt. to fig. * docs: add Islast as a contributor (#503) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * [DOC] Adds developer guideline start (#446) * Adds developer guideline start * Modifies CONTRIBUTING * Fixes dead link, removes project board * Adds more thorough developing guidelines * Fix lack of linting * Updates dev requirements * Adds flake8 instructions * Updates config with correct CI version * Adds manual selection of artifiacts through CircleCI UI * Adds tar command * Clarify some pytest stuff * Offer alternative to Gitter * Outlines steps for integration tests more clearly * Adds filenaming convention for outputs files * Ask not to rewrite history * Adds two reviewer rule Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * docs: add eurunuela as a contributor (#504) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs: add dowdlelt as a contributor (#505) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * [FIX] Make bi-sided clustering default (#331) * Change default thresholding to bi-sided. We should treat positively and negatively weighted voxels separately when performing cluster-extent thresholding. * Update license in zenodo * [TST] Expand parameters tested in integration tests (#502) * Add args to integration tests. * Fix import error. * Fix 5-echo test. * Move rerun into another directory. * Fix outputs. * Fix... * Dummy commit. * [FIX, TST] Fix the failing tests (#518) * Change requirements. * Change env checksums. * Improve documentation for debugging. * [DOC] Improve documentation of computefeats2 (#458) * adding more doc to computefeats2 * Added the default option add_const=False for user-friendliness * changes following PR review & linter check * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-authored-by: Elizabeth DuPre <emd222@cornell.edu> * [TST] Remove testing directory from coverage tests (#496) * Remove testing directory from coverage tests * Removes some more tests * Removes setup.py from coverage ignore * Ignores info.py * [ENH, REF] Allow re-running without manacc and reorder args (#508) * Reorder tedana workflow arguments Broadly reorder them from early to late in the workflow, but also grouping related arguments together. Add a group for re-running the workflow. * Remove unnecessary check. Data is a list from the CLI and io.load_data will convert a string to list anyway. Plus io.load_data will raise an error if the file doesn’t exist. * Allow re-running workflow without manacc. I.e., if manacc is not supplied, but ctab is, then use the classifications from ctab. * Address @dowdlelt's review. * [ENH] Add t2smap argument for optional recalculated T2* map (#408) * Add t2smap argument Also, move rerunning-related arguments into their own subgroup and allow rerunning *without* manacc (i.e., if manacc is not supplied, but ctab is, then use the classifications from ctab. * Update docs a big. * Fix log message. * Reorganize workflow arguments to group related params together. * Get T2* re-running working. * Replace `.nii` in workflow with `.nii.gz`. * Fix args. * Add manacc test. * Fix t2s naming. * Add fit type back in. * Fix bad merge. * [REF] Add out_dir argument to filewriting functions (#500) * Add out_dir argument to gscontrol functions. * Add out_dir argument to io functions. * Remove unnecessary chdir call. * Fix removed files. * Fix outputs. * Fix io.filewrite. * Fix filewrite. * [FIX, DOC] Reorganize and improve documentation (#530) * Fix typos. * Miscellaneous doc cleanup. * Fix PCA/ICA links (closes #480). * Remove outdated output from table. * Move acquisition-related sections to one page. Also, move considerations into multi-echo page, move resources from considerations into new “resources” page, and move publications into new “acquisition” page. * Add info about quantitative T2* mapping (closes #464). * Add link to ME-fMRI sequences OSF project. * Address review. * Add @handwerkerd's recommendation for the protocols. * Add @handwerkerd's text about T2* mapping. * Fix links. * Add comment about copy. Using copy makes more sense here than re-implementing what I did in #498. * Darn so I forgot to save when I resolved the conflict. * Capping is already in the decay module. * Fix long line. * Draft check_mask function. * Fix mismatch between metrics and decision tree. Also calculate metrics in the actual workflow. And also documentation. * Fix style problem. * Add while loop escape parameter. * Reduce stalebot aggression. (#535) * [DOC] Add "is it maintained" badges (#536) * [FIX] Remove colons from log filename (#542) * Remove colons from log-file name. * Update integration test regex for finding log files. * [TST] Add tests for the workflow CLIs (#538) * Change rerun tests to use the CLI. * Add t2smap CLI test. * FIX * No but fix. * Address @rmarkello's review. * [ENH] Output and load T2* maps in seconds (#525) * Output and load in T2* maps in seconds. * Print info about T2* in seconds. * Add comments to trigger CI. * Maybe test t2smap arg. * Add sec2millisec and millisec2sec functions. * Apply @jbteves' suggestions from code review Add millisec2sec and sec2millisec to t2smap. Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Add functions to API doc page. * Fix bad import. * Fix mistake. Co-authored-by: Joshua Teves <jbtevespro@gmail.com> * [FIX,TST] Adds unit tests for ma_pca functions and fixes a bug in ma_pca (#549) * Adds unit tests for ma_pca functions and fixes a bug in ma_pca * Adds trivwin false check on test_check_order * Update tedana/tests/test_mapca.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> Co-authored-by: Taylor Salo <tsalo006@fiu.edu> * [FIX] Use mask, when provided, in t2smap workflow. (#545) * [DOC] Updates the TEDPCA section following changes in tedana v0.0.8 (#551) * Adds missing reference * Adds missing line break * Reduced the math-wizardry of the MA PCA description * Gives iid its full name * Update docs/approach.rst * [ENH] Control number of threads with threadpoolctl (#537) * Let's give threadpoolctl a try. * Group related imports together and sort by length like the artists we are. * Apparently I have to import things if I want to use them. * Switch to using argparse function for e5 integration test re-run. * Revert. * Apply suggestions from code review Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Partially address review. * Finish addressing review. * Update tedana/workflows/t2smap.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> Co-authored-by: Ross Markello <rossmarkello@gmail.com> * [DOC] Adds PCA documentation change that was missing (#554) * [DOC] Updates the TEDPCA section following changes in tedana v0.0.8 * Adds missing reference * Adds missing line break * Reduced the math-wizardry of the MA PCA description * Gives iid its full name * Update docs/approach.rst Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Update docs/approach.rst Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Assess PR review comments Co-authored-by: Taylor Salo <tsalo006@fiu.edu> * [FIX] Drop use of eimask (#555) This is a quick bug-fix, but we will ultimately probably incorporate the eimask into the initial adaptive masking at the beginning of the workflow. * [REF] Include daysUntilStale and daysUntilClose in stalebot message (#559) * [ENH] Only use good echoes for metric calculation/optimal combination (#358) * Only use good echoes for metric calculation and optimal combination. * Change variable name. * A bit more memory management. * Fix. * Fix tests. * Fix style. * Limit mask to adaptive_mask >= 3 * Fix make_adaptive_mask * Fix test. * Update outputs. * Remove old file. * Revert some variable name changes. * Revert some more. * Fix style issues with test. * Add constant when calculating betas. Removing this seemed to cause the breaking test in the last merge commit. * Drop extra components from outputs file. * Improve tedpca docstring. Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Improve description of adaptive mask. * Change empty to unstable. * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-authored-by: Elizabeth DuPre <emd222@cornell.edu> * [FIX] Use SNR for PAID instead of mean data (#560) * [REF] Update t2smap workflow for fMRIPrep compatibility (#557) * Add out-dir argument to t2smap workflow. Also move logging setup from _main into t2smap_workflow. * Change t2smap workflow output files. * I hate tests. * Oh my tests are the worst. * Fix the CLI test as well. * [FIX] Correct t2smap outputs (#562) * Fix BEP001-compatible output names. * Arbitrary change to allow PR. * [FIX] Fix t2smap optimal combination (#566) * Fix t2smap optcom Introduced when I changed make_optcom’s arg from mask to adaptive mask in #358. * Add t2smap integration test. * Update acquisition.rst to include information for Philips scanners (#579) * Update acquisition.rst Include description for Philips users * docs: add mjversluis as a contributor (#580) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * Empty Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * [DOC] multi-echo reports (#457) * Added html template for report * doc: initial commit of reporting template * doc: save out html for testing * fix: add missing bokeh js script * fix: unescape HTML ugly way * fix: add missing cdn's * enh: switch to generate_report structure * sty: switch back to pure CSS from bootstrap * fix: differently update template for content * sty: add jupyter notebooks to git ignore * enh:initial commit of dynamic plots * fix: patch unpaired bracket * enh:modularized dynamic kappa/rho plots * enh:docstrings added to KappaRho_DynPlot.py * Force figures default, fold viz into reporting module * enh:TS and Spectrum are now dynamic plots * sty: initial refactor of dynamic figures * fix: re-introduce func to load comp_table * sty: finalize rough refactor * fix: patch linting errors * doc: continue refactor * Advanced on dynamic_figures * Made the refactored code work * fix: new year, new approach * tmp: non-functioning reporting code * Fixes bug * Fixes bug * Added new function to generate html report and removed tempita calls * Added FFT and time series plots * Made template subsitute work and updated necessary bokeh version * Changes html title * remove time series, fft plots * fix: remove unescapes * fix: patch incorrect imports * fix: add missing bokeh import * fix: spelling mistake 🤦 * fix: reflect reorg in get_coeffs call * fix: correct expected test outputs * fix: don't designate file path when saving report * fix: combine generate, html report functions * fix: ignore missing columns in df.drop, to better handle multiple params * Dynamic figures are now two rows, static figure is on the right. Removed the cute dog link and made adding report.txt text to bottom of report automatic * Added new line after References in report.txt * Removes BeautifulSoup dependency in favor of an object tag and changes some CSS styles * enh: switch to grid layout, style About section, add links to navbar * doc: update no-png to no-reports * modifiation of setup.py to properly install all reporting directories * Use relative path for static figures on report * Add version check for bokeh figures Co-authored-by: smoia <s.moia@bcbl.eu> Co-authored-by: Javier Gonzalez-Castillo <javiergcas@gmail.com> Co-authored-by: eurunuela <enekouru@gmail.com> * Escape earlier. * Fix inescapable while loop. * Update outputs. * Log in CI. * Add smoke tests for metric functions. * A little cleanup. * Apply adaptive masking to metrics. * Work around get_coeffs idiosyncrasy. * Fix tests. * Ugh, fix. * Drop old metrics file. Co-authored-by: Taylor Salo <tsalo006@fiu.edu> Co-authored-by: Logan <logan.dowdle@gmail.com> Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu> Co-authored-by: Eneko Uruñuela <13706448+eurunuela@users.noreply.github.com> Co-authored-by: Joshua Teves <jbtevespro@gmail.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Ross Markello <rossmarkello@gmail.com> Co-authored-by: Cesar Caballero Gaudes <c.caballero@bcbl.eu> Co-authored-by: mjversluis <32125111+mjversluis@users.noreply.github.com> Co-authored-by: smoia <s.moia@bcbl.eu> Co-authored-by: Javier Gonzalez-Castillo <javiergcas@gmail.com> Co-authored-by: eurunuela <enekouru@gmail.com>
* [REF] Modularize metric calculation (#447) * Reorganize metrics. * Some more work on organizing metrics. * Add signal_minus_noise_z metric. * Variable name change. * Move comptable. * Move T2* cap into decay function. * Split up metric files. * Adjust cluster-extent thresholding to match across maps. * Partially address review. Lots of great refactoring by @rmarkello. * Make DICE broadcastable. * Clean up signal-noise metrics and fix compute_countnoise. * Simplify calculate_z_maps. * Fix dice (thanks @rmarkello) * Improve documentation. * Fix import. * Fix imports. * Get modularized metrics mostly working. * Fix bugs in metric calculations. All metrics should be calculated on *masked* data. Any metric maps should also be masked. * Revert changes to decision tree. * Finish reverting. * Fix viz. * Fix style issues * More??? * Fix bug in generate_metrics. * Add initial tests. * Improve docstrings, add shape checks, and reorder functions. * Fix assertions. * Fix style issue. * Add metric submodules to API docs. * Improve reporting for T_to_Z transform. * Fix bugs in new modularized dependence metrics. * Revert "[REF] Modularize metric calculation (#447)" (#474) This reverts commit 913cd4c. * [REF] Modularize metrics (#475) * Reorganize metrics. * Some more work on organizing metrics. * Add signal_minus_noise_z metric. * Variable name change. * edited gitignore after testing * Revert "edited gitignore after testing" This reverts commit 28098e1. * fix the +0 -0 absurdity and actually commit * silly underscore go away * style fix * I swear I can spell things. * Move comptable. * more style * Move T2* cap into decay function. * Split up metric files. * Adjust cluster-extent thresholding to match across maps. * Partially address review. Lots of great refactoring by @rmarkello. * Make DICE broadcastable. * Clean up signal-noise metrics and fix compute_countnoise. * Simplify calculate_z_maps. * Fix dice (thanks @rmarkello) * use index, doesn't have component * add the scree to the outputs * Improve documentation. * Fix import. * Fix imports. * Get modularized metrics mostly working. * Fix bugs in metric calculations. All metrics should be calculated on *masked* data. Any metric maps should also be masked. * Revert changes to decision tree. * Finish reverting. * Fix viz. * Fix style issues * More??? * Fix bug in generate_metrics. * Add initial tests. * Improve docstrings, add shape checks, and reorder functions. * Fix assertions. * Fix style issue. * Add metric submodules to API docs. * Improve reporting for T_to_Z transform. * Fix bugs in new modularized dependence metrics. * [MNT] Drop versioneer from requirements (#481) * MNT: Drop versioneer from requirements The versioneer package is not a requirement to use versioneer. * MNT: Add versioneer to a new "dev" extra * [ENH] Adds maPCA decomposition algorithm (#435) * Create fix/decomp branch * Started writing GIFT version in Pythonn as we found it selects a reasonable number of components * Advanced on new PCA computation * Solved NAN issues and added testing data * Solved est_indp_sp bug * PCA is SOLVED! Hooray! * PR request ready version of the PCA fix * fix: avoid circular imports * Bug fixes and started working on docstrings * [FIX] Clean up some variables in GIFT PCA (#453) * Added version argument (#415) * Added version argument * changed import of __version__ * [REF] No pytest_cache dir * [ENH] Dockerfile for dev testing * [DOC] Add docs for code testing to CONTRIBUTING * [REF] Docker org can't have hyphens Just use tedana/tedana-dev namespace * Changed default export in gzipped nifti (#416) * Changed default export in gzipped nifti * Updated extension of files in tests * [FIX] Update typo in .gitignore Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * [REF, DOC] Use logging to generate reports (#424) * Use logging for report/references generation. * Improve ContextFilter docstring. * Remove broken newlines. * Make the style good. * [ENH][TST] Overhauls CI completely (#418) * Adds integration and five echo skipping * Style fixes * Updates config for CircleCI * Attempts to fix YML * [TEST] Update Dockerfile to match new integr tests * [TEST] Fixes integration tests in Docker image * [FIX] Remove intermediate IO files * Resolves merge conflict, adds output check * Some fixes * [TEST] Updates dev_tool testing infra * [TEST] Fixes pytest integration path checking * [TEST] CircleCI uses Docker image to run tests * [FIX] Minor dev_tool issues for CircleCI * [TEST] Use variable for integration test filename * Attempts to fix CircleCI style check * Revert "Attempts to fix CircleCI style check" This reverts commit 769f4b7. * Attempt to fix tput call * Adds checkout to code in YML * [TEST] Integration tests run in parallel * [TEST] Separate data downloads from Docker build * [TEST] Update integration test data path * [TEST] CircleCI uses good Docker * [TEST] No version check in circleci * [TEST] Checkout for get_data / style check * Attempts to fix integration test inclusion * [TEST] Checkout for get_data / style check * [FIX] Fix circleci config hopefully * [FIX] No / workdir for circleci machine * [FIX] Use ~ for coverage in circleci * Switches integration tests to truncated length data * [FIX] Actually merge coverage files * [FIX] Coverage cache path circleci * [TEST] Integration test outputs in tests/data * [FIX] circleci config bug * [TEST] Major testing infra overhaul Docker image considerably slimmed down (only test python 3.6 locally), added new dev_requirements.txt to make conda yaml files obsolete, added Makefile to make testing easier locally (if you aren't using the Docker image), and removed integration test data downloads from separate script and into the integration tests themselves * [TEST] Massive CircleCI config regression @tsalo had it right --- moving towards a fully Dockerized implementation was not the way forward for a simple Python package. * [TEST] Better integration testing? At least, more equivalent to what was happening before, where we check that ONLY the expected output files are generated (no more, no less) * [FIX] CircleCI workflow issue * [MNT] No flake8-putty * [FLK] New flake8 error detected * [TEST] Run style check separately @leej3 said it's not fair to stop running tests for a few minor style errors, and he's usually right so.... * [TEST] Py37 for all non-unit test stuff * [WIP,TEST,DOC] Builds docs in CircleCI (#428) * [REF] Fix up dev vs non-dev requirements.txt * [TEST] Build docs in CircleCI Also modifies the building of the py37 environment a bit since it's shared between so many things * [REF] Change tab-delimited files from txt extension to tsv (#429) * Change comptables and log from txt to tsv. * Prevents shell expansion in API (#431) * enh: add stale-bot (#430) * edited gitignore after testing * Revert "edited gitignore after testing" This reverts commit 28098e1. * fixing typo and clarity * cleaning up approach introduction * more cleanup in approach * adding initial plot to pubs page * correcting plots * removing comment parts * getting live plots working on publication page * clean up and adding more WIP details * completing live TE plot from spreasheet * changing outputs to nii.gz * adding TR and Vox dim subplots * initial adding of output details * fixing tables * rearranging to considerations and recomendations * seperating out considerations section * technically spelling things correct * started fixing titles * addinf figures for what is ME page * title clarification * Add information about GE * adding mutliecho questions to the FAQ * initial adding to multiecho * multiecho page figures and explanations * pipeline and phsyics updated * typo * fix headings * possibly clean latex? * we have eight echoes * more details in approach * title change * adding software details * clean up of multiecho * additional considerations! * typo * update plots * due credit in faq * more details on multi echo, usage * tedana does accept BRIK/HEAD * someone wanted sentences seperated * life by a thousand little edits * GrAmMaRs * other software! * links to api in approach * white space? * [ENH] Make png default (#427) * Makes --png default, adds --nopng * Fixes integration test for --nopng * Adds correction to integration test outputs * Update docs/faq.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * MRI scanners != BBQ * Update docs/approach.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update docs/approach.rst Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Apply suggestions from code review, thanks a million Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * echo cleanup, and kundu 3 banish * noted png default * completely changed the QC section * pls wrk Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * docs: add jbteves as a contributor (#442) * docs: update README.md * docs: update .all-contributorsrc * docs: add eurunuela as a contributor (#441) * docs: update README.md * docs: update .all-contributorsrc * [ENH][TST] Feature/parallel integration (#437) * Adjusts makefile to include three-echo and five-echo, remove integration * Adjusts CircleCI config to do the same as makefile * Removes doc auto-building via CircleCI * [FIX] Adds check for just one component (#405) * Adds check for just one component * [ENH] Consolidate stats unit tests and fix linting errors in tests (#421) * Consolidates stats unit tests * Changes to simpler assert for stats errors * Oof linting Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Clean up some variables. * Fix output name. * Fix bugs and use TruncatedSVD in GIFT. * Normalization of data added * doc: fix linting errors * Second if statement in _checkOrder does not check for None values now, as these should never be given to the function. Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Style editing to gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Style editing to gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Removed silly comment inherited from MATLAB Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Removed print statement int gift_pca.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Commented TruncatedSVD as it does not provide the functionality we are looking for. Also, made some edits after the comments from Elizabeth * Removed unused import * Changed some of the print statements to make them more user friendly * Adds documentation * Fixes PCA memory madness * Fixes linter errors * Now accounting for imprecission in kurtosis calculation * Edited autocorr docstring * GIFT PCA doesn't use the var normalized now in order to get the same number of components as the original GIFT algorithm. This is something we should definitely discuss * Corrections to style * Changed test output expected * Removed GIFT notebook * Made MDL the default and added GIFT reference * Removed GIFT testing data * Changes as commented in PR review * Style fix * Changed variable names to make them more readble * Style fix * Style fix * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Changes suggested in PR review * More changes based on PR review suggestions * Changes to workflows/tedana.py based on PR review suggestions * Changes to decomposition/pca.py based on PR review suggestions * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Update tedana/decomposition/gift_pca.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * More review changes * Style fixes * Finished with PR review suggestinos * Update tedana/decomposition/gift.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Update tedana/decomposition/gift.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Renamed gift to ma_pca and added some math notes * Added more maths-related comments * Renamed ma_pca function * Added unit test for maPCA and fixed a typo in ma_pca.py * Added unit test for maPCA and fixed a typo in ma_pca.py * Added unit test for ent_rate_sp inside maPCA * Added test for constant input to ent_rate_sp * Documentation fix Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Documentation fix Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Removed if statements in ent_rate_sp as they were never going to be accessed in our case. Also addressed some PR review comments. * Style fix * Update tedana/decomposition/ma_pca.py Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Update tedana/decomposition/ma_pca.py Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Addresses documentation suggestions * [TST] Expands integration (#482) * Expands integration testing to include mapca and several of its options * [REF] Remove the sourceTEs option (#493) * [REF] Removes mle option (#495) * Removes mle option * [REF] Remove confusing variable copy (#498) * mmix -> mmix_new * Change variable name. * add new plot to all tests * removing to_numpy(), plt. to fig. * docs: add Islast as a contributor (#503) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * [DOC] Adds developer guideline start (#446) * Adds developer guideline start * Modifies CONTRIBUTING * Fixes dead link, removes project board * Adds more thorough developing guidelines * Fix lack of linting * Updates dev requirements * Adds flake8 instructions * Updates config with correct CI version * Adds manual selection of artifiacts through CircleCI UI * Adds tar command * Clarify some pytest stuff * Offer alternative to Gitter * Outlines steps for integration tests more clearly * Adds filenaming convention for outputs files * Ask not to rewrite history * Adds two reviewer rule Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * docs: add eurunuela as a contributor (#504) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * docs: add dowdlelt as a contributor (#505) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * [FIX] Make bi-sided clustering default (#331) * Change default thresholding to bi-sided. We should treat positively and negatively weighted voxels separately when performing cluster-extent thresholding. * Update license in zenodo * [TST] Expand parameters tested in integration tests (#502) * Add args to integration tests. * Fix import error. * Fix 5-echo test. * Move rerun into another directory. * Fix outputs. * Fix... * Dummy commit. * [FIX, TST] Fix the failing tests (#518) * Change requirements. * Change env checksums. * Improve documentation for debugging. * [DOC] Improve documentation of computefeats2 (#458) * adding more doc to computefeats2 * Added the default option add_const=False for user-friendliness * changes following PR review & linter check * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/stats.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-authored-by: Elizabeth DuPre <emd222@cornell.edu> * [TST] Remove testing directory from coverage tests (#496) * Remove testing directory from coverage tests * Removes some more tests * Removes setup.py from coverage ignore * Ignores info.py * [ENH, REF] Allow re-running without manacc and reorder args (#508) * Reorder tedana workflow arguments Broadly reorder them from early to late in the workflow, but also grouping related arguments together. Add a group for re-running the workflow. * Remove unnecessary check. Data is a list from the CLI and io.load_data will convert a string to list anyway. Plus io.load_data will raise an error if the file doesn’t exist. * Allow re-running workflow without manacc. I.e., if manacc is not supplied, but ctab is, then use the classifications from ctab. * Address @dowdlelt's review. * [ENH] Add t2smap argument for optional recalculated T2* map (#408) * Add t2smap argument Also, move rerunning-related arguments into their own subgroup and allow rerunning *without* manacc (i.e., if manacc is not supplied, but ctab is, then use the classifications from ctab. * Update docs a big. * Fix log message. * Reorganize workflow arguments to group related params together. * Get T2* re-running working. * Replace `.nii` in workflow with `.nii.gz`. * Fix args. * Add manacc test. * Fix t2s naming. * Add fit type back in. * Fix bad merge. * [REF] Add out_dir argument to filewriting functions (#500) * Add out_dir argument to gscontrol functions. * Add out_dir argument to io functions. * Remove unnecessary chdir call. * Fix removed files. * Fix outputs. * Fix io.filewrite. * Fix filewrite. * [FIX, DOC] Reorganize and improve documentation (#530) * Fix typos. * Miscellaneous doc cleanup. * Fix PCA/ICA links (closes #480). * Remove outdated output from table. * Move acquisition-related sections to one page. Also, move considerations into multi-echo page, move resources from considerations into new “resources” page, and move publications into new “acquisition” page. * Add info about quantitative T2* mapping (closes #464). * Add link to ME-fMRI sequences OSF project. * Address review. * Add @handwerkerd's recommendation for the protocols. * Add @handwerkerd's text about T2* mapping. * Fix links. * Add comment about copy. Using copy makes more sense here than re-implementing what I did in #498. * Darn so I forgot to save when I resolved the conflict. * Capping is already in the decay module. * Fix long line. * Draft check_mask function. * Fix mismatch between metrics and decision tree. Also calculate metrics in the actual workflow. And also documentation. * Fix style problem. * Add while loop escape parameter. * Reduce stalebot aggression. (#535) * [DOC] Add "is it maintained" badges (#536) * [FIX] Remove colons from log filename (#542) * Remove colons from log-file name. * Update integration test regex for finding log files. * [TST] Add tests for the workflow CLIs (#538) * Change rerun tests to use the CLI. * Add t2smap CLI test. * FIX * No but fix. * Address @rmarkello's review. * [ENH] Output and load T2* maps in seconds (#525) * Output and load in T2* maps in seconds. * Print info about T2* in seconds. * Add comments to trigger CI. * Maybe test t2smap arg. * Add sec2millisec and millisec2sec functions. * Apply @jbteves' suggestions from code review Add millisec2sec and sec2millisec to t2smap. Co-Authored-By: Joshua Teves <jbtevespro@gmail.com> * Add functions to API doc page. * Fix bad import. * Fix mistake. Co-authored-by: Joshua Teves <jbtevespro@gmail.com> * [FIX,TST] Adds unit tests for ma_pca functions and fixes a bug in ma_pca (#549) * Adds unit tests for ma_pca functions and fixes a bug in ma_pca * Adds trivwin false check on test_check_order * Update tedana/tests/test_mapca.py Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> Co-authored-by: Taylor Salo <tsalo006@fiu.edu> * [FIX] Use mask, when provided, in t2smap workflow. (#545) * [DOC] Updates the TEDPCA section following changes in tedana v0.0.8 (#551) * Adds missing reference * Adds missing line break * Reduced the math-wizardry of the MA PCA description * Gives iid its full name * Update docs/approach.rst * [ENH] Control number of threads with threadpoolctl (#537) * Let's give threadpoolctl a try. * Group related imports together and sort by length like the artists we are. * Apparently I have to import things if I want to use them. * Switch to using argparse function for e5 integration test re-run. * Revert. * Apply suggestions from code review Co-Authored-By: Ross Markello <rossmarkello@gmail.com> * Partially address review. * Finish addressing review. * Update tedana/workflows/t2smap.py Co-Authored-By: Ross Markello <rossmarkello@gmail.com> Co-authored-by: Ross Markello <rossmarkello@gmail.com> * [DOC] Adds PCA documentation change that was missing (#554) * [DOC] Updates the TEDPCA section following changes in tedana v0.0.8 * Adds missing reference * Adds missing line break * Reduced the math-wizardry of the MA PCA description * Gives iid its full name * Update docs/approach.rst Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Update docs/approach.rst Co-Authored-By: Taylor Salo <tsalo006@fiu.edu> * Assess PR review comments Co-authored-by: Taylor Salo <tsalo006@fiu.edu> * [FIX] Drop use of eimask (#555) This is a quick bug-fix, but we will ultimately probably incorporate the eimask into the initial adaptive masking at the beginning of the workflow. * [REF] Include daysUntilStale and daysUntilClose in stalebot message (#559) * [ENH] Only use good echoes for metric calculation/optimal combination (#358) * Only use good echoes for metric calculation and optimal combination. * Change variable name. * A bit more memory management. * Fix. * Fix tests. * Fix style. * Limit mask to adaptive_mask >= 3 * Fix make_adaptive_mask * Fix test. * Update outputs. * Remove old file. * Revert some variable name changes. * Revert some more. * Fix style issues with test. * Add constant when calculating betas. Removing this seemed to cause the breaking test in the last merge commit. * Drop extra components from outputs file. * Improve tedpca docstring. Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Improve description of adaptive mask. * Change empty to unstable. * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> * Update tedana/combine.py Co-Authored-By: Elizabeth DuPre <emd222@cornell.edu> Co-authored-by: Elizabeth DuPre <emd222@cornell.edu> * [FIX] Use SNR for PAID instead of mean data (#560) * [REF] Update t2smap workflow for fMRIPrep compatibility (#557) * Add out-dir argument to t2smap workflow. Also move logging setup from _main into t2smap_workflow. * Change t2smap workflow output files. * I hate tests. * Oh my tests are the worst. * Fix the CLI test as well. * [FIX] Correct t2smap outputs (#562) * Fix BEP001-compatible output names. * Arbitrary change to allow PR. * [FIX] Fix t2smap optimal combination (#566) * Fix t2smap optcom Introduced when I changed make_optcom’s arg from mask to adaptive mask in #358. * Add t2smap integration test. * Update acquisition.rst to include information for Philips scanners (#579) * Update acquisition.rst Include description for Philips users * docs: add mjversluis as a contributor (#580) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] * Empty Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * [DOC] multi-echo reports (#457) * Added html template for report * doc: initial commit of reporting template * doc: save out html for testing * fix: add missing bokeh js script * fix: unescape HTML ugly way * fix: add missing cdn's * enh: switch to generate_report structure * sty: switch back to pure CSS from bootstrap * fix: differently update template for content * sty: add jupyter notebooks to git ignore * enh:initial commit of dynamic plots * fix: patch unpaired bracket * enh:modularized dynamic kappa/rho plots * enh:docstrings added to KappaRho_DynPlot.py * Force figures default, fold viz into reporting module * enh:TS and Spectrum are now dynamic plots * sty: initial refactor of dynamic figures * fix: re-introduce func to load comp_table * sty: finalize rough refactor * fix: patch linting errors * doc: continue refactor * Advanced on dynamic_figures * Made the refactored code work * fix: new year, new approach * tmp: non-functioning reporting code * Fixes bug * Fixes bug * Added new function to generate html report and removed tempita calls * Added FFT and time series plots * Made template subsitute work and updated necessary bokeh version * Changes html title * remove time series, fft plots * fix: remove unescapes * fix: patch incorrect imports * fix: add missing bokeh import * fix: spelling mistake 🤦 * fix: reflect reorg in get_coeffs call * fix: correct expected test outputs * fix: don't designate file path when saving report * fix: combine generate, html report functions * fix: ignore missing columns in df.drop, to better handle multiple params * Dynamic figures are now two rows, static figure is on the right. Removed the cute dog link and made adding report.txt text to bottom of report automatic * Added new line after References in report.txt * Removes BeautifulSoup dependency in favor of an object tag and changes some CSS styles * enh: switch to grid layout, style About section, add links to navbar * doc: update no-png to no-reports * modifiation of setup.py to properly install all reporting directories * Use relative path for static figures on report * Add version check for bokeh figures Co-authored-by: smoia <s.moia@bcbl.eu> Co-authored-by: Javier Gonzalez-Castillo <javiergcas@gmail.com> Co-authored-by: eurunuela <enekouru@gmail.com> * Escape earlier. * Fix inescapable while loop. * Update outputs. * Log in CI. * Add smoke tests for metric functions. * A little cleanup. * Apply adaptive masking to metrics. * Work around get_coeffs idiosyncrasy. * Fix tests. * Ugh, fix. * Drop old metrics file. Co-authored-by: Taylor Salo <tsalo006@fiu.edu> Co-authored-by: Logan <logan.dowdle@gmail.com> Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu> Co-authored-by: Eneko Uruñuela <13706448+eurunuela@users.noreply.github.com> Co-authored-by: Joshua Teves <jbtevespro@gmail.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Ross Markello <rossmarkello@gmail.com> Co-authored-by: Cesar Caballero Gaudes <c.caballero@bcbl.eu> Co-authored-by: mjversluis <32125111+mjversluis@users.noreply.github.com> Co-authored-by: smoia <s.moia@bcbl.eu> Co-authored-by: Javier Gonzalez-Castillo <javiergcas@gmail.com> Co-authored-by: eurunuela <enekouru@gmail.com> * Use adaptive mask approach from #635. * Fix test. * Fix docstrings. * Clean up style. * Shape checks and more cleanup. * Coerce tes to array. * Clean up tests. * Ignore W503. We should *stop* ignoring W504. * Merge main in * Switch R2 -> T2 in filenames * Make RTD happy * Please, pretty please, RTD * Un-regresses changes to selection * Another attempt to placate capricious RTD deities * Enforce previous metric orders on comptable * Makes clustering less smart to align with main * Fix style * Align with Eneko changes * Reorder component table labels correctly Co-authored-by: Elizabeth DuPre <emd222@cornell.edu> Co-authored-by: Logan <logan.dowdle@gmail.com> Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu> Co-authored-by: Eneko Uruñuela <13706448+eurunuela@users.noreply.github.com> Co-authored-by: Joshua Teves <jbtevespro@gmail.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Ross Markello <rossmarkello@gmail.com> Co-authored-by: Cesar Caballero Gaudes <c.caballero@bcbl.eu> Co-authored-by: mjversluis <32125111+mjversluis@users.noreply.github.com> Co-authored-by: smoia <s.moia@bcbl.eu> Co-authored-by: Javier Gonzalez-Castillo <javiergcas@gmail.com> Co-authored-by: eurunuela <enekouru@gmail.com> Co-authored-by: Joshua Teves <joshua.teves@nih.gov>
Closes # .
Changes proposed in this pull request: