dispersiveXanes/make_little_data.py

17 lines
289 B
Python
Raw Permalink Normal View History

2016-05-12 15:02:42 +02:00
import os
import numpy as np
import xppll37_mc
import sys
def do(run,N):
r = xppll37_mc.readDataset(run)
o1 = r.opal0[:N]
o2 = r.opal1[:N]
np.savez("littleData/run%04d.npz" % run, opal0 = o1, opal1 = o2 )
if __name__ == "__main__":
run = int(sys.argv[1])
N=100
do(run,N)