bmad-sim / bmad-ecosystem

Bmad simulation ecosystem for simulating high energy storage rings.
https://www.classe.cornell.edu/bmad/
12 stars 13 forks source link

`python plot_graph` output truncated on `STRUCT` lines #1018

Closed ken-lauer closed 3 months ago

ken-lauer commented 3 months ago

In the regression test example for pytao, the results of python plot_graph beta.g have lines that are truncated due to the 300 character maximum per line.

Specifically, these three lines are truncated and the data is lost:

x;STRUCT;T;label;STR;s [m];label_color;ENUM;black;label_offset;REAL;0.05;max;REAL;6;min;REAL;0;axis^type;ENUM;LINEAR;bounds;ENUM;GENERAL;number_offset;REAL;0.05;major_div_nominal;INT;7;minor_div;INT;0;minor_div_max;INT;6;draw_label;LOGIC;T;draw_numbers;LOGIC;T;tick_side;INUM;1;number_side;INUM;-1;ma
y;STRUCT;T;label;STR;\gb\fn\dA\u, \gb\fn\dB\u [m];label_color;ENUM;black;label_offset;REAL;0.15;max;REAL;1E+30;min;REAL;-1E+30;axis^type;ENUM;LINEAR;bounds;ENUM;GENERAL;number_offset;REAL;0.05;major_div_nominal;INT;4;minor_div;INT;0;minor_div_max;INT;5;draw_label;LOGIC;T;draw_numbers;LOGIC;T;tick_si
y2;STRUCT;T;label;STR;;label_color;ENUM;black;label_offset;REAL;0.15;max;REAL;1E+30;min;REAL;-1E+30;axis^type;ENUM;LINEAR;bounds;ENUM;GENERAL;number_offset;REAL;0.05;major_div_nominal;INT;4;minor_div;INT;0;minor_div_max;INT;5;draw_label;LOGIC;T;draw_numbers;LOGIC;F;tick_side;INUM;1;number_side;INUM;

The length of each of those strings is 300. Can this be adjusted on the bmad side, or perhaps can this information be split in a different way?

DavidSagan commented 3 months ago

@ken-lauer I can split this into individual parameters. How about something like x.label, x.label_color, etc. for parameters names?

ken-lauer commented 3 months ago

That would work for me, @DavidSagan 👍

DavidSagan commented 3 months ago

Done.