====== Merge Data ====== This command merges data from more than one data name into a single one either by **APPEND_TO_END** (appending one signal to the end of another signal) or by **MERGE_AS_NEW_COMPONENTS** (treat each original signal as a component of the new signal). |\\ Merge_Data\\ /SIGNAL_TYPES=\\ /SIGNAL_FOLDER=\\ /SIGNAL_NAMES=\\ ! /COMPONENT_SEQUENCE=\\ ! /RESULT_TYPES=DERIVED\\ ! /RESULT_FOLDERS=PROCESSED\\ /RESULT_NAME=\\ ! /MERGE_TYPE=APPEND_TO_END\\ ! /IGNORE_MISSING_SIGNALS=FALSE\\ ! /PRE_CLEAR_RESULT_SIGNAL=FALSE\\ ;\\ | {{:Merge_Data.png}}| \\ ==== Parameters ==== **COMPONENT_SEQUENCE:** if empty, all components of the signals will be used\\ **MERGE_TYPE:** APPEND_TO_END or MERGE_AS_NEW_COMPONENTS\\ APPEND_TO_END append one signal to the end of another signal MERGE_AS_NEW_COMPONENTS treat each original signal as a component of the new signal **IGNORE_MISSING_SIGNALS:**\\ **PRE_CLEAR_RESULT_SIGNAL:** Will delete the resulting signal prior to beginning\\ ==== Examples ==== Below are two examples for the Merge_Data command === Simple Example === The command below will create a vector named **Vector** from 3 analog signals. This is an example of merging 3 signals into one signal. Merge_Data /SIGNAL_NAMES=Analog1+Analog2+Analog3 /SIGNAL_TYPES=ANALOG+ANALOG+ANALOG /SIGNAL_FOLDER=ORIGINAL+ORIGINAL+ORIGINAL /SIGNAL_COMPONENTS=0+0+0 /RESULT_NAME=Vector /RESULT_TYPE=DERIVED /RESULT_FOLDER=PROCESSED /MERGE_TYPE=MERGE_AS_NEW_COMPONENTS ; === Add a column to a metric === Another example using the Merge_Data command can be found on the [[|Metrics Example 3]] page. In this example, the command is used to add an indexing column to a metric (single values). This will allow the metric to be graphed. === Merge for ASCII export === The example found on [[Visual3D:Documentation:Pipeline:File_Commands:Export_Data_To_ASCII_File#Example_6:_Export_Concatenated_Metric_Signals|Export_Data_To_ASCII_File#Example_6:_Export_Concatenated_Metric_Signals]] will concatenate metrics signals prior to exporting to an ASCII file. When exporting, all signals are exported to separate columns in the exported file. For metric signals (e.g. signals with only one or two entries/frames) this can be inconvenient. It is not possible to concatenate the signals in the export command, but it is possible to concatenate the signals explicitly before export. === Create Global List of all Instances === Select_Active_File /FILE_NAME=ALL_FILES ; Merge_Data /SIGNAL_TYPES=METRIC /SIGNAL_FOLDER=PROCESSED /SIGNAL_NAMES=GLOBAL::List_of_Instances+L_Ankle_Stiffness /COMPONENT_SEQUENCE=ALL /RESULT_TYPES=METRIC ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=GLOBAL::List_of_Instances ! /MERGE_TYPE=APPEND_TO_END /IGNORE_MISSING_SIGNALS=FALSE /PRE_CLEAR_RESULT_SIGNAL=TRUE ;