Skip to content

ENH: support alternative header field name variants in .PAR files #507

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

Merged
merged 3 commits into from
Feb 26, 2017

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jan 25, 2017

This is a workaround for the alternative header naming variants observed in #505.

I modified one of the existing .PAR files. I just truncated it and changed 4 header lines to have the entries from the .PAR file in #505. We can swap the file out for that other actual .par file prior to merging if the license terms permit.

Copy link
Member

@matthew-brett matthew-brett 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 looking at this.

@@ -206,6 +206,14 @@
'Max. number of gradient orients': ('max_gradient_orient', int),
# Line below added for par / rec version > 4.1
'Number of label types <0=no ASL>': ('nr_label_types', int),

Copy link
Member

Choose a reason for hiding this comment

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

Vague preferernce for removing blank line here, comments do enough of a job of spacing.


# The following are duplicates of the above fields, but with slightly
# different abbreviation, spelling, or capatilization. Both variants have
# been observed in the wild in V4.2 PAR files.
Copy link
Member

Choose a reason for hiding this comment

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

Add link to issue?

@@ -0,0 +1,101 @@
# === DATA DESCRIPTION FILE ======================================================
Copy link
Member

Choose a reason for hiding this comment

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

Do we have permission to distribute this file? Add to COPYING file if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a copy of one of the existing "phantom_XXX.PAR" files from the data folder where I just changed the 4 lines in the header, so there shouldn't be an issue. If we get clearance to use the file from #505, I can substitute it in here instead.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 96.009% when pulling b5d6b31 on grlee77:parrec_keys into b8017c9 on nipy:master.

@codecov-io
Copy link

codecov-io commented Jan 26, 2017

Current coverage is 94.03% (diff: 100%)

Merging #507 into master will increase coverage by <.01%

@@             master       #507   diff @@
==========================================
  Files           166        166          
  Lines         21992      22000     +8   
  Methods           0          0          
  Messages          0          0          
  Branches       2343       2343          
==========================================
+ Hits          20679      20687     +8   
  Misses          878        878          
  Partials        435        435          

Powered by Codecov. Last update b8017c9...47a8d6a

@grlee77
Copy link
Contributor Author

grlee77 commented Jan 26, 2017

made the suggested changes. haven't determined why there was one test failure for each Appveyor run last time around. There were several other warnings there as well.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 96.009% when pulling 2c0555a on grlee77:parrec_keys into b8017c9 on nipy:master.

@grlee77
Copy link
Contributor Author

grlee77 commented Jan 26, 2017

The Windows test failure is real and is because I truncated the PAR file too much so that the data doesn't match the number of slices in the header. It only passes on Linux/OSX because there apparently the *.PAR search is case sensitive and doesn't find the new ".par" file.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 96.009% when pulling 47a8d6a on grlee77:parrec_keys into b8017c9 on nipy:master.

@matthew-brett
Copy link
Member

Sorry for the delay - looks good -merging.

@matthew-brett matthew-brett merged commit 9b23a32 into nipy:master Feb 26, 2017
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