
from numpy import *
from scipy import *
from scipy.interpolate import interp1d
from scipy.interpolate import pchip
import sys
import os
import argparse
import json

a = flipud(loadtxt(sys.argv[1]));
b = flipud(loadtxt(sys.argv[2]));

for m in range(0,4):
    ya = a[:,3+m]
    yb = b[:,3+m]
    ra = a[:,2]*8./a[:,1]
    rb = b[:,2]*8./b[:,1]
    a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
    b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
    print(exp(b_rate - a_rate) - 1)


from numpy import *
from scipy import *
from scipy.interpolate import interp1d
from scipy.interpolate import pchip
import sys
import os
import argparse
import json

a = flipud(loadtxt(sys.argv[1]));
b = flipud(loadtxt(sys.argv[2]));

for m in range(0,11):
    try:
        ya = a[:,3+m]
        yb = b[:,3+m]
        ra = a[:,2]*8./a[:,1]
        rb = b[:,2]*8./b[:,1]
        a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
        b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
        print(exp(b_rate - a_rate) - 1)
    except IndexError:
        print('NaN')

Support all metrics for points.
Support all metrics for points.

  
  from numpy import *
  from scipy import *
  from scipy.interpolate import interp1d
  from scipy.interpolate import pchip
  import sys
  import os
  import argparse
  import json
  
  a = flipud(loadtxt(sys.argv[1]));
  b = flipud(loadtxt(sys.argv[2]));
  
- for m in range(0,4):
+ for m in range(0,11):
+     try:
-     ya = a[:,3+m]
+         ya = a[:,3+m]
-     yb = b[:,3+m]
+         yb = b[:,3+m]
-     ra = a[:,2]*8./a[:,1]
+         ra = a[:,2]*8./a[:,1]
-     rb = b[:,2]*8./b[:,1]
+         rb = b[:,2]*8./b[:,1]
-     a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
+         a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
-     b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
+         b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
-     print(exp(b_rate - a_rate) - 1)
+         print(exp(b_rate - a_rate) - 1)
+     except IndexError:
+         print('NaN')
  
Support all metrics for points.
## Code Before:

from numpy import *
from scipy import *
from scipy.interpolate import interp1d
from scipy.interpolate import pchip
import sys
import os
import argparse
import json

a = flipud(loadtxt(sys.argv[1]));
b = flipud(loadtxt(sys.argv[2]));

for m in range(0,4):
    ya = a[:,3+m]
    yb = b[:,3+m]
    ra = a[:,2]*8./a[:,1]
    rb = b[:,2]*8./b[:,1]
    a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
    b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
    print(exp(b_rate - a_rate) - 1)

## Instruction:
Support all metrics for points.
## Code After:

from numpy import *
from scipy import *
from scipy.interpolate import interp1d
from scipy.interpolate import pchip
import sys
import os
import argparse
import json

a = flipud(loadtxt(sys.argv[1]));
b = flipud(loadtxt(sys.argv[2]));

for m in range(0,11):
    try:
        ya = a[:,3+m]
        yb = b[:,3+m]
        ra = a[:,2]*8./a[:,1]
        rb = b[:,2]*8./b[:,1]
        a_rate = pchip(ya, log(ra))(float(sys.argv[3]))
        b_rate = pchip(yb, log(rb))(float(sys.argv[3]))
        print(exp(b_rate - a_rate) - 1)
    except IndexError:
        print('NaN')
