diff --git a/pyat/at/load/matfile.py b/pyat/at/load/matfile.py index 643dfdfe2..6275bb31e 100644 --- a/pyat/at/load/matfile.py +++ b/pyat/at/load/matfile.py @@ -33,9 +33,13 @@ "Particle": "particle", "cell_harmnumber": "cell_harmnumber", # necessary: property "beam_current": "beam_current", # necessary: property - "PassMethod": None, + "PassMethod": None, # Useless Matlab attributes "Length": None, "cavpts": None, + "Mat_File": None, # These are erroneous attributes saved in + "Mat_Key": None, # RingParam by old versions + "Beam_Current": None, + "Nbunch": None, } _p2m = dict((v, k) for k, v in _m2p.items() if v is not None) # Attribute to drop when writing a file @@ -504,6 +508,10 @@ def _mat_key(ring): return mat_key +def _ignore(ring, value): + pass + + register_format( ".mat", load_mat, @@ -518,5 +526,5 @@ def _mat_key(ring): descr="Matlab text m-file. See :py:func:`.load_m`.", ) -Lattice.mat_file = property(_mat_file, None, None) -Lattice.mat_key = property(_mat_key, None, None) +Lattice.mat_file = property(_mat_file, _ignore, None) +Lattice.mat_key = property(_mat_key, _ignore, None) diff --git a/pyproject.toml b/pyproject.toml index f36f40069..d2518ed9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Intended Audience :: Science/Research", - "License :: OSI Approved :: The Unlicense (Unlicense)", + "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX",