- sherpa.ui.load_filter(id, filename=None, ignore=False, ncols=2, *args, **kwargs)
Load the filter array from an ASCII file and add to a data set.
filename (str) – The name of the ASCII file that contains the filter information.
ignore (bool, optional) – If
False(the default) then include bins with a non-zero filter value, otherwise exclude these bins.
colkeys (array of str, optional) – An array of the column name to read in. The default is
sep (str, optional) – The separator character. The default is
comment (str, optional) – The comment character. The default is
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the
filenameparameter. If given two un-named arguments, then they are interpreted as the
filenameparameters, respectively. The remaining parameters are expected to be given as named arguments.
unpack_datafor a description of the supported file format.
Read in the first column of the file and apply it to the default data set:
Select the FILTER column of the file:
>>> load_filter(2, 'filt.dat', colkeys=['FILTER'])