User Tools

Site Tools


visual3d:documentation:reports:scripting_report_templates_example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:reports:scripting_report_templates_example [2024/06/19 12:53] sgrangervisual3d:documentation:reports:scripting_report_templates_example [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
-====== introduction ======+====== Scripting Report Templates Example ======
  
-this script may be used to graph signals in a report template. instructions to use this script may be found [[visual3d:documentation:reports:scripting_report_templates|here]].+===== Introduction =====
  
-====== sample script ======+This script may be used to graph signals in a report template. Instructions to use this script may be found [[Visual3D:Documentation:Reports:Scripting_Report_Templates|here]]. 
 + 
 +===== Sample Script =====
  
 <code> <code>
 ! ======================================================= ! =======================================================
-set parameters+Set Parameters
 ! ======================================================= ! =======================================================
  
-prompt_for_multiple_pipeline_parameter_values +Prompt_For_Multiple_Pipeline_Parameter_Values 
-/pipeline_parameter_name=page_count+column+row+event_1+event_2 +/PIPELINE_PARAMETER_NAME=PAGE_COUNT+COLUMN+ROW+EVENT_1+EVENT_2 
- +signal_type+signal_folder+color_r+color_l + +SIGNAL_TYPE+SIGNAL_FOLDER+COLOR_R+COLOR_L 
- +graph_trial_style+graph_mean+graph_stddev + +GRAPH_TRIAL_STYLE+GRAPH_MEAN+GRAPH_STDDEV 
-/datatype=s+s+s+s+s+s+s+s+s+s+s+s +/DATATYPE=s+s+s+s+s+s+s+s+s+s+s+s 
-/default_value=1+1+1+hs+hs+link_model_based+original+990000+109900+null+true+true +/DEFAULT_VALUE=1+1+1+HS+HS+LINK_MODEL_BASED+ORIGINAL+990000+109900+NULL+TRUE+TRUE 
-paremeter list explained+PAREMETER LIST EXPLAINED
-page_count +PAGE_COUNT 
-!  starting page +!  Starting page 
-column +COLUMN 
-!  starting column +!  Starting column 
-row +ROW 
-!  starting row +!  Starting row 
-event +EVENT 
-!  if graphing kinematics use "hs", if graphing kinetics use "on+!  If graphing kinematics use "HS", if graphing kinetics use "ON
-!  there is a loop later in the script (::side) which will loop through r +!  There is a loop later in the script (::SIDE) which will loop through R 
-the colors are specified in hex however only numbers (no letters) can be specified in the expression +The colors are specified in HEX however only numbers (no letters) can be specified in the Expression 
-!  to pick colors: http://www.w3schools.com/tags/ref_colorpicker.asp +!  To pick colors: http://www.w3schools.com/tags/ref_colorpicker.asp 
-!  the first value in the color must be 1 or greater (it cannot be 0) +!  The first value in the color MUST be 1 or greater (it cannot be 0) 
-!  color information +!  Color information 
-!  990000 = red +!  990000 = Red 
-!  109900 = green +!  109900 = Green 
-!   100099 = blue/purple +!   100099 = Blue/Purple 
-!  if not using the "set pipeline parameter from expression" command to set +!  If not using the "Set Pipeline Parameter From Expression" command to set 
-!   the line color, any value can be typed in the "line_color" parameter of the +!   the line color, any value can be typed in the "LINE_COLOR" parameter of the 
-!   "make line graph" command+!   "Make Line Graph" command
 ; ;
 </code> </code>
  
 <code> <code>
- set_pipeline_parameter + Set_Pipeline_Parameter 
-list of components that will be graphed +List of components that will be graphed 
-/parameter_name=component_list +/PARAMETER_NAME=COMPONENT_LIST 
-/parameter_value=x+y+z+/PARAMETER_VALUE=X+Y+Z
 ; ;
  
 ! ======================================================= ! =======================================================
-indicate the signals being graphed using prompt+Indicate the signals being graphed using prompt
 !  (1) kinematic (2) kinetic or (3) all !  (1) kinematic (2) kinetic or (3) all
 ! ======================================================= ! =======================================================
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-list of signals that will be graphed +List of signals that will be graphed 
-!  the side parameter will specify whether the signal is or r +!  The SIDE parameter will specify whether the signal is or R 
-/parameter_name=kinematic_segments +/PARAMETER_NAME=KINEMATIC_SEGMENTS 
-/parameter_value=ankleangle+kneeangle+hipangle+/PARAMETER_VALUE=AnkleAngle+KneeAngle+HipAngle
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-list of signals that will be graphed +List of signals that will be graphed 
-!  the side parameter will specify whether the signal is or r +!  The SIDE parameter will specify whether the signal is or R 
-/parameter_name=kinetic_segments +/PARAMETER_NAME=KINETIC_SEGMENTS 
-/parameter_value=anklemoment kneemoment hipmoment anklepower kneepower hippower+/PARAMETER_VALUE=AnkleMoment KneeMoment HipMoment AnklePower KneePower HipPower
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-list of signals that will be graphed +List of signals that will be graphed 
-!  the side parameter will specify whether the signal is or r +!  The SIDE parameter will specify whether the signal is or R 
-/parameter_name=all_segments +/PARAMETER_NAME=ALL_SEGMENTS 
-/parameter_value=::kinematic_segments& + &::kinetic_segments&+/PARAMETER_VALUE=::KINEMATIC_SEGMENTS& + &::KINETIC_SEGMENTS&
 ; ;
  
-prompt_for_pipeline_parameter_value +Prompt_For_Pipeline_Parameter_Value 
-/pipeline_parameter_name=segment_type +/PIPELINE_PARAMETER_NAME=SEGMENT_TYPE 
-/prompt=select data type: +/PROMPT=Select data type: 
-/data_type=string+string+string +/DATA_TYPE=STRING+STRING+STRING 
-/default_value=kinematic_segments kinetic_segments all_segments+/DEFAULT_VALUE=KINEMATIC_SEGMENTS KINETIC_SEGMENTS ALL_SEGMENTS
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-list of signals that will be graphed +List of signals that will be graphed 
-!  the side parameter will specify whether the signal is or r +!  The SIDE parameter will specify whether the signal is or R 
-/parameter_name=data_name_list +/PARAMETER_NAME=DATA_NAME_LIST 
-/parameter_value=&:&:&::segment_type +/PARAMETER_VALUE=&:&:&::SEGMENT_TYPE 
-/multi_pass=true+/MULTI_PASS=TRUE
 ; ;
  
 ! ======================================================= ! =======================================================
-set counters+Set Counters
 ! ======================================================= ! =======================================================
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-set the original column number (this will be incremented at the end of each side loop) +Set the original column number (this will be incremented at the end of each SIDE loop) 
-at the end of each side loop, the column will be set back to this value +At the end of each SIDE loop, the column will be set back to this value 
-/parameter_name=column_initial +/PARAMETER_NAME=COLUMN_INITIAL 
-/parameter_value=::column+/PARAMETER_VALUE=::COLUMN
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-set the original row number (this will be incremented at the end of each component loop) +Set the original row number (this will be incremented at the end of each COMPONENT loop) 
-at the end of each component loop, the row will be set back to this value +At the end of each COMPONENT loop, the row will be set back to this value 
-/parameter_name=row_initial +/PARAMETER_NAME=ROW_INITIAL 
-/parameter_value=::row+/PARAMETER_VALUE=::ROW
 ; ;
  
 ! ======================================================= ! =======================================================
-begin graphing+Begin Graphing
 ! ======================================================= ! =======================================================
  
-for_each +For_Each 
-new page will be created for each signal in the data_name_list +new page will be created for each signal in the DATA_NAME_LIST 
-/iteration_parameter_name=data_name +/ITERATION_PARAMETER_NAME=DATA_NAME 
-/items=::data_name_list+/ITEMS=::DATA_NAME_LIST
 ; ;
  
-set_report_page_title +Set_Report_Page_Title 
-the title of the current page will be set to the current signal name +The title of the current page will be set to the current signal name 
-/page_number=::page_count +/PAGE_NUMBER=::PAGE_COUNT 
-/page_title=::data_name+/PAGE_TITLE=::DATA_NAME
 ; ;
  
-for_each +For_Each 
-for each side (left/right) a column of graphs - the column counter will be incremented at the end of this loop +For each side (left/right) a column of graphs - the column counter will be incremented at the end of this loop 
-/iteration_parameter_name=side +/ITERATION_PARAMETER_NAME=SIDE 
-/items=l+r+/ITEMS=L+R
 ; ;
  
-set_pipeline_parameter_from_expression +Set_Pipeline_Parameter_From_Expression 
-this command is comparing the current side (::side) to determine the color of the graph +This command is comparing the current side (::SIDE) to determine the color of the graph 
-!  if the items in the side list are changed the comparisons will need to be changed as well ("r" and "l") +!  If the items in the SIDE list are changed the comparisons will need to be changed as well ("R" and "L") 
-the colors are specified in hex however only numbers (no letters) can be specified in the expression +The colors are specified in HEX however only numbers (no letters) can be specified in the Expression 
-!  to pick colors: http://www.w3schools.com/tags/ref_colorpicker.asp +!  To pick colors: http://www.w3schools.com/tags/ref_colorpicker.asp 
-/parameter_name=color +/PARAMETER_NAME=COLOR 
-/expression=( "&::side&" == "r" ) * &::color_r& + ( "&::side&" == "l" ) * &::color_l+/EXPRESSION=( "&::SIDE&" == "R" ) * &::COLOR_R& + ( "&::SIDE&" == "L" ) * &::COLOR_L
-/as_integer=true+/AS_INTEGER=TRUE
 ; ;
  
-for_each +For_Each 
-each component (x,y,z) will be added to a new graph since the row number will be incremented at the end of each loop +Each component (X,Y,Z) will be added to a new graph since the row number will be incremented at the end of each loop 
-/iteration_parameter_name=component +/ITERATION_PARAMETER_NAME=COMPONENT 
-/items=::component_list+/ITEMS=::COMPONENT_LIST
 ; ;
  
-make_line_graph +Make_Line_Graph 
-/page_number=::page_count +/PAGE_NUMBER=::PAGE_COUNT 
-/column_number=::column +/COLUMN_NUMBER=::COLUMN 
-/row_number=::row +/ROW_NUMBER=::ROW 
-! /column_span=1 +! /COLUMN_SPAN=1 
-! /row_span=1 +! /ROW_SPAN=1 
-/graph_title=::side&::data_name& - &::component +/GRAPH_TITLE=::SIDE&::DATA_NAME& - &::COMPONENT 
-! /files_to_graph=all_files +! /FILES_TO_GRAPH=ALL_FILES 
-! /display_legend=false +! /DISPLAY_LEGEND=FALSE 
-! /legend_position=ur +! /LEGEND_POSITION=UR 
-! /legend_text+! /LEGEND_TEXT
-! /display_legend_tag=false +! /DISPLAY_LEGEND_TAG=FALSE 
-! /display_legend_folder=false +! /DISPLAY_LEGEND_FOLDER=FALSE 
-! /display_legend_signal=false +! /DISPLAY_LEGEND_SIGNAL=FALSE 
-/line_style=::graph_trial_style +/LINE_STYLE=::GRAPH_TRIAL_STYLE 
-/line_color=#&::color +/LINE_COLOR=#&::COLOR 
-! /line_bold=false +! /LINE_BOLD=FALSE 
-! /show_points=false +! /SHOW_POINTS=FALSE 
-/graph_mean=::graph_mean +/GRAPH_MEAN=::GRAPH_MEAN 
-/graph_stddev=::graph_stddev +/GRAPH_STDDEV=::GRAPH_STDDEV 
-/mean_stddev_line_style=solid +/MEAN_STDDEV_LINE_STYLE=Solid 
-/mean_stddev_line_color=#&::color +/MEAN_STDDEV_LINE_COLOR=#&::COLOR 
-! /mean_stddev_line_bold=false +! /MEAN_STDDEV_LINE_BOLD=FALSE 
-/use_event_range=true +/USE_EVENT_RANGE=TRUE 
-/start_event_label=::side&::event_1 +/START_EVENT_LABEL=::SIDE&::EVENT_1 
-/end_event_label=::side&::event_2 +/END_EVENT_LABEL=::SIDE&::EVENT_2 
-! /intermediate_events+! /INTERMEDIATE_EVENTS
-! /exclude_events+! /EXCLUDE_EVENTS
-/x_axis_label=% gait cycle +/X_AXIS_LABEL=% Gait Cycle 
-/x_data_type=frame_numbers +/X_DATA_TYPE=FRAME_NUMBERS 
-/x_data_name=frames +/X_DATA_NAME=FRAMES 
-/x_data_component=0 +/X_DATA_COMPONENT=0 
-/x_data_processed=original +/X_DATA_PROCESSED=ORIGINAL 
-! /x_axis_scale=normalize 0% to 100% +! /X_AXIS_SCALE=Normalize 0% to 100% 
-! /x_axis_min+! /X_AXIS_MIN
-! /x_axis_max+! /X_AXIS_MAX
-! /y_axis_label+! /Y_AXIS_LABEL
-/y_data_type=::signal_type +/Y_DATA_TYPE=::SIGNAL_TYPE 
-/y_data_name=::side&::data_name +/Y_DATA_NAME=::SIDE&::DATA_NAME 
-/y_data_component=::component +/Y_DATA_COMPONENT=::COMPONENT 
-/y_data_processed=::signal_folder +/Y_DATA_PROCESSED=::SIGNAL_FOLDER 
-! /y_axis_scale=global min to max +! /Y_AXIS_SCALE=Global Min to Max 
-! /y_axis_min+! /Y_AXIS_MIN
-! /y_axis_max+! /Y_AXIS_MAX
-! /y_use_scientific_notation=false +! /Y_USE_SCIENTIFIC_NOTATION=FALSE 
-! /use_p2d_stddev=false +! /USE_P2D_STDDEV=FALSE 
-! /stddev_component=3 +! /STDDEV_COMPONENT=3 
-! /use_p2d_bargraph=false +! /USE_P2D_BARGRAPH=FALSE 
-! /p2d_bargraph_position+! /P2D_BARGRAPH_POSITION
-! /p2d_bargraph_width=+! /P2D_BARGRAPH_WIDTH=
 ; ;
  
-set_pipeline_parameter_from_expression +Set_Pipeline_Parameter_From_Expression 
-at the end of each component loop, a new row is created +At the end of each COMPONENT loop, a new row is created 
-allows each component to have it's own row +Allows each COMPONENT to have it's own row 
-/parameter_name=row +/PARAMETER_NAME=ROW 
-/expression=&::row& + 1 +/EXPRESSION=&::ROW& + 1 
-! /as_integer=true+! /AS_INTEGER=TRUE
 ; ;
  
-end_for_each +End_For_Each 
-end component loop +End COMPONENT loop 
-/iteration_parameter_name=component+/ITERATION_PARAMETER_NAME=COMPONENT
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-at the end of each side loop, row counter is set back to original value +At the end of each SIDE loop, row counter is set back to original value 
-allows each side to start with a graph at the original row specified +Allows each side to start with a graph at the original row specified 
-/parameter_name=row +/PARAMETER_NAME=ROW 
-/parameter_value=::row_initial+/PARAMETER_VALUE=::ROW_INITIAL
 ; ;
  
-set_pipeline_parameter_from_expression +Set_Pipeline_Parameter_From_Expression 
-at the end of each side loop, a new column is created +At the end of each SIDE loop, a new column is created 
-allows each side to have it's own column +Allows each side to have it's own column 
-/parameter_name=column +/PARAMETER_NAME=COLUMN 
-/expression=&::column& + 1 +/EXPRESSION=&::COLUMN& + 1 
-! /as_integer=true+! /AS_INTEGER=TRUE
 ; ;
  
-end_for_each +End_For_Each 
-end side loop +End SIDE loop 
-/iteration_parameter_name=side+/ITERATION_PARAMETER_NAME=SIDE
 ; ;
  
-set_pipeline_parameter +Set_Pipeline_Parameter 
-at the end of each data_name loop, column counter is set back to original value +At the end of each DATA_NAME loop, column counter is set back to original value 
-allows each page to start with a graph at the original column specified +Allows each page to start with a graph at the original column specified 
-/parameter_name=column +/PARAMETER_NAME=COLUMN 
-/parameter_value=::column_initial+/PARAMETER_VALUE=::COLUMN_INITIAL
 ; ;
  
-set_pipeline_parameter_from_expression +Set_Pipeline_Parameter_From_Expression 
-at the end of each data_name loop, a new page is created +At the end of each DATA_NAME loop, a new page is created 
-allows each signal to have it's own page +Allows each signal to have it's own page 
-/parameter_name=page_count +/PARAMETER_NAME=PAGE_COUNT 
-/expression=&::page_count& + 1 +/EXPRESSION=&::PAGE_COUNT& + 1 
-! /as_integer=true+! /AS_INTEGER=TRUE
 ; ;
  
-end_for_each +End_For_Each 
-end data_name loop +End DATA_NAME loop 
-/iteration_parameter_name=data_name+/ITERATION_PARAMETER_NAME=DATA_NAME
 ; ;
 </code> </code>
visual3d/documentation/reports/scripting_report_templates_example.1718801620.txt.gz · Last modified: 2024/06/19 12:53 by sgranger