def generate_spline_array(data, y_parameter="<STR_LIT>", smoothing=<NUM_LIT>, degree=<NUM_LIT:5>, presmoothing=<NUM_LIT:0>, coarsen=<NUM_LIT:0>, autosave=True, show_derivative=<NUM_LIT:1>, text="<STR_LIT>", simple=<NUM_LIT:0>):
<EOL>s = spline_array()<EOL>s.ylabel = y_parameter<EOL>paths = _s.DialogMultipleFiles('<STR_LIT>', text=text, default_directory=data.directory)<EOL>if paths == []: return<EOL>for n in range(<NUM_LIT:0>,len(paths)):<EOL><INDENT>print("<STR_LIT>"+str(n+<NUM_LIT:1>)+"<STR_LIT:/>"+str(len(paths)+<NUM_LIT:1>))<EOL>data.get_data(paths[n])<EOL>print("<STR_LIT>"+str(data.constants[y_parameter]))<EOL>if simple:<EOL><INDENT>x_spline = spline_single(data.xdata, data.ydata, plot=True, xlabel=data.xlabel, ylabel=data.ylabel, xmin="<STR_LIT>", xmax="<STR_LIT>", simple=<NUM_LIT:1>)<EOL>a = input("<STR_LIT>")<EOL>if a in ["<STR_LIT>", "<STR_LIT:q>"]: return s<EOL>if a in ["<STR_LIT:y>", "<STR_LIT:yes>", "<STR_LIT:\n>"]: s.add_x_spline(data.constants[y_parameter], x_spline)<EOL><DEDENT>else:<EOL><INDENT>data.plot(coarsen=coarsen)<EOL>x_spline = splot("<STR_LIT>", smoothing, degree, presmoothing, interactive=True, show_derivative=show_derivative, simple=simple)<EOL>if x_spline.message == "<STR_LIT>": return s<EOL>if x_spline.message == "<STR_LIT>": s.add_x_spline(data.constants[y_parameter], x_spline)<EOL><DEDENT>s.xlabel = x_spline.xlabel<EOL>s.zlabel = x_spline.ylabel<EOL>presmoothing = x_spline.presmoothing<EOL>smoothing    = x_spline.smoothing<EOL>degree       = x_spline.degree<EOL><DEDENT>print("<STR_LIT>"+str(len(paths))+"<STR_LIT>"+str(len(s.x_splines))+"<STR_LIT>")<EOL>s.simple = simple<EOL>if autosave: _s.save_object(s)<EOL>return s<EOL>
Asks for a bunch of data files, plots and spline-fits the data (verifying at each step),
and generates a spline_2d object instance filled with the results.