difference between save_mat and save_lattice #470
Replies: 9 comments
-
Here an example of the outputs I get for the lattice "rerr"
at.save_lattice
at.save_mat(rerr, lat_err_name)
then finally a simple
|
Beta Was this translation helpful? Give feedback.
-
Hello
`save_lattice`, equivalent to the `Lattice.saveˋ method is the general saving function, where the format is defined by the file name extension. See help(save_lattice) for info on the available file formats. ˋsave_mat` Is the underlying function specialized for .mat files.
Scipy.io.savemat is a low-level scipy function. It can only save some python types, but not class instances. See help(savemat) for info on what you can do with it.
Finally, apparently your rerr lattice is broken. It seems that one element has a wrong PolynomB (not the right shape, or incompatible with MaxOrder).
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I answer in advance a foreseen return question: Why is K there? it is NOT there in the original matlab AT file. |
Beta Was this translation helpful? Give feedback.
-
Here below two picture of the same commands. The K attribute appears when loading the lattice in pyAT PYTHON (index 2019, due to ringparam element missing and python starting to count at 0): |
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo: you are reporting 2 different points, so I start with the 'K' problem: In PyAT, The unexpected presence of this |
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo: 2nd question (functions for saving lattices) PyAT exposes both the generic saving function |
Beta Was this translation helpful? Give feedback.
-
Dear Laurent, I was indeed on an "old" branch. In master there are no errors when using the lattice and load_lattice and save_lattice seem to work. as seen in the above screenshots print() is ok. |
Beta Was this translation helpful? Give feedback.
-
There are 2 python functions to get a text representation of an object:
By default, |
Beta Was this translation helpful? Give feedback.
-
Is there any difference between the two functions
save_mat
andsave_lattice
?Also, the trivial user (as I am) would like to use scipy.io.savemat to save matlab format files, but the Lattice object does not seem to be a savable variable. Is there any way to warn the user, that savemat is not to be used, and instead save_mat or save_lattice are provided?
Beta Was this translation helpful? Give feedback.
All reactions