import redis
import jsonArray
#import threading
import neonIO
import time
#import sys
import numpy as np
from numpy import *
#from mantid.simpleapi import *
#from matplotlib import mpl
import time
import json

if __name__ == '__main__':
    # ======Try to connect NEON server
    ip="10.1.53.240"
    port=9000
   
    r=redis.Redis(host=ip, port=port, db=0)
    
    p1="/MR/workspace/MantidData/modlue01/xy_image/x"
    p2="/MR/workspace/MantidData/modlue01/xy_image/value"
    
    _json2=r.get(p2)
    _json1=r.get(p1)
    _array22=jsonArray.jsonDecoder(_json1)
    _array33=jsonArray.jsonDecoder(_json2)
    print np.array(_array22), "Qx"
    print np.array(_array33), "counts"
    print type(_array22)
