allow double quotes in mode name for atvariablethinmultipole - #1140
Conversation
|
Dear all, who could review this PR ? |
Hi @lfarv ! For example, saving a ring with a drift as d = atdrift("d",0.1); where the name is double quoted makes pyat fail when loading the .mat file. |
|
@lfarv , |
function rsrc = setparams(rsrc,modename,ab)
amplarg=strcat('Amplitude',ab);
if isfield(rsrc,amplarg)
switch modename
case "SINE"
rsrc = setsine(rsrc,ab);
case "ARBITRARY"
rsrc = setarb(rsrc,ab);
case "WHITENOISE"
rsrc = setwhitenoise(rsrc,ab);
end
end
endSince ModeName has been converted to |
|
To protect also From elem = struct('FamName',famname,'PassMethod',method,'Length',lg,rsrc{:});to elem = struct('FamName',char(famname),'PassMethod',char(method),'Length',lg,rsrc{:});
|
|
@lfarv , all changes have been implemented. |
lfarv
left a comment
There was a problem hiding this comment.
If you checked that everything is now working, that's ok for me.
This PR solves issue #1139 , where a mode name double quoted created a .mat file incompatible with pyat.
The string is converted to characters to make it readable in pyat.