@@ -0,0 +1,1058 @@
+import logging, argparse, os, re%0Aimport numpy as np%0Afrom .utils import getWorkDirs, checkSymLink%0Afrom .gp_rdiff import getUArray, getEdges, getCocktailSum, enumzipEdges%0Afrom decimal import Decimal%0A%0Aranges = %5B0.3, 0.7%5D%0A%0Adef gp_rapp():%0A  inDir, outDir = getWorkDirs()%0A  eRanges = np.array(%5BDecimal(str(e)) for e in ranges%5D)%0A  for infile in os.listdir(inDir):%0A    energy = re.compile('%5Cd+').search(infile).group()%0A    medium = np.loadtxt(open(os.path.join(inDir, infile), 'rb'))%0A    uMedium = getUArray(medium)%0A    eMedium = getEdges(medium)%0A    for i, (e0, e1) in enumzipEdges(eRanges):%0A      uSum = getCocktailSum(e0, e1, eMedium, uMedium)%0A      logging.debug('%25s%3E %25g - %25g: %25r' %25 (energy, e0, e1, uSum))%0A  return 'done'%0A%0Aif __name__ == '__main__':%0A  checkSymLink()%0A  parser = argparse.ArgumentParser()%0A  parser.add_argument(%22--log%22, help=%22show log output%22, action=%22store_true%22)%0A  args = parser.parse_args()%0A  loglevel = 'DEBUG' if args.log else 'WARNING'%0A  logging.basicConfig(%0A    format='%25(message)s', level=getattr(logging, loglevel)%0A  )%0A  print gp_rapp()%0A

add gp_rapp