flitsr.input.Gzoltar¶
- class flitsr.input.Gzoltar(split_faults: bool = False, method_level: bool = False, duplicate_strategy: DuplicateStrategy = DuplicateStrategy.REFUSE)¶
Bases:
DirInput- __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.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.
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
Gzoltartype to run on.write_spectrum(spectrum, directory)Output the spectrum in Gzoltar format
- static check_format(input_path: str) bool¶
Check whether the files from the specified input_path are of the concrete types format. The implementation of this abstract method must return a boolean, where True indicates that the input is in the format recognized by the implementing class, and False otherwise
- Parameters:
input_path – str: The input path to check for format.
- Returns:
True if the input path refers to input in the format that this input type can read, or False otherwise.
- classmethod get_elem_separators() List[str]¶
Method to get the separators used for printing out elements when writing a spectrum in the format of this input type. NOTE: this method does not need to be implemented by an input type unless it is used in the implemented write_spectrum method.
- classmethod search_pattern(**kwargs) str¶
Returns the search pattern to use in the run_all script when searching for inputs of the
Gzoltartype to run on. The format is a Unix shell style pattern (seeInput.search_patternfor more details).- Returns:
The search pattern to use, which is always “spectra.csv”.