# Instructions for response function

**URL:** <https://community.mrtrix.org/t/instructions-for-response-function/269>\
**Category:** Uncategorized\
**Created:** [May 30, 2016, 1:57pm UTC](https://community.mrtrix.org/t/instructions-for-response-function/269 "2016-05-30T13:57:01Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Post date:** [June 3, 2016, 4:04pm UTC](https://community.mrtrix.org/t/instructions-for-response-function/269/21 "2016-06-03T16:04:03Z")

</div>

> [@wombat1](#):
>
> a couple of posts above I showed another brain, and there were issues with x and y directions then. Here theres problem with Z.

That’s actually really hard to say, you were using the old viewer with no indication of the projection you were using. All I could say is that the results were essentially the same in terms of orientation. For all I know, the problem might have been exactly the same.

> [@wombat1](#):
>
> when you mean theres problem with conversion tool, is there a problem with the dwi image or the grad encoding terminal file i was given.

Just the grad encoding file.

> [@wombat1](#):
>
> Also how do you spot it

Use the force.

Kidding aside, it does take a bit of experience. But it’s basically geometry, you have to imagine what directions the fibres might be running in if you were to invert the X or the Y or Z component, etc. and see if that would be a better fit to what you expect to see given the anatomy…

> [@wombat1](#):
>
> How do i modify the gradient file (e.g invert the z components).

Probably easiest in Matlab, or you could write a python script, or you could use `awk` if you’re a command-line die-hard like I am:

```
$ cat encoding.b | awk '{ print $1, $2, -$3, $4; }'

```

> [@wombat1](#):
>
> Lastly if I ignore your advice (as in if i find it too hard to implement) can I still get some proper analysis done on my pictures without doing anything to the image processing steps.

Not sure about ‘proper’ - but your ADC, FA, RD & AD values should be unaffected. But in general, it’s really important to get this right, it will come back to bite you eventually…

---

_[View the full topic](https://community.mrtrix.org/t/instructions-for-response-function/269)._
