[Neuroimaging] PAR/REC scaling in nibabel

Mike Jarrett mike.jarrett at ubc.ca
Fri Aug 18 18:39:26 EDT 2017


Thanks Gregory, that's really helpful.

On Fri, Aug 18, 2017 at 2:30 PM Gregory Lee <grlee77 at gmail.com> wrote:

> Hi Mike,
>
> Yes, the default is 'dv'.  The documentation could be updated to make this
> clearer.
>
> p.s.
> Depending on the data you have, one other thing to watch out for is the
> strict_sort flag.  I recommend always setting strict_sort=True, but it is
> False by default for reasons of backwards compatibility.  It won't matter
> for simple 3D structural scans or standard fMRI timeseries data, but for
> anything with additional dimensions (such as echoes, ASL tagging labels,
> etc) it prevents things from potentially getting mis-sorted.  It doesn't
> hurt to always have it on by default.
>
>
>
> On Fri, Aug 18, 2017 at 1:18 AM, Mike Jarrett <mike.jarrett at ubc.ca> wrote:
>
>> Hello experts!
>>
>> After some trial and error, I've discovered that (at least in the cases
>> I've checked), the default action of nib.parrec.load('file.PAR') is to
>> scale the rec image to "display values".
>>
>> In other words,
>> > nib.parrec.load('file.PAR').get_data()
>> returns the same values as
>> > nib.parrec.load('file.PAR',scaling='dv').get_data()
>>
>> Is this the intended behaviour? The docs don't seem to explicitly say
>> that scaling='dv' is the default, only that setting the scaling value is
>> optional. I had naively expected that not setting a preferred scaling would
>> return the raw unscaled values.
>>
>> Could anyone shed light on this for me? I now know I can just set
>> scaling='fp' to get floating point values, but it would put my mind at ease
>> if someone could confirm that I'm looking at this correctly.
>>
>> Thanks!
>>
>> Mike Jarrett
>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
>>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20170818/431e4d9a/attachment.html>


More information about the Neuroimaging mailing list