at.load.allfiles#
Generic function to save and load python AT lattices. The format is determined by the file extension
Functions
|
Load a Lattice object from a file |
|
Save a Lattice object |
|
Register format-specific processing functions |
- load_lattice(filepath, **kwargs)[source]#
Load a Lattice object from a file
The file format is indicated by the filepath extension.
- Parameters:
filepath (str) – Name of the file
- Keyword Arguments:
Specific keywords for .mat files
- Keyword Arguments:
- Returns:
lattice (Lattice) – New
Lattice
object
See also
load_mat()
,load_m()
,load_repr()
,load_elegant()
,load_tracy()
Known extensions are:
- .mat
Matlab binary mat-file
- .m
Matlab text m-file
- .repr
Text representation of a python AT Lattice
- .lat
Tracy format
- .lte
Elegant format
- register_format(extension, load_func=None, save_func=None, descr='')[source]#
Register format-specific processing functions
- save_lattice(ring, filepath, **kwargs)[source]#
Save a Lattice object
The file format is indicated by the filepath extension.
Specific keywords for .mat files
- Keyword Arguments:
mat_key (str) – Name of the Matlab variable containing the lattice. Default:
'RING'
See also
Known extensions are:
- .mat
Matlab binary mat-file
- .m
Matlab text m-file
- .repr
Text representation of a python AT Lattice