From 2615e14f9411cb3198752c587e8172a4da15f0c8 Mon Sep 17 00:00:00 2001 From: David Sagan Date: Tue, 25 Jun 2024 00:27:51 -0400 Subject: [PATCH 1/2] Fix Tao `python beam` command. --- sim_utils/interfaces/precision_def.f90 | 2 +- tao/code/tao_python_cmd.f90 | 4 ++-- tao/version/tao_version_mod.f90 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sim_utils/interfaces/precision_def.f90 b/sim_utils/interfaces/precision_def.f90 index 1e48d9143f..ec22630dae 100644 --- a/sim_utils/interfaces/precision_def.f90 +++ b/sim_utils/interfaces/precision_def.f90 @@ -6,7 +6,7 @@ module precision_def integer, parameter :: i4_b = selected_int_kind(9) ! Equiv to NR I4B type global_common_struct - logical :: mp_threading_is_safe = .true. ! Can threading be used with MP? + logical :: mp_threading_is_safe = .true. ! Can threading be used with MP? EG ramping is not thread safe. logical :: exit_on_error = .true. ! Exit program on error? integer :: debug = 0 ! Used for debugging purpeses end type diff --git a/tao/code/tao_python_cmd.f90 b/tao/code/tao_python_cmd.f90 index 44139df7b1..44a086169b 100644 --- a/tao/code/tao_python_cmd.f90 +++ b/tao/code/tao_python_cmd.f90 @@ -322,7 +322,7 @@ subroutine tao_python_cmd (input_str) case ('beam') - u => point_to_uni(line, .false., err); if (err) return + u => point_to_uni(line, .true., err); if (err) return ix_branch = parse_branch(line, u, .false., err); if (err) return nl=incr(nl); write (li(nl), lmt) 'always_reinit;LOGIC;T;', u%beam%always_reinit @@ -378,7 +378,7 @@ subroutine tao_python_cmd (input_str) case ('beam_init') - u => point_to_uni(line, .false., err); if (err) return + u => point_to_uni(line, .true., err); if (err) return ix_branch = parse_branch(line, u, .false., err); if (err) return beam_init => u%model_branch(ix_branch)%beam%beam_init diff --git a/tao/version/tao_version_mod.f90 b/tao/version/tao_version_mod.f90 index bde75ee2e0..75d465b971 100644 --- a/tao/version/tao_version_mod.f90 +++ b/tao/version/tao_version_mod.f90 @@ -6,5 +6,5 @@ !- module tao_version_mod -character(*), parameter :: tao_version_date = "2024/06/20 04:46:43" +character(*), parameter :: tao_version_date = "2024/06/22 15:38:34" end module From dc32662af78d4794833462ed08a24a818df733da Mon Sep 17 00:00:00 2001 From: David Sagan Date: Wed, 26 Jun 2024 19:47:36 -0400 Subject: [PATCH 2/2] Fix Tao `python plot_graph` command. --- tao/code/tao_python_cmd.f90 | 340 +++++++++++++++++++----------------- 1 file changed, 178 insertions(+), 162 deletions(-) diff --git a/tao/code/tao_python_cmd.f90 b/tao/code/tao_python_cmd.f90 index 44a086169b..31af4e811a 100644 --- a/tao/code/tao_python_cmd.f90 +++ b/tao/code/tao_python_cmd.f90 @@ -247,10 +247,11 @@ subroutine tao_python_cmd (input_str) 'ele:twiss', 'ele:wake', 'ele:wall3d', 'em_field', 'enum', 'evaluate', 'floor_plan', 'floor_orbit', & 'global', 'global:opti_de', 'global:optimization', 'global:ran_state', 'help', 'inum', & 'lat_branch_list', 'lat_calc_done', 'lat_ele_list', 'lat_general', 'lat_list', 'lat_param_units', & - 'matrix', 'merit', 'orbit_at_s', & - 'place_buffer', 'plot_curve', 'plot_graph', 'plot_histogram', 'plot_lat_layout', 'plot_line', & - 'plot_template_manage', 'plot_graph_manage', 'plot_curve_manage', & - 'plot_list', 'plot_symbol', 'plot_transfer', 'plot1', 'ptc_com', 'ring_general', & + 'matrix', 'merit', 'orbit_at_s', 'place_buffer', & + 'plot_curve', 'plot_curve_manage', 'plot_graph', 'plot_graph_manage', 'plot_histogram', & + 'plot_lat_layout', 'plot_line', 'plot_list', & + 'plot_symbol', 'plot_template_manage', 'plot_transfer', 'plot1', & + 'ptc_com', 'ring_general', & 'shape_list', 'shape_manage', 'shape_pattern_list', 'shape_pattern_manage', & 'shape_pattern_point_manage', 'shape_set', 'show', 'space_charge_com', 'species_to_int', 'species_to_str', & 'spin_invariant', 'spin_polarization', 'spin_resonance', 'super_universe', & @@ -5390,112 +5391,6 @@ subroutine tao_python_cmd (input_str) nl=incr(nl); write (li(nl), imt) 'symbol.line_width;INT;T;', c%symbol%line_width -!------------------------------------------------------------------------------------------------ -!------------------------------------------------------------------------------------------------ -!%% plot_lat_layout -! -! Output plot Lat_layout info -! -! Notes -! ----- -! Command syntax: -! python plot_lat_layout {ix_uni}@{ix_branch} -! -! Note: The returned list of element positions is not ordered in increasing -! longitudinal position. -! -! Parameters -! ---------- -! ix_uni: 1 -! ix_branch: 0 -! -! Returns -! ------- -! string_list -! -! Examples -! -------- -! Example: 1 -! init: -init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init -! args: -! ix_uni: 1 -! ix_branch: 0 - -case ('plot_lat_layout') - - u => point_to_uni(line, .true., err); if (err) return - ix_branch = parse_branch(line, u, .false., err); if (err) return - branch => u%model%lat%branch(ix_branch) - - do i = 1, branch%n_ele_track - ele => branch%ele(i) - if (ele%slave_status == super_slave$) cycle - - ix_shape_min = 1 - do - call tao_ele_shape_info (u%ix_uni, ele, s%plot_page%lat_layout%ele_shape, shape, label_name, y1, y2, ix_shape_min) - y1 = y1 * s%plot_page%lat_layout_shape_scale - y2 = y2 * s%plot_page%lat_layout_shape_scale - if (.not. associated(shape)) exit - if (.not. shape%draw) cycle - nl=incr(nl); write (li(nl), '(i0, 2(a, es22.14), (a, i0), 2a, 2(a, es10.2), 4a)') i, ';', ele%s_start, ';', ele%s, ';', & - shape%line_width, ';', trim(shape%shape), ';', y1, ';', y2, ';', trim(shape%color), ';', trim(label_name) - enddo - enddo - -!------------------------------------------------------------------------------------------------ -!------------------------------------------------------------------------------------------------ -!%% plot_list -! -! Output list of plot templates or plot regions. -! -! Notes -! ----- -! Command syntax: -! python plot_list {r_or_g} -! -! where "{r/g}" is: -! "r" ! list regions of the form ix;region_name;plot_name;visible;x1;x2;y1;y2 -! "t" ! list template plots of the form ix;name -! -! Parameters -! ---------- -! r_or_g -! -! Returns -! ------- -! string_list -! -! Examples -! -------- -! Example: 1 -! init: -init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init -! args: -! r_or_g: r - - -case ('plot_list') - if (line == 't') then - do i = 1, size(s%plot_page%template) - p => s%plot_page%template(i) - if (p%phantom) cycle - if (p%name == '') cycle - if (p%name == 'scratch') cycle - nl=incr(nl); write (li(nl), '(i0, 2a)') i, ';', trim(p%name) - enddo - - elseif (line == 'r') then - do i = 1, size(s%plot_page%region) - pr => s%plot_page%region(i) - if (pr%name == '') cycle - nl=incr(nl); write (li(nl), '(i0, 5a, l1, 8a)') i, ';', trim(pr%name), ';', trim(pr%plot%name), ';', pr%visible, ';', & - re_str(pr%location(1), 4), ';', re_str(pr%location(2), 4), ';', re_str(pr%location(3), 4), ';', re_str(pr%location(4), 4) - enddo - - else - call invalid ('Expect "r" or "t"') - endif - !------------------------------------------------------------------------------------------------ !------------------------------------------------------------------------------------------------ !%% plot_graph @@ -5575,57 +5470,72 @@ subroutine tao_python_cmd (input_str) nl=incr(nl); write (li(nl), lmt) 'draw_only_good_user_data_or_vars;LOGIC;T;', g%draw_only_good_user_data_or_vars fp => g%floor_plan - nl=incr(nl); write (li(nl), '(50a)') 'floor_plan;STRUCT;T', ';view;ENUM;', fp%view, & - ';rotation;REAL;', to_str(fp%rotation, 6), ';flip_label_side;LOGIC;', logic_str(fp%flip_label_side), & - ';size_is_absolute;LOGIC;', logic_str(fp%size_is_absolute), ';draw_building_wall;LOGIC;', logic_str(fp%draw_building_wall), & - ';draw_only_first_pass;LOGIC;', logic_str(fp%draw_only_first_pass), ';correct_distortion;LOGIC;', logic_str(fp%correct_distortion), & - ';orbit_scale;REAL;', to_str(fp%orbit_scale, 4), ';orbit_color;ENUM;', trim(fp%orbit_color), & - ';orbit_lattice;ENUM;', trim(fp%orbit_lattice), & - ';orbit_width;INT;', int_str(fp%orbit_width), ';orbit_pattern;ENUM;', trim(fp%orbit_pattern) - - - if (s%global%external_plotting) then - nl=incr(nl); write (li(nl), '(6a, 2(a, l1))') 'x;STRUCT;T;label;STR;', trim(x_ax%label), & - ';max;REAL;', to_str(x_ax%max,6), ';min;REAL;', to_str(x_ax%min,6), & - ';draw_label;LOGIC;', x_ax%draw_label, ';draw_numbers;LOGIC;', x_ax%draw_numbers - nl=incr(nl); write (li(nl), '(6a, 2(a, l1))') 'y;STRUCT;T;label;STR;', trim(y_ax%label), & - ';max;REAL;', to_str(y_ax%max,6), ';min;REAL;', to_str(y_ax%min,6), & - ';draw_label;LOGIC;', y_ax%draw_label, ';draw_numbers;LOGIC;', y_ax%draw_numbers - nl=incr(nl); write (li(nl), '(6a, 2(a, l1))') 'y2;STRUCT;T;label;STR;', trim(g%y2%label), & - ';max;REAL;', to_str(g%y2%max,6), ';min;REAL;', to_str(g%y2%min,6), & - ';draw_label;LOGIC;', g%y2%draw_label, ';draw_numbers;LOGIC;', g%y2%draw_numbers - else - nl=incr(nl); write (li(nl), '(16a, 3(a, i0), 2(a, l1), 2(a, i0), 4a)') 'x;STRUCT;T;label;STR;', trim(x_ax%label), & - ';label_color;ENUM;', trim(x_ax%label_color), ';label_offset;REAL;', to_str(x_ax%label_offset,6), & - ';max;REAL;', to_str(x_ax%max,6), ';min;REAL;', to_str(x_ax%min,6), & - ';axis^type;ENUM;', trim(x_ax%type), ';bounds;ENUM;', trim(x_ax%bounds), & - ';number_offset;REAL;', to_str(x_ax%number_offset,6), ';major_div_nominal;INT;', x_ax%major_div_nominal, & - ';minor_div;INT;', x_ax%minor_div, ';minor_div_max;INT;', x_ax%minor_div_max, & - ';draw_label;LOGIC;', x_ax%draw_label, ';draw_numbers;LOGIC;', x_ax%draw_numbers, & - ';tick_side;INUM;', x_ax%tick_side, ';number_side;INUM;', x_ax%number_side, & - ';major_tick_len;REAL;', to_str(x_ax%major_tick_len,6), ';minor_tick_len;REAL;', to_str(x_ax%minor_tick_len,6) - - nl=incr(nl); write (li(nl), '(16a, 3(a, i0), 2(a, l1), 2(a, i0), 4a)') 'y;STRUCT;T;label;STR;', trim(y_ax%label), & - ';label_color;ENUM;', trim(y_ax%label_color), ';label_offset;REAL;', to_str(y_ax%label_offset,6), & - ';max;REAL;', to_str(y_ax%max,6), ';min;REAL;', to_str(y_ax%min,6), & - ';axis^type;ENUM;', trim(y_ax%type), ';bounds;ENUM;', trim(y_ax%bounds), & - ';number_offset;REAL;', to_str(y_ax%number_offset,6), ';major_div_nominal;INT;', y_ax%major_div_nominal, & - ';minor_div;INT;', y_ax%minor_div, ';minor_div_max;INT;', y_ax%minor_div_max, & - ';draw_label;LOGIC;', y_ax%draw_label, ';draw_numbers;LOGIC;', y_ax%draw_numbers, & - ';tick_side;INUM;', y_ax%tick_side, ';number_side;INUM;', y_ax%number_side, & - ';major_tick_len;REAL;', to_str(y_ax%major_tick_len,6), ';minor_tick_len;REAL;', to_str(y_ax%minor_tick_len,6) - - nl=incr(nl); write (li(nl), '(16a, 3(a, i0), 2(a, l1), 2(a, i0), 4a)') 'y2;STRUCT;T;label;STR;', trim(g%y2%label), & - ';label_color;ENUM;', trim(g%y2%label_color), ';label_offset;REAL;', to_str(g%y2%label_offset,6), & - ';max;REAL;', to_str(g%y2%max,6), ';min;REAL;', to_str(g%y2%min,6), & - ';axis^type;ENUM;', trim(g%y2%type), ';bounds;ENUM;', trim(g%y2%bounds), & - ';number_offset;REAL;', to_str(g%y2%number_offset,6), ';major_div_nominal;INT;', g%y2%major_div_nominal, & - ';minor_div;INT;', g%y2%minor_div, ';minor_div_max;INT;', g%y2%minor_div_max, & - ';draw_label;LOGIC;', g%y2%draw_label, ';draw_numbers;LOGIC;', g%y2%draw_numbers, & - ';tick_side;INUM;', g%y2%tick_side, ';number_side;INUM;', g%y2%number_side, & - ';major_tick_len;REAL;', to_str(g%y2%major_tick_len,6), ';minor_tick_len;REAL;', to_str(g%y2%minor_tick_len,6) - - endif + nl=incr(nl); write (li(nl), amt) 'floor_plan.view;ENUM;T;', fp%view + nl=incr(nl); write (li(nl), amt) 'floor_plan.rotation;REAL;T;', to_str(fp%rotation, 6) + nl=incr(nl); write (li(nl), amt) 'floor_plan.flip_label_side;LOGIC;T;', logic_str(fp%flip_label_side) + nl=incr(nl); write (li(nl), amt) 'floor_plan.size_is_absolute;LOGIC;T;', logic_str(fp%size_is_absolute) + nl=incr(nl); write (li(nl), amt) 'floor_plan.draw_building_wall;LOGIC;T;', logic_str(fp%draw_building_wall) + nl=incr(nl); write (li(nl), amt) 'floor_plan.draw_only_first_pass;LOGIC;T;', logic_str(fp%draw_only_first_pass) + nl=incr(nl); write (li(nl), amt) 'floor_plan.correct_distortion;LOGIC;T;', logic_str(fp%correct_distortion) + nl=incr(nl); write (li(nl), amt) 'floor_plan.orbit_scale;REAL;T;', to_str(fp%orbit_scale, 4) + nl=incr(nl); write (li(nl), amt) 'floor_plan.orbit_color;ENUM;T;', trim(fp%orbit_color) + nl=incr(nl); write (li(nl), amt) 'floor_plan.orbit_lattice;ENUM;T;', trim(fp%orbit_lattice) + nl=incr(nl); write (li(nl), amt) 'floor_plan.orbit_width;INT;T;', int_str(fp%orbit_width) + nl=incr(nl); write (li(nl), amt) 'floor_plan.orbit_pattern;ENUM;T;', trim(fp%orbit_pattern) + + nl=incr(nl); write (li(nl), amt) 'x.label;STR;T;', trim(x_ax%label) + nl=incr(nl); write (li(nl), amt) 'x.label_color;ENUM;T;', trim(x_ax%label_color) + nl=incr(nl); write (li(nl), amt) 'x.label_offset;REAL;T;', to_str(x_ax%label_offset,6) + nl=incr(nl); write (li(nl), amt) 'x.max;REAL;T;', to_str(x_ax%max,6) + nl=incr(nl); write (li(nl), amt) 'x.min;REAL;T;', to_str(x_ax%min,6) + nl=incr(nl); write (li(nl), amt) 'x.axis^type;ENUM;T;', trim(x_ax%type) + nl=incr(nl); write (li(nl), amt) 'x.bounds;ENUM;T;', trim(x_ax%bounds) + nl=incr(nl); write (li(nl), amt) 'x.number_offset;REAL;T;', to_str(x_ax%number_offset,6) + nl=incr(nl); write (li(nl), imt) 'x.major_div_nominal;INT;T;', x_ax%major_div_nominal + nl=incr(nl); write (li(nl), imt) 'x.minor_div;INT;T;', x_ax%minor_div + nl=incr(nl); write (li(nl), imt) 'x.minor_div_max;INT;T;', x_ax%minor_div_max + nl=incr(nl); write (li(nl), lmt) 'x.draw_label;LOGIC;T;', x_ax%draw_label + nl=incr(nl); write (li(nl), lmt) 'x.draw_numbers;LOGIC;T;', x_ax%draw_numbers + nl=incr(nl); write (li(nl), imt) 'x.tick_side;INUM;T;', x_ax%tick_side + nl=incr(nl); write (li(nl), imt) 'x.number_side;INUM;T;', x_ax%number_side + nl=incr(nl); write (li(nl), amt) 'x.major_tick_len;REAL;T;', to_str(x_ax%major_tick_len,6) + nl=incr(nl); write (li(nl), amt) 'x.minor_tick_len;REAL;T;', to_str(x_ax%minor_tick_len,6) + + nl=incr(nl); write (li(nl), amt) 'y.label;STR;T;', trim(y_ax%label) + nl=incr(nl); write (li(nl), amt) 'y.label_color;ENUM;T;', trim(y_ax%label_color) + nl=incr(nl); write (li(nl), amt) 'y.label_offset;REAL;T;', to_str(y_ax%label_offset,6) + nl=incr(nl); write (li(nl), amt) 'y.max;REAL;T;', to_str(y_ax%max,6) + nl=incr(nl); write (li(nl), amt) 'y.min;REAL;T;', to_str(y_ax%min,6) + nl=incr(nl); write (li(nl), amt) 'y.axis^type;ENUM;T;', trim(y_ax%type) + nl=incr(nl); write (li(nl), amt) 'y.bounds;ENUM;T;', trim(y_ax%bounds) + nl=incr(nl); write (li(nl), amt) 'y.number_offset;REAL;T;', to_str(y_ax%number_offset,6) + nl=incr(nl); write (li(nl), imt) 'y.major_div_nominal;INT;T;', y_ax%major_div_nominal + nl=incr(nl); write (li(nl), imt) 'y.minor_div;INT;T;', y_ax%minor_div + nl=incr(nl); write (li(nl), imt) 'y.minor_div_max;INT;T;', y_ax%minor_div_max + nl=incr(nl); write (li(nl), lmt) 'y.draw_label;LOGIC;T;', y_ax%draw_label + nl=incr(nl); write (li(nl), lmt) 'y.draw_numbers;LOGIC;T;', y_ax%draw_numbers + nl=incr(nl); write (li(nl), imt) 'y.tick_side;INUM;T;', y_ax%tick_side + nl=incr(nl); write (li(nl), imt) 'y.number_side;INUM;T;', y_ax%number_side + nl=incr(nl); write (li(nl), amt) 'y.major_tick_len;REAL;T;', to_str(y_ax%major_tick_len,6) + nl=incr(nl); write (li(nl), amt) 'y.minor_tick_len;REAL;T;', to_str(y_ax%minor_tick_len,6) + + nl=incr(nl); write (li(nl), amt) 'y2.label;STR;T;', trim(g%y2%label) + nl=incr(nl); write (li(nl), amt) 'y2.label_color;ENUM;T;', trim(g%y2%label_color) + nl=incr(nl); write (li(nl), amt) 'y2.label_offset;REAL;T;', to_str(g%y2%label_offset,6) + nl=incr(nl); write (li(nl), amt) 'y2.max;REAL;T;', to_str(g%y2%max,6) + nl=incr(nl); write (li(nl), amt) 'y2.min;REAL;T;', to_str(g%y2%min,6) + nl=incr(nl); write (li(nl), amt) 'y2.axis^type;ENUM;T;', trim(g%y2%type) + nl=incr(nl); write (li(nl), amt) 'y2.bounds;ENUM;T;', trim(g%y2%bounds) + nl=incr(nl); write (li(nl), amt) 'y2.number_offset;REAL;T;', to_str(g%y2%number_offset,6) + nl=incr(nl); write (li(nl), imt) 'y2.major_div_nominal;INT;T;', g%y2%major_div_nominal + nl=incr(nl); write (li(nl), imt) 'y2.minor_div;INT;T;', g%y2%minor_div + nl=incr(nl); write (li(nl), imt) 'y2.minor_div_max;INT;T;', g%y2%minor_div_max + nl=incr(nl); write (li(nl), lmt) 'y2.draw_label;LOGIC;T;', g%y2%draw_label + nl=incr(nl); write (li(nl), lmt) 'y2.draw_numbers;LOGIC;T;', g%y2%draw_numbers + nl=incr(nl); write (li(nl), imt) 'y2.tick_side;INUM;T;', g%y2%tick_side + nl=incr(nl); write (li(nl), imt) 'y2.number_side;INUM;T;', g%y2%number_side + nl=incr(nl); write (li(nl), amt) 'y2.major_tick_len;REAL;T;', to_str(g%y2%major_tick_len,6) + nl=incr(nl); write (li(nl), amt) 'y2.minor_tick_len;REAL;T;', to_str(g%y2%minor_tick_len,6) !------------------------------------------------------------------------------------------------ !------------------------------------------------------------------------------------------------ @@ -5672,6 +5582,112 @@ subroutine tao_python_cmd (input_str) nl=incr(nl); write (li(nl), rmt) 'center;REAL;T;', c%hist%center nl=incr(nl); write (li(nl), imt) 'number;REAL;T;', c%hist%number +!------------------------------------------------------------------------------------------------ +!------------------------------------------------------------------------------------------------ +!%% plot_lat_layout +! +! Output plot Lat_layout info +! +! Notes +! ----- +! Command syntax: +! python plot_lat_layout {ix_uni}@{ix_branch} +! +! Note: The returned list of element positions is not ordered in increasing +! longitudinal position. +! +! Parameters +! ---------- +! ix_uni: 1 +! ix_branch: 0 +! +! Returns +! ------- +! string_list +! +! Examples +! -------- +! Example: 1 +! init: -init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init +! args: +! ix_uni: 1 +! ix_branch: 0 + +case ('plot_lat_layout') + + u => point_to_uni(line, .true., err); if (err) return + ix_branch = parse_branch(line, u, .false., err); if (err) return + branch => u%model%lat%branch(ix_branch) + + do i = 1, branch%n_ele_track + ele => branch%ele(i) + if (ele%slave_status == super_slave$) cycle + + ix_shape_min = 1 + do + call tao_ele_shape_info (u%ix_uni, ele, s%plot_page%lat_layout%ele_shape, shape, label_name, y1, y2, ix_shape_min) + y1 = y1 * s%plot_page%lat_layout_shape_scale + y2 = y2 * s%plot_page%lat_layout_shape_scale + if (.not. associated(shape)) exit + if (.not. shape%draw) cycle + nl=incr(nl); write (li(nl), '(i0, 2(a, es22.14), (a, i0), 2a, 2(a, es10.2), 4a)') i, ';', ele%s_start, ';', ele%s, ';', & + shape%line_width, ';', trim(shape%shape), ';', y1, ';', y2, ';', trim(shape%color), ';', trim(label_name) + enddo + enddo + +!------------------------------------------------------------------------------------------------ +!------------------------------------------------------------------------------------------------ +!%% plot_list +! +! Output list of plot templates or plot regions. +! +! Notes +! ----- +! Command syntax: +! python plot_list {r_or_g} +! +! where "{r/g}" is: +! "r" ! list regions of the form ix;region_name;plot_name;visible;x1;x2;y1;y2 +! "t" ! list template plots of the form ix;name +! +! Parameters +! ---------- +! r_or_g +! +! Returns +! ------- +! string_list +! +! Examples +! -------- +! Example: 1 +! init: -init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init +! args: +! r_or_g: r + + +case ('plot_list') + if (line == 't') then + do i = 1, size(s%plot_page%template) + p => s%plot_page%template(i) + if (p%phantom) cycle + if (p%name == '') cycle + if (p%name == 'scratch') cycle + nl=incr(nl); write (li(nl), '(i0, 2a)') i, ';', trim(p%name) + enddo + + elseif (line == 'r') then + do i = 1, size(s%plot_page%region) + pr => s%plot_page%region(i) + if (pr%name == '') cycle + nl=incr(nl); write (li(nl), '(i0, 5a, l1, 8a)') i, ';', trim(pr%name), ';', trim(pr%plot%name), ';', pr%visible, ';', & + re_str(pr%location(1), 4), ';', re_str(pr%location(2), 4), ';', re_str(pr%location(3), 4), ';', re_str(pr%location(4), 4) + enddo + + else + call invalid ('Expect "r" or "t"') + endif + !------------------------------------------------------------------------------------------------ !------------------------------------------------------------------------------------------------ !%% plot_template_manage @@ -7199,7 +7215,7 @@ subroutine tao_python_cmd (input_str) case ('super_universe') nl=incr(nl); write (li(nl), imt) 'n_universe;INT;F;', ubound(s%u, 1) - nl=incr(nl); write (li(nl), imt) 'n_v1_var_used;INT;F', s%n_v1_var_used + nl=incr(nl); write (li(nl), imt) 'n_v1_var_used;INT;F;', s%n_v1_var_used nl=incr(nl); write (li(nl), imt) 'n_var_used;INT;F;', s%n_var_used !------------------------------------------------------------------------------------------------