flitsr.input.DirInput¶
- class flitsr.input.DirInput(split_faults: bool = False, method_level: bool = False, duplicate_strategy: DuplicateStrategy = DuplicateStrategy.REFUSE)¶
Bases:
InputAn abstract spectral input type which reads in from directories. This class is provided as a convenience for extending
Input, with thebase_input_typefunction set to returnBaseInputType.DIR.- __init__(split_faults: bool = False, method_level: bool = False, duplicate_strategy: DuplicateStrategy = DuplicateStrategy.REFUSE)¶
Internal constructor for an
Inputtype.Caution
This constructor should not be called directly. Use the
read_inmethod instead.Changed in version 2.5.0: Added the
split_faults, method_level, and duplicate_strategy parameters
Methods
__init__([split_faults, method_level, ...])Internal constructor for an
Inputtype.The type (file or directory) expected for this Input method.
check_format(input_path)Check whether the files from the specified input_path are of the concrete types format.
get_elem_separators()Method to get the separators used for printing out elements when writing a spectrum in the format of this input type.
get_reader(input_path)Static helper method that guesses the input type of the given input path out of all available input types.
get_run_file_name(input_path)Return the name of the run file that this input type determines for the given input string.
get_type()Return the InputType enum of this input type.
read_in(input_path[, split_faults, ...])Read in the spectrum from the given input file.
read_spectrum(*args, **kwargs)Deprecated alias of
Input.read_in.search_pattern(**kwargs)Returns the search pattern to use in the run_all script when searching for inputs of the given
Inputtype to run on.write_spectrum(spectrum, output_path)Write the given spectrum in the format of this input type.