示例#1
0
def read_xvgs_all(filelist):
    out_list = []
    for i in range(len(filelist)):
        block = np.array(gs.load_xydy(filelist[i]))
        print("  ...file read, shape: %s" % str(block.shape), file=sys.stderr)
        out_list.append(block)
    return out_list
示例#2
0
def load_input_file(infn, min=np.nan, max=np.nan):
    x, y, dy = gs.load_xydy(infn)
    if np.isnan(min):
        if np.isnan(max):
            return np.array(x), np.array(y), np.array(dy)
        else:
            ind = np.where(x < max)[0]
    elif np.isnan(max):
        ind = np.where(x > min)[0]
    else:
        ind = np.where(np.logical_and(x > min, x < max))[0]
    return np.array(x[ind]), np.array(y[ind]), np.array(dy[ind])
def load_input_file(infn):
    x, y, dy = gs.load_xydy(infn)
    return np.array(x), np.array(y), np.array(dy)
示例#4
0
def read_xvgs_all(filelist):
    out_list = []
    for i in range(len(filelist)):
        block = np.array(gs.load_xydy(filelist[i]))
        out_list.append(block)
    return out_list
示例#5
0
                    help='Assume there is an error column in the input file, and then compute the result with errors.')
parser.add_argument('--qmin',type=float,default=0.0)
parser.add_argument('--qmax',type=float,default=3.0)
parser.add_argument('--qpts',type=float,default=151)

args = parser.parse_args()

if args.xmin == -np.inf and args.xmax == np.inf:
    bPrune=False
else:
    bPrune=True

x=None ; y=None ; dy=None
x2=None ; y2=None ; dy2=None
if args.bError:
    x,y,dy = gs.load_xydy(args.ifile)
    if bPrune:
        [x,y,dy] = prune_data(args.xmin, args.xmax, x, [y,dy] )
    if not args.ifile2 is None:
        x2,y2,dy2 = gs.load_xydy(args.ifile2)
        if bPrune:
            [x2,y2,dy2] = prune_data(args.xmin, args.xmax, x2, [y2,dy2] )
else:
    x, y = gs.load_xy(args.ifile)
    if bPrune:
        [x,y] = prune_data(args.xmin, args.xmax, x, [y] )
    if not args.ifile2 is None:
        x2, y2 = gs.load_xy(args.ifile2)
        if bPrune:
            [x2,y2] = prune_data(args.xmin, args.xmax, x2, [y2] )
示例#6
0
)
parser.add_argument(
    '--fit_Guinier',
    action='store_true',
    dest='bFitGuinier',
    help=
    'Search for improved buffer subtraction by demanding that the Guinier-fit be optimised. '
    'The parameter -f2 will be rescaled, along with the Rg of the molecule'
    'This ideally removes inflections at zero-angle.')

args = parser.parse_args()

f1 = args.scale1
f2 = args.scale2
f3 = args.scale3
sx, sy, sdy = gs.load_xydy(args.sfile)
sx = np.array(sx)
sy = np.array(sy)
sdy = np.array(sdy)
#bx1, by1, bdy1 = gs.load_xydy(args.bfile1)
#bx2, by2, bdy2 = gs.load_xydy(args.bfile2)
#load all buffer files.

if args.addfile != '' and args.addfact != 0:
    bMod = True
    ax, ay, ady = gs.load_xydy(args.addfile)
    if ax[0] != sx[0]:
        print(
            "= = = ERROR: The first X-value between sample and additonal-correction curves are NOT the same! Aborting."
        )
        sys.exit()