Thank you for your reply Søren and I will have a look at the that.

Recently, I have been tinkering with the final2.py file specifically in the section:

```
# Scale the bell function coeff sum to match the measured cell coeff
#*******************************************************************
for i in range(len(CoeffMat)):
if CoeffSumVec[i] == 0:
ScaleFactor = 0
else:
ScaleFactor = CellCoeffFunction(timestep)[i] / CoeffSumVec[i]
for j in range(len(CoeffMat[0])):
CoeffMat[i][j] = CoeffMat[i][j] * ScaleFactor
```

I have changed this section to:

```
# Scale the bell function coeff sum to match the measured cell coeff
#*******************************************************************
for i in range(len(CoeffMat)):
if CoeffSumVec[i] == 0:
ScaleFactor = 0
else:
#ScaleFactor = CellCoeffFunction(timestep)[i] / CoeffSumVec[i]
ScaleFactor = 0.0344
for j in range(len(CoeffMat[0])):
CoeffMat[i][j] = CoeffMat[i][j] * ScaleFactor
```

The inverse dynamics sequence runs further as a I reduce the 0.0344 to 0.001, but the resultant forces from the pressure nodes do not look to be delivering the appropriate force per timestep.

When I run the original piece of python script the error returns:

```
Python error : ValueError: A value in x_new is below the interpolation range.
File "D:\Documents\Anyscripts\AMMR.v1.6.2-MyDemo - GMScaling\Application\Beta\MoCap-GMFoot\Model\Final2.py", line 181, in PressureFunction
ScaleFactor = CellCoeffFunction(timestep)[i] / CoeffSumVec[i]
File "C:\Program Files\Anaconda3\envs\py27_foot\Lib\site-packages\scipy\interpolate\interpolate.py", line 477, in _evaluate
out_of_bounds = self._check_bounds(x_new)
```

Would it be possible for you or a python expert at AnyBody to help explain how the final2.py script interacts with the AMS.

My pressuredata.txt is is in a similar format as the repository model with the exception the frame every 10ms (repo model is 2ms) the pressure.txt inputs are:

Rectangle bottom

12

Rectangle left

18

Rectangle width

25

Rectangle height

54

and the Environment.any footlocation4.py reads:

```
AnyFolder &GlobalRef = .GlobalRef;
GlobalRef = {
AnyRefNode StrikeFootRef = {
sRel = {..FootLocationCooVec[0] -0.35, ..FootLocationCooVec[1] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={1,0,0};};
};
AnyRefNode PosteriorFootRef = {
sRel = {..FootLocationCooVec[2 ]-0.35, ..FootLocationCooVec[3] -0.56, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={0,1,0};};
};
AnyRefNode AnteriorMedialFootRef = {
sRel = {..FootLocationCooVec[4] -0.35, ..FootLocationCooVec[5] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={0,0,1};};
};
AnyRefNode AnteriorLateralFootRef = {
sRel = {..FootLocationCooVec[6] -0.35, ..FootLocationCooVec[7] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={1,1,0};};
};
AnyRefNode DistalFootRef = {
sRel = {..FootLocationCooVec[8] -0.35, ..FootLocationCooVec[9] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={0,0,0};};
};
AnyRefNode DistalPhal1Ref = {
sRel = {..FootLocationCooVec[10] -0.35, ..FootLocationCooVec[11] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={0,0,0};};
};
AnyRefNode DistalPhal2Ref = {
sRel = {..FootLocationCooVec[12] -0.35, ..FootLocationCooVec[13] -0.52, 0}*RotMat(-pi,y)*RotMat(-pi,x);
AnyDrawNode Draw = {ScaleXYZ=0.005*{1,1,1}; RGB={0,0,0};};
};
};
```

Also, Is it possible to print the matrix on the AnyBody GUI?

Kind Regards,

Zach