def files(xscript=0, yscript=1, eyscript=None, exscript=None, plotter=xy_databoxes, paths='ask', **kwargs): """ This will load a bunch of data files, generate data based on the supplied scripts, and then plot this data using the specified databox plotter. xscript, yscript, eyscript, exscript scripts to generate x, y, and errors **kwargs are sent to plotter() """ if kwargs.has_key('delimiter'): delimiter = kwargs.pop('delimiter') else: delimiter = None if kwargs.has_key('filters'): filters = kwargs.pop('filters') else: filters = '*.*' ds = _data.load_multiple(paths=paths, delimiter=delimiter, filters=filters) if ds == None or len(ds) == 0: return # generate a default title (the directory) if not kwargs.has_key('title'): kwargs['title'] = _os.path.split(ds[0].path)[0] # run the databox plotter plotter(ds, xscript=xscript, yscript=yscript, eyscript=eyscript, exscript=exscript, **kwargs)
def complex_files(script='d[1]+1j*d[2]', escript=None, **kwargs): """ Loads files and plots complex data in the real-imaginary plane. Parameters ---------- script='d[1]+1j*d[2]' Complex-valued script for data array. escript=None Complex-valued script for error bars See spinmob.plot.complex.data() for additional optional keyword arguments. See spinmob.data.databox.execute_script() for more information about scripts. Common additional parameters ---------------------------- filters="*.*" Set the file filters for the dialog. """ ds = _data.load_multiple() if len(ds) == 0: return if 'title' not in kwargs: kwargs['title'] = _os.path.split(ds[0].path)[0] return complex_databoxes(ds, script=script, **kwargs)
def files(xscript=0, yscript=1, eyscript=None, exscript=None, plotter=xy_databoxes, paths='ask', **kwargs): """ This will load a bunch of data files, generate data based on the supplied scripts, and then plot this data using the specified databox plotter. xscript, yscript, eyscript, exscript scripts to generate x, y, and errors optional: filters="*.*" to set the file filters for the dialog. **kwargs are sent to plotter() """ if kwargs.has_key('delimiter'): delimiter = kwargs.pop('delimiter') else: delimiter = None if kwargs.has_key('filters'): filters = kwargs.pop('filters') else: filters = '*.*' ds = _data.load_multiple(paths=paths, delimiter=delimiter, filters=filters) if ds is None or len(ds) == 0: return # generate a default title (the directory) if not kwargs.has_key('title'): kwargs['title']=_os.path.split(ds[0].path)[0] # run the databox plotter plotter(ds, xscript=xscript, yscript=yscript, eyscript=eyscript, exscript=exscript, **kwargs) return ds
def complex_files(script='d[1]+1j*d[2]', escript=None, paths=None, **kwargs): """ Loads files and plots complex data in the real-imaginary plane. Parameters ---------- script='d[1]+1j*d[2]' Complex-valued script for data array. escript=None Complex-valued script for error bars paths=None List of paths to open. None means use a dialog See spinmob.plot.complex.data() for additional optional keyword arguments. See spinmob.data.databox.execute_script() for more information about scripts. Common additional parameters ---------------------------- filters="*.*" Set the file filters for the dialog. """ ds = _data.load_multiple(paths=paths) if len(ds) == 0: return if 'title' not in kwargs: kwargs['title'] = _os.path.split(ds[0].path)[0] return complex_databoxes(ds, script=script, **kwargs)
def files(xscript=0, yscript=1, eyscript=None, exscript=None, g=None, plotter=xy_databoxes, paths=None, **kwargs): """ This will load a bunch of data files, generate data based on the supplied scripts, and then plot this data using the specified databox plotter. xscript, yscript, eyscript, exscript scripts to generate x, y, and errors g optional dictionary of globals optional: filters="*.*" to set the file filters for the dialog. **kwargs are sent to plotter() """ if 'delimiter' in kwargs: delimiter = kwargs.pop('delimiter') else: delimiter = None if 'filters' in kwargs: filters = kwargs.pop('filters') else: filters = '*.*' ds = _data.load_multiple(paths=paths, delimiter=delimiter, filters=filters) if ds is None or len(ds) == 0: return # generate a default title (the directory) if 'title' not in kwargs: kwargs['title']=_os.path.split(ds[0].path)[0] # run the databox plotter plotter(ds, xscript=xscript, yscript=yscript, eyscript=eyscript, exscript=exscript, g=g, **kwargs) return ds
def complex_files(script='c(1)+1j*c(2)', **kwargs): """ Loads and plots complex data in the real-imaginary plane. **kwargs are sent to spinmob.plot.complex.databoxes() """ ds = _data.load_multiple() if len(ds) == 0: return if not kwargs.has_key('title'): kwargs['title'] = _os.path.split(ds[0].path)[0] complex_databoxes(ds, script=script, **kwargs)
def complex_files(script='c(1)+1j*c(2)', **kwargs): """ Loads and plots complex data in the real-imaginary plane. optional argument: filters="*.*" can be changed to filter the files in the file dialog **kwargs are sent to spinmob.plot.complex.databoxes() """ ds = _data.load_multiple() if len(ds) == 0: return if not kwargs.has_key('title'): kwargs['title'] = _os.path.split(ds[0].path)[0] return complex_databoxes(ds, script=script, **kwargs)