sasdata.temp_ascii_reader module

class sasdata.temp_ascii_reader.AsciiReaderParams(filenames: list[str], columns: list[tuple[str, ~sasdata.quantities.units.NamedUnit | None]], metadata: ~sasdata.ascii_reader_metadata.AsciiReaderMetadata = <factory>, starting_line: int = 0, excluded_lines: set[int] = <factory>, separator_dict: dict[str, bool] = <factory>, dataset_type: ~sasdata.dataset_types.DatasetType = <factory>)

Bases: object

This object contains the parameters that are used to load a series of ASCII files. These parameters can be generated by the ASCII Reader Dialog when using SasView.

columns: list[tuple[str, NamedUnit | None]]
property columns_included: list[tuple[str, NamedUnit]]
dataset_type: DatasetType
excluded_lines: set[int]
filenames: list[str]
initialise_metadata()
metadata: AsciiReaderMetadata
separator_dict: dict[str, bool]
starting_line: int = 0
class sasdata.temp_ascii_reader.AsciiSeparator(*values)

Bases: Enum

Comma = (0,)
Tab = 2
Whitespace = (1,)
sasdata.temp_ascii_reader.guess_params_from_filename(filename: str, dataset_type: DatasetType) AsciiReaderParams
sasdata.temp_ascii_reader.import_metadata(metadata: dict[str, AsciiMetadataCategory[str]]) MetaNode
sasdata.temp_ascii_reader.initialise_separator_dict(initial_value: bool = False) dict[str, bool]
sasdata.temp_ascii_reader.load_data(params: AsciiReaderParams) list[SasData]

This loads a series of SasData objects based on the params. The amount of SasData objects loaded will depend on how many filenames are present in the list contained in the params.

sasdata.temp_ascii_reader.load_data_default_params(filename: str) list[SasData]
sasdata.temp_ascii_reader.load_quantities(params: AsciiReaderParams, filename: str) dict[str, Quantity]

Load a list of quantities from the filename based on the params.

sasdata.temp_ascii_reader.merge_uncertainties(quantities: dict[str, Quantity]) dict[str, Quantity]

Data in the ASCII files will have the uncertainties in a separate column. This function will merge columns of data with the columns containing their uncertainties so that both are in one Quantity object.

sasdata.temp_ascii_reader.split_line(separator_dict: dict[str, bool], line: str) list[str]

Split a line in a CSV file based on which seperators the user has selected on the widget.