flitsr.input.FileInput

class flitsr.input.FileInput(split_faults: bool = False, method_level: bool = False, duplicate_strategy: DuplicateStrategy = DuplicateStrategy.REFUSE)

Bases: Input

An abstract spectral input type which reads in from files. This class is provided as a convenience for extending Input, with the base_input_type function set to return BaseInputType.FILE.

__init__(split_faults: bool = False, method_level: bool = False, duplicate_strategy: DuplicateStrategy = DuplicateStrategy.REFUSE)

Internal constructor for an Input type.

Caution

This constructor should not be called directly. Use the read_in method 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 Input type.

base_input_type()

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 Input type to run on.

write_spectrum(spectrum, output_path)

Write the given spectrum in the format of this input type.

final classmethod base_input_type() BaseInputType

The type (file or directory) expected for this Input method. For convenience in implementing this method, extend either FileInput or DirInput.

Added in version 2.5.0.