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

FIX: Restore report generation #88

Merged
merged 9 commits into from
Dec 19, 2018
Merged

Conversation

effigies
Copy link
Collaborator

@effigies effigies commented Dec 18, 2018

This PR has as its goal restoring report generation, and any stylistic/UX fixes that seem appropriate as I work toward that goal.

Currently reports are based on the presence of contrast matrix plots, which were removed in #84, so no reports are generated. Additional concerns:

  • Design matrices produced with columns in alphabetical order - change to spec['Model']['X'] order.
  • Restore design matrix correlation plots

(l1_metadata, model, [('out', 'stat_metadata')]),
(model, collate, [('contrast_metadata', 'contrast_metadata')]),
(stage, model, [('contrast_maps', 'stat_files'),
('contrast_metadata', 'stat_metadata')]),
Copy link
Collaborator Author

@effigies effigies Dec 19, 2018

Choose a reason for hiding this comment

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

@adelavega I'm honestly not sure how l1_metadata worked at the third level, here. It was always supposed to be this simple, and being able to drop the l1_metadata tag (thanks to bids-standard/pybids#319) allows us to do that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm. yeah that makes way more sense to me... I'll try it out

names = [col for col in dense.columns
if col.startswith('non_steady_state') or
col in step.model['x']]
names = step.model['x'].copy()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This gets the wrong list of names. This includes all dense and sparse columns, so dense[names] fails.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What was wrong with the previous approach? It basically was all dense columns that were in the model + non_steady_state columns

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Columns came out alphabetized,destroying logical groupings, such as EVs first.

Can update to filter through dense.columns first.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What logical groupings? You mean order that you put into the model yourself? I'm fine with trying to preserve the order in any case, just confusing what you're referring to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, just preserving the model writer's specification. I suspect most people will group related variables together and variables of interest first, so that's all I meant by logical groupings.

fitlins/interfaces/bids.py Outdated Show resolved Hide resolved
@effigies
Copy link
Collaborator Author

@adelavega If this works for you, I'll merge. 2+ level reports still aren't ready, as I'll need to figure out another way to reconstruct the contrast matrix for those, but won't get to that before tomorrow.

Copy link
Collaborator

@adelavega adelavega left a comment

Choose a reason for hiding this comment

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

Go for it!

@effigies effigies merged commit f1d9a84 into poldracklab:master Dec 19, 2018
@effigies effigies deleted the fix/reports branch December 19, 2018 18:43
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.

2 participants