def read_sample(myfilestr="MAY06001.SA3_CM_D545", file_obj=None): """Reads in a raw SANS datafile and returns a SansData """ detdata, meta = data.readNCNRData( myfilestr, file_obj=file_obj) #note that it should be None for the default return SansData(data=detdata, metadata=meta)
def run_update(inst=None): imgname = inst+"_livedata.png" htmlname = inst+"_livedata.html" datafile = inst[:3]+"Current/live001.sa3_ice_a001" localfile = getLiveData(datafile) detdata,metadata = data.readNCNRData(localfile) generateDataImage(detdata,metadata,WORKDIR+imgname) createLiveHTML(metadata,imgname,WORKDIR+htmlname) putLiveData(imgname,htmlname,rawdata=localfile)
import numpy as N from matplotlib import pyplot as plt from data import readNCNRData from data import readNCNRSensitivity from uncertainty import Measurement from ReductionCode import convertMonitor if __name__ == '__main__': data,metadata = readNCNRData("MAY06001.SA3_CM_D545") newdata = convertMonitor(data,metadata) print newdata plt.figure() plt.imshow(newdata) plt.show()
import numpy as N from matplotlib import pyplot as plt from data import readNCNRData from data import readNCNRSensitivity from uncertainty import Measurement from ReductionCode import convertMonitor if __name__ == '__main__': data, metadata = readNCNRData("MAY06001.SA3_CM_D545") newdata = convertMonitor(data, metadata) print newdata plt.figure() plt.imshow(newdata) plt.show()
def read_sample(myfilestr="MAY06001.SA3_CM_D545"): """Reads in a raw SANS datafile and returns a SansData """ detdata, meta = data.readNCNRData(myfilestr) # note that it should be None for the default return SansData(data=detdata, metadata=meta)