|
SDDS ToolKit Programs and Libraries for C and Python
|
Classes | |
| class | Array |
| class | Column |
| class | Description |
| class | Parameter |
| class | SDDS |
| A class to represent and manipulate SDDS datasets. More... | |
| class | SddsFile |
Functions | |
| sdds_data_type_to_string (data_type_code) | |
| Converts a numeric SDDS data type code to its string representation. | |
| sdds_data_type_to_short_string (data_type_code) | |
| Converts a numeric SDDS data type code to its short string representation. | |
| sdds_short_string_to_data_type (data_type_code) | |
| Converts a numeric SDDS data type code to its short string representation. | |
| demo1 (output) | |
| Demonstrates how to save a demo SDDS file using the SDDS class. | |
| demo2 (output) | |
| Demonstrates how to save a demo SDDS file using the SDDS class with simplified definitions. | |
| demo3 (output) | |
Demonstrates how to save a demo SDDS file using sddsdata commands directly. | |
| demo4 (output) | |
Demonstrates how to save a demo SDDS file using sddsdata commands and writing one row at a time. | |
| demo5 (output) | |
| Demonstrates how to open an existing SDDS file and add rows to the last page without loading the whole file into memory. | |
| demo6 (output) | |
| Demonstrates how to open an existing SDDS file and add a new page. | |
| SddsFile | read (input_file) |
| Mostly backward compatible with the PyLHC sdds module read() function. | |
| write (SddsFile sdds_file, output_file) | |
| Mostly backward compatible with the PyLHC sdds module write() function. | |
Variables | |
| SDDS_VERBOSE_PrintErrors = SDDS.SDDS_VERBOSE_PrintErrors | |
| SDDS_EXIT_PrintErrors = SDDS.SDDS_EXIT_PrintErrors | |
| SDDS_CHECK_OKAY = SDDS.SDDS_CHECK_OKAY | |
| SDDS_CHECK_NONEXISTENT = SDDS.SDDS_CHECK_NONEXISTENT | |
| SDDS_CHECK_WRONGTYPE = SDDS.SDDS_CHECK_WRONGTYPE | |
| SDDS_CHECK_WRONGUNITS = SDDS.SDDS_CHECK_WRONGUNITS | |
| SDDS_LONGDOUBLE = SDDS.SDDS_LONGDOUBLE | |
| SDDS_DOUBLE = SDDS.SDDS_DOUBLE | |
| SDDS_REAL64 = SDDS.SDDS_REAL64 | |
| SDDS_FLOAT = SDDS.SDDS_FLOAT | |
| SDDS_REAL32 = SDDS.SDDS_REAL32 | |
| SDDS_LONG64 = SDDS.SDDS_LONG64 | |
| SDDS_INT64 = SDDS.SDDS_INT64 | |
| SDDS_ULONG64 = SDDS.SDDS_ULONG64 | |
| SDDS_UINT64 = SDDS.SDDS_UINT64 | |
| SDDS_LONG = SDDS.SDDS_LONG | |
| SDDS_INT32 = SDDS.SDDS_INT32 | |
| SDDS_ULONG = SDDS.SDDS_ULONG | |
| SDDS_UINT32 = SDDS.SDDS_UINT32 | |
| SDDS_SHORT = SDDS.SDDS_SHORT | |
| SDDS_INT16 = SDDS.SDDS_INT16 | |
| SDDS_USHORT = SDDS.SDDS_USHORT | |
| SDDS_UINT16 = SDDS.SDDS_UINT16 | |
| SDDS_STRING = SDDS.SDDS_STRING | |
| SDDS_CHARACTER = SDDS.SDDS_CHARACTER | |
| SDDS_NUM_TYPES = SDDS.SDDS_NUM_TYPES | |
| SDDS_BINARY = SDDS.SDDS_BINARY | |
| SDDS_ASCII = SDDS.SDDS_ASCII | |
| SDDS_FLUSH_TABLE = SDDS.SDDS_FLUSH_TABLE | |
| sdds.demo1 | ( | output | ) |
Demonstrates how to save a demo SDDS file using the SDDS class.
Args: output (str): The output SDDS filename to save the demo data.
This function creates an SDDS object, populates it with sample data, and saves it to the specified output file.
Definition at line 1383 of file sdds.py.
| sdds.demo2 | ( | output | ) |
Demonstrates how to save a demo SDDS file using the SDDS class with simplified definitions.
Args: output (str): The output SDDS filename to save the demo data.
This function shows how to use simplified methods to define parameters, arrays, and columns.
Definition at line 1454 of file sdds.py.
| sdds.demo3 | ( | output | ) |
Demonstrates how to save a demo SDDS file using sddsdata commands directly.
Args: output (str): The output SDDS filename to save the demo data.
This function shows how to use sddsdata module functions directly to create and save an SDDS file.
Definition at line 1510 of file sdds.py.
| sdds.demo4 | ( | output | ) |
Demonstrates how to save a demo SDDS file using sddsdata commands and writing one row at a time.
Args: output (str): The output SDDS filename to save the demo data.
This function shows how to write data to an SDDS file one row at a time, useful for logging applications.
Definition at line 1571 of file sdds.py.
| sdds.demo5 | ( | output | ) |
Demonstrates how to open an existing SDDS file and add rows to the last page without loading the whole file into memory.
Args: output (str): The output SDDS filename to append data.
This function shows how to append data to an existing SDDS file efficiently.
Definition at line 1639 of file sdds.py.
| sdds.demo6 | ( | output | ) |
Demonstrates how to open an existing SDDS file and add a new page.
Args: output (str): The output SDDS filename to append data.
This function shows how to append a new page to an existing SDDS file.
Definition at line 1674 of file sdds.py.
| SddsFile sdds.read | ( | input_file | ) |
Mostly backward compatible with the PyLHC sdds module read() function.
Unlike the PyLHC version, this function reads all the SDDS pages and works with column data. The data is returned in a structured dictionary.
Args: input_file (str): The input SDDS file to be read.
Returns: dict: A dictionary with parameters, arrays, and columns data. Example structure: { pages = {integer}, binary = {boolean}, "definitions": {name: {"type:" string, "units": string, "description": string}, "values": {parameter_name: {[Page1Value, Page2Value, ...]}, {array_name: {[Page1List, Page2List, ...]}, {column_name: {[Page1List, Page2List, ...]}, "values": {array_name: {[page1DimList, Page2DimList, ...]} }
Definition at line 1759 of file sdds.py.
| sdds.sdds_data_type_to_short_string | ( | data_type_code | ) |
Converts a numeric SDDS data type code to its short string representation.
Args: data_type_code (int): Numeric code of the SDDS data type.
Returns: str: String representation of the SDDS data type.
Definition at line 1331 of file sdds.py.
| sdds.sdds_data_type_to_string | ( | data_type_code | ) |
Converts a numeric SDDS data type code to its string representation.
Args: data_type_code (int): Numeric code of the SDDS data type.
Returns: str: String representation of the SDDS data type.
Definition at line 1305 of file sdds.py.
| sdds.sdds_short_string_to_data_type | ( | data_type_code | ) |
Converts a numeric SDDS data type code to its short string representation.
Args: data_type_code (string): String representation of the SDDS data type.
Returns: int: Numeric code of the SDDS data type.
Definition at line 1357 of file sdds.py.
| sdds.write | ( | SddsFile | sdds_file, |
| output_file ) |
Mostly backward compatible with the PyLHC sdds module write() function.
Unlike the PyLHC version, this function writes all the SDDS pages and works with column data. The data is expected to be in a structured dictionary like that returned from the read() function.
Args: output_file (str): The output SDDS file to be written to.
Definition at line 1856 of file sdds.py.