visual3d:documentation:pipeline:file_commands:export_data_to_ascii_file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:file_commands:export_data_to_ascii_file [2024/06/19 12:50] – sgranger | visual3d:documentation:pipeline:file_commands:export_data_to_ascii_file [2024/11/15 16:55] (current) – sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{{{{{{{{{{{{{note: | + | ===== Export Data To ASCII File ===== |
- | the visual3d | + | This pipeline command |
- | ===== reserved signal names ===== | + | **NOTE**: This command pulls data from the [[visual3d: |
- | visual3d reserves the signal names origin, rotation and quaternion for exporting the pose of a segment. do not use these names for any signal definition other than the reserved intention. | + | ==== Pipeline Command ==== |
- | ===== normalization | + | |**Export_Data_To_Ascii_File** |
+ | |/FILE_NAME=C:\demo files\Example1\test.txt |The filename (Including path) for the exported data | | ||
+ | |/ | ||
+ | |! / | ||
+ | |/ | ||
+ | |! / | ||
+ | |/ | ||
+ | |! / | ||
+ | |! / | ||
+ | |! /END_LABEL= | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |! / | ||
+ | |**; | ||
- | data can be exported to a normalized ascii output. | + | ==== Dialog ==== |
+ | The following dialog appears when the **EXPORT_DATA_TO_ASCII_FILE** command has been added to the pipeline and the user double-clicks with the Left Mouse Button on the command. | ||
- | ===== pipeline command ===== | + | {{: |
- | the command parameter details follow: | + | ==== Important Notes ==== |
- | + | ||
- | |**export_data_to_ascii_file** | + | |
- | |/file_name=c:\demo files\example1\test.txt |the filename (including path) for the exported data | | + | |
- | |/ | + | |
- | |! / | + | |
- | |/ | + | |
- | |! / | + | |
- | |/ | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |! / | + | |
- | |**; | + | |
- | the following dialog appears when the **export_data_to_ascii_file** command has been added to the pipeline | + | Visual3D reserves |
- | exportascii.png | + | If you choose to normalize the data for the ASCII output, by setting the parameter **/ |
- | ===== examples ===== | + | ==== Examples |
- | we have listed a few examples | + | We have listed a few examples |
- | ==== example | + | === Example |
- | using [[#export_data_to_ascii_file|export_data_to_ascii_file]] to export data from individual | + | Using [[#Export_Data_to_ASCII_File|Export_Data_to_ASCII_File]] to export data from individual |
- | assuming: | + | Assuming: |
- | - the cmo file is already open | + | - the CMZ file is already open |
- | - you want to export data from each c3d file to a txt of the same name (or prefix). | + | - you want to export data from each C3D file to a txt of the same name (or prefix). |
- | - you want to be prompted to select the folder | + | - you want to be prompted to select the FOLDER |
- | the following pipeline commands can be saved to a .v3s file. | + | The following pipeline commands can be saved to a .v3s file. |
< | < | ||
- | !prompt | + | !Prompt |
- | set_pipeline_parameter_to_folder_path | + | Set_Pipeline_Parameter_To_Folder_Path |
- | /parameter_name=folder | + | /PARAMETER_NAME=FOLDER |
- | /parameter_value= | + | /PARAMETER_VALUE= |
; | ; | ||
- | ! get the list of files from the workspace and do not retain the path name for each file | + | ! Get the list of files from the workspace and do not retain the path name for each file |
- | set_pipeline_parameter_to_list_of_tagged_files | + | Set_Pipeline_Parameter_To_List_Of_Tagged_Files |
- | /parameter_name=files | + | /PARAMETER_NAME=FILES |
- | /tag_name=all_files | + | /TAG_NAME=ALL_FILES |
- | ! /get_current_selected_files=false | + | ! /GET_CURRENT_SELECTED_FILES=FALSE |
- | /use_short_filenames=true | + | /USE_SHORT_FILENAMES=TRUE |
; | ; | ||
- | ! loop through the files and export the data | + | ! Loop through the files and export the data |
- | for_each | + | For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
- | /items=::files | + | /ITEMS=::FILES |
; | ; | ||
- | | + | |
- | /file_name=*&::index | + | /FILE_NAME=*&::INDEX |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | | + | |
- | /file_name=::folder&::index&.txt | + | /FILE_NAME=::FOLDER&::INDEX&.txt |
- | /signal_types=link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED |
- | /signal_names=rknee_angle+rknee_moment+rknee_moment+rhip_angle+rhip_moment+rhip_moment+rankle_angle+rankle_moment | + | /SIGNAL_NAMES=RKNEE_ANGLE+RKNEE_MOMENT+RKNEE_MOMENT+RHIP_ANGLE+RHIP_MOMENT+RHIP_MOMENT+RANKLE_ANGLE+RANKLE_MOMENT |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_components=x,x,x,x,x,x,x,x | + | /SIGNAL_COMPONENTS=X,X,X,X,X,X,X,X |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | /event_sequence=ron+roff | + | /Event_Sequence=RON+ROFF |
- | ! /exclude_events= | + | ! /Exclude_Events= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | /normalize_data=true | + | /NORMALIZE_DATA=TRUE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
; | ; | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
; | ; | ||
</ | </ | ||
- | ==== example | + | === Example |
- | in this example, the output | + | In this example, the output |
- | the pipline | + | The pipeline |
< | < | ||
- | ! prompt | + | ! Prompt |
- | set_pipeline_parameter_to_folder_path | + | Set_Pipeline_Parameter_To_Folder_Path |
- | /parameter_name=folder | + | /PARAMETER_NAME=FOLDER |
- | /parameter_value= | + | /PARAMETER_VALUE= |
; | ; | ||
- | ! get the list of files from the workspace and do not retain the path name for each file | + | ! Get the list of files from the workspace and do not retain the path name for each file |
- | set_pipeline_parameter_to_list_of_tagged_files | + | Set_Pipeline_Parameter_To_List_Of_Tagged_Files |
- | /parameter_name=files | + | /PARAMETER_NAME=FILES |
- | /tag_name=all_files | + | /TAG_NAME=ALL_FILES |
- | ! /get_current_selected_files=false | + | ! /GET_CURRENT_SELECTED_FILES=FALSE |
- | /use_short_filenames=true | + | /USE_SHORT_FILENAMES=TRUE |
; | ; | ||
- | ! loop through the files and export the data | + | ! Loop through the files and export the data |
- | for_each | + | For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
- | /items=::files | + | /ITEMS=::FILES |
; | ; | ||
- | | + | |
- | | + | |
- | /parameter_name=new_index | + | /PARAMETER_NAME=NEW_INDEX |
- | /parameter_value=::index | + | /PARAMETER_VALUE=::INDEX |
- | /parameter_value_search_for=.c3d | + | /PARAMETER_VALUE_SEARCH_FOR=.c3d |
- | /parameter_value_replace_with=.txt | + | /PARAMETER_VALUE_REPLACE_WITH=.txt |
- | ! /parameter_value_prefix= | + | ! /PARAMETER_VALUE_PREFIX= |
- | ! /parameter_value_append= | + | ! /PARAMETER_VALUE_APPEND= |
; | ; | ||
- | | + | |
- | /file_name=*&::index | + | /FILE_NAME=*&::INDEX |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | | + | |
- | | + | |
- | | + | |
- | /file_name=::folder&::new_index | + | /FILE_NAME=::FOLDER&::NEW_INDEX |
- | /signal_types=link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based+link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED |
- | /signal_names=rknee_angle+rknee_moment+rknee_moment+rhip_angle+rhip_moment+rhip_moment+rankle_angle+rankle_moment | + | /SIGNAL_NAMES=RKNEE_ANGLE+RKNEE_MOMENT+RKNEE_MOMENT+RHIP_ANGLE+RHIP_MOMENT+RHIP_MOMENT+RANKLE_ANGLE+RANKLE_MOMENT |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_components=x,x,x,x,x,x,x,x | + | /SIGNAL_COMPONENTS=X,X,X,X,X,X,X,X |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | /event_sequence=ron+roff | + | /EVENT_SEQUENCE=RON+ROFF |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | /normalize_data=true | + | /NORMALIZE_DATA=TRUE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
; | ; | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
; | ; | ||
</ | </ | ||
- | ==== example | + | === Example |
- | one can export | + | One can export |
- | === option | + | == Option |
- | given a file with many occurrences of the range rhs it is possible to export all ranges using the command. | + | Given a file with many occurrences of the event sequence RHS+RHS |
< | < | ||
- | ! export ascii data for all ranges of rhs. the output is normalized. | + | ! Export ASCII data for all ranges of RHS. The output is normalized. |
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | /file_name= | + | /FILE_NAME= |
- | /signal_types=link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED |
- | /signal_names=thoraxseg+pelvisseg | + | /SIGNAL_NAMES=ThoraxSeg+PelvisSeg |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | /event_sequence=rhs+rhs | + | /Event_Sequence=RHS+RHS |
- | ! /exclude_events= | + | ! /Exclude_Events= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | /normalize_data=true | + | /NORMALIZE_DATA=TRUE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
</ | </ | ||
- | === option | + | == Option |
- | it isn't possible to directly export a subset of these ranges, so the following work around can be used. | + | It isn't possible to directly export a subset of these ranges, so the following work around can be used. |
- | * first, set a start and stop event before and after the ranges that should be exported. | + | * First, set a START and STOP event before and after the ranges that should be exported. |
- | * second, create events within the ranges from start to stop | + | * Second, create events within the ranges from START to STOP |
- | * third, modify the event_sequence | + | * Third, modify the Event_Sequence |
< | < | ||
- | ! this script assumes that a start and stop event have already been created | + | ! This script assumes that a START and STOP event have already been created |
- | ! create | + | ! Create |
- | ! start and stop and offset by 2 frames | + | ! START and STOP and offset by 2 frames |
- | event_copy | + | Event_Copy |
- | /event_name=rhs | + | /EVENT_NAME=RHS |
- | /new_event_name=export | + | /NEW_EVENT_NAME=EXPORT |
- | /frame_offset=2 | + | /FRAME_OFFSET=2 |
- | ! /event_instance=0 | + | ! /EVENT_INSTANCE=0 |
- | ! /range_instance=0 | + | ! /RANGE_INSTANCE=0 |
- | /event_sequence=start+stop | + | /EVENT_SEQUENCE=START+STOP |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
; | ; | ||
- | ! modify | + | ! Modify |
- | ! exclude_event | + | ! Exclude_Event |
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | /file_name= | + | /FILE_NAME= |
- | /signal_types=link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED |
- | /signal_names=thoraxseg+pelvisseg | + | /SIGNAL_NAMES=ThoraxSeg+PelvisSeg |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | /event_sequence=rhs+export+rhs | + | /Event_Sequence=RHS+EXPORT+RHS |
- | ! /exclude_events=stop | + | ! /Exclude_Events=STOP |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | /normalize_data=true | + | /NORMALIZE_DATA=TRUE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
</ | </ | ||
- | ==== example | + | === Example |
- | given a set of cmo files, open each cmo file and export one or more metrics | + | Given a set of CMZ files, |
< | < | ||
- | ! prompt | + | ! Prompt |
! be searched as well | ! be searched as well | ||
- | set_pipeline_parameter_to_folder_path | + | Set_Pipeline_Parameter_To_Folder_Path |
- | /parameter_name=folder | + | /PARAMETER_NAME=FOLDER |
- | /parameter_value= | + | /PARAMETER_VALUE= |
; | ; | ||
- | ! set pipeline parameter | + | ! Set Pipeline Parameter |
- | set_pipeline_parameter_to_list_of_files | + | Set_Pipeline_Parameter_To_List_Of_Files |
- | /parameter_name=cmo_files | + | /PARAMETER_NAME=CMZ_FILES |
- | /folder=::folder | + | /FOLDER=::FOLDER |
- | /search_subfolders=true | + | /SEARCH_SUBFOLDERS=TRUE |
- | /file_mask=*.cmo | + | /FILE_MASK=*.cmz |
; | ; | ||
- | ! loop over all cmo files | + | ! Loop over all CMZfiles |
- | for_each | + | For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
- | /items=::cmo_files | + | /ITEMS=::CMZ_FILES |
; | ; | ||
- | ! create | + | ! Create |
- | ! but replace the extension .cmo with the extension .txt which | + | ! but replace the extension .cmz with the extension .txt which |
! will be used for the exported file. | ! will be used for the exported file. | ||
- | set_pipeline_parameter | + | Set_Pipeline_Parameter |
- | /parameter_name=txt_file | + | /PARAMETER_NAME=TXT_FILE |
- | /parameter_value=::index | + | /PARAMETER_VALUE=::INDEX |
- | /parameter_value_search_for=.cmo | + | /PARAMETER_VALUE_SEARCH_FOR=.cmz |
- | /parameter_value_replace_with=.txt | + | /PARAMETER_VALUE_REPLACE_WITH=.txt |
- | ! /parameter_value_prefix= | + | ! /PARAMETER_VALUE_PREFIX= |
- | ! /parameter_value_append= | + | ! /PARAMETER_VALUE_APPEND= |
; | ; | ||
- | ! open the cmo file | + | ! Open the CMZ file |
- | file_open | + | File_Open |
- | /file_name=::index | + | /FILE_NAME=::INDEX |
; | ; | ||
- | ! assuming | + | ! Assuming |
- | ! of the pelvis segment in a signal in the global workspace | + | ! of the pelvis segment in a signal in the GLOBAL Workspace |
- | evaluate_expression | + | Evaluate_Expression |
- | /expression=model::segment::rpv::mass | + | /EXPRESSION=MODEL::SEGMENT::RPV::MASS |
- | /result_name=global::pelvis_mass | + | /RESULT_NAME=GLOBAL::PELVIS_MASS |
- | /result_type=metric | + | /RESULT_TYPE=METRIC |
- | /result_folder=export | + | /RESULT_FOLDER=EXPORT |
; | ; | ||
- | ! add any other pipeline commands here | + | ! Add any other pipeline commands here |
- | ! make the global workspace | + | ! Make the GLOBAL Workspace |
- | select_active_file | + | Select_Active_File |
- | /file_name=global | + | /FILE_NAME=GLOBAL |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | ! export | + | ! Export |
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | /file_name=::txt_file | + | /FILE_NAME=::TXT_FILE |
- | /signal_types=metric | + | /SIGNAL_TYPES=METRIC |
- | /signal_names=pelvis_mass | + | /SIGNAL_NAMES=PELVIS_MASS |
- | /signal_folder=export | + | /SIGNAL_FOLDER=EXPORT |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | ! /normalize_data=false | + | ! /NORMALIZE_DATA=FALSE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
- | ! clear the workspace in preparation for the next cmo file. | + | ! Clear the workspace in preparation for the next CMZ file. |
- | file_new | + | File_New |
; | ; | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
; | ; | ||
</ | </ | ||
- | ==== example | + | === Example |
- | this example will export | + | This example will export |
< | < | ||
- | ! get the names of all files in the workspace | + | ! Get the names of all files in the workspace |
- | set_pipeline_parameter_to_list_of_tagged_files | + | Set_Pipeline_Parameter_To_List_Of_Tagged_Files |
- | /parameter_name=files | + | /PARAMETER_NAME=FILES |
- | /tag_name=all_files | + | /TAG_NAME=ALL_FILES |
- | ! /get_current_selected_files=false | + | ! /GET_CURRENT_SELECTED_FILES=false |
- | ! /use_short_filenames=false | + | ! /USE_SHORT_FILENAMES=false |
; | ; | ||
- | ! loop through each file | + | ! Loop through each file |
- | for_each | + | For_Each |
- | /iteration_parameter_name=file | + | /ITERATION_PARAMETER_NAME=FILE |
- | /items=::files | + | /ITEMS=::FILES |
; | ; | ||
- | ! create | + | ! Create |
! but replace the extension .c3d with the extension .txt which | ! but replace the extension .c3d with the extension .txt which | ||
! will be used for the exported file. | ! will be used for the exported file. | ||
- | set_pipeline_parameter | + | Set_Pipeline_Parameter |
- | /parameter_name=txt_file | + | /PARAMETER_NAME=TXT_FILE |
- | /parameter_value=::file | + | /PARAMETER_VALUE=::FILE |
- | /parameter_value_search_for=.c3d | + | /PARAMETER_VALUE_SEARCH_FOR=.c3d |
- | /parameter_value_replace_with=.txt | + | /PARAMETER_VALUE_REPLACE_WITH=.txt |
- | ! /parameter_value_prefix= | + | ! /PARAMETER_VALUE_PREFIX= |
- | ! /parameter_value_append= | + | ! /PARAMETER_VALUE_APPEND= |
; | ; | ||
- | ! select | + | ! Select |
- | select_active_file | + | Select_Active_File |
- | /file_name=::file | + | /FILE_NAME=::FILE |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | ! loop to convert events from time to frames for 4 hs reps | + | ! Loop to convert events from time to frames for 4 HS reps |
- | for_each | + | For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
- | /items=lhs1+lhs2+lhs3+rhs1+rhs2 | + | /ITEMS=LHS1+LHS2+LHS3+RHS1+RHS2 |
; | ; | ||
- | ! expression | + | ! Expression |
- | evaluate_expression | + | Evaluate_Expression |
- | /expression=event_label::original&:&:&:: | + | /EXPRESSION=EVENT_LABEL::ORIGINAL&:&:&:: |
- | /result_name=::index | + | /RESULT_NAME=::INDEX |
- | /result_type=metric | + | /RESULT_TYPE=METRIC |
- | /result_folder=event_export | + | /RESULT_FOLDER=EVENT_EXPORT |
; | ; | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=index | + | /ITERATION_PARAMETER_NAME=INDEX |
; | ; | ||
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | /file_name=::txt_file | + | /FILE_NAME=::TXT_FILE |
- | /signal_types=metric | + | /SIGNAL_TYPES=METRIC |
- | ! /signal_names= | + | ! /SIGNAL_NAMES= |
- | /signal_folder=event_export | + | /SIGNAL_FOLDER=EVENT_EXPORT |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | ! /normalize_data=false | + | ! /NORMALIZE_DATA=FALSE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
- | end_for_each | + | End_For_Each |
- | /iteration_parameter_name=file | + | /ITERATION_PARAMETER_NAME=FILE |
; | ; | ||
</ | </ | ||
- | ==== example | + | === Example |
- | all signals are exported to separate columns in the exported file. for metric signals (e.g. signals with only one or two entries/ | + | All signals are exported to separate columns in the exported file. For metric signals (e.g. signals with only one or two entries/ |
- | consider | + | Consider |
+ | |||
+ | {{: | ||
- | exportmetric1.jpg | ||
< | < | ||
- | metric_signal_value_at_event | + | Metric_Signal_Value_At_Event |
- | /result_metric_name=rknee_angle_at_ron | + | /RESULT_METRIC_NAME=RKNEE_ANGLE_AT_RON |
- | ! /result_metric_folder=processed | + | ! /RESULT_METRIC_FOLDER=PROCESSED |
- | /signal_types=link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED |
- | /signal_names=rknee_angle | + | /SIGNAL_NAMES=RKNEE_ANGLE |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | /event_name=ron | + | /EVENT_NAME=RON |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
- | ! /generate_vector_length_metric=false | + | ! /GENERATE_VECTOR_LENGTH_METRIC=FALSE |
- | ! /retain_no_data_values=false | + | ! /RETAIN_NO_DATA_VALUES=FALSE |
; | ; | ||
</ | </ | ||
- | in the test file i used for this example, this resulted in a metric with two metric values for two signals. | + | In the test file I used for this example, this resulted in a metric with two metric values for two signals. |
- | exportmetric2.jpg | + | {{: |
- | if the signal were exported as follows: | + | If the signal were exported as follows: |
- | exportmetric3.jpg | + | {{: |
< | < | ||
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | ! /file_name= | + | ! /FILE_NAME= |
- | /signal_types=metric | + | /SIGNAL_TYPES=METRIC |
- | /signal_names=rknee_angle_at_ron+rknee_angle_at_ron+rknee_angle_at_ron | + | /SIGNAL_NAMES=RKNEE_ANGLE_AT_RON+RKNEE_ANGLE_AT_RON+RKNEE_ANGLE_AT_RON |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | /signal_components=x,y,z | + | /SIGNAL_COMPONENTS=X,Y,Z |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | /event_sequence=, , | + | /EVENT_SEQUENCE=, , |
- | /exclude_events=, , | + | /EXCLUDE_EVENTS=, , |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | ! /normalize_data=false | + | ! /NORMALIZE_DATA=FALSE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
</ | </ | ||
- | the resulting file would contain 6 columns of data (3 for each file). | + | The resulting file would contain 6 columns of data (3 for each file). |
- | exportmetric4.jpg | + | {{: |
- | the signals could be concatenated using the following pipeline: | + | The signals could be concatenated using the following pipeline: |
< | < | ||
- | select_active_file | + | Select_Active_File |
- | /file_name=all_files | + | /FILE_NAME=ALL_FILES |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | metric_signal_value_at_event | + | Metric_Signal_Value_At_Event |
- | /result_metric_name=rknee_angle_at_ron | + | /RESULT_METRIC_NAME=RKnee_Angle_at_RON |
- | ! /result_metric_folder=processed | + | ! /RESULT_METRIC_FOLDER=PROCESSED |
- | /signal_types=link_model_based | + | /SIGNAL_TYPES=LINK_MODEL_BASED |
- | /signal_names=rkneeangle | + | /SIGNAL_NAMES=RKneeAngle |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | /event_name=ron | + | /EVENT_NAME=RON |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
- | ! /generate_vector_length_metric=false | + | ! /GENERATE_VECTOR_LENGTH_METRIC=FALSE |
- | ! /retain_no_data_values=false | + | ! /RETAIN_NO_DATA_VALUES=FALSE |
; | ; | ||
- | merge_data | + | Merge_Data |
- | /signal_types=metric | + | /SIGNAL_TYPES=METRIC |
- | /signal_folder=for_export+processed | + | /SIGNAL_FOLDER=For_Export+PROCESSED |
- | /signal_names=global::rknee_angle_at_ron+rknee_angle_at_ron | + | /SIGNAL_NAMES=GLOBAL::RKnee_Angle_at_RON+RKnee_Angle_at_RON |
- | ! /component_sequence= | + | ! /COMPONENT_SEQUENCE= |
- | /result_types=metric | + | /RESULT_TYPES=METRIC |
- | /result_folders=for_export | + | /RESULT_FOLDERS=For_Export |
- | /result_name=global::rknee_angle_at_ron | + | /RESULT_NAME=GLOBAL::RKnee_Angle_at_RON |
- | ! /merge_type=append_to_end | + | ! /MERGE_TYPE=APPEND_TO_END |
- | /ignore_missing_signals=false | + | /IGNORE_MISSING_SIGNALS=FALSE |
- | /pre_clear_result_signal=true | + | /PRE_CLEAR_RESULT_SIGNAL=TRUE |
; | ; | ||
- | select_active_file | + | Select_Active_File |
- | /file_name=global | + | /FILE_NAME=GLOBAL |
- | ! /query= | + | ! /QUERY= |
; | ; | ||
- | export_data_to_ascii_file | + | Export_Data_To_Ascii_File |
- | ! /file_name= | + | ! /FILE_NAME= |
- | /signal_types=metric | + | /SIGNAL_TYPES=METRIC |
- | /signal_names=rknee_angle_at_ron | + | /SIGNAL_NAMES=RKnee_Angle_at_RON |
- | /signal_folder=for_export | + | /SIGNAL_FOLDER=FOR_EXPORT |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /start_label= | + | ! /START_LABEL= |
- | ! /end_label= | + | ! /END_LABEL= |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /use_point_rate=false | + | ! /USE_POINT_RATE=FALSE |
- | ! /normalize_data=false | + | ! /NORMALIZE_DATA=FALSE |
- | ! /normalize_points=101 | + | ! /NORMALIZE_POINTS=101 |
- | ! /export_mean_and_std_dev=false | + | ! /EXPORT_MEAN_AND_STD_DEV=FALSE |
- | ! /use_p2d_format=false | + | ! /USE_P2D_FORMAT=FALSE |
- | ! /use_short_filename=false | + | ! /USE_SHORT_FILENAME=FALSE |
; | ; | ||
</ | </ | ||
- | the last command of the above script will export to ascii. the image below will show how it looks in the export_to_ascii_file | + | The last command of the above script will export to ASCII. The image below will show how it looks in the Export_to_ASCII_file |
+ | |||
+ | {{: | ||
+ | The resulting output file contains: | ||
- | exportmetric5.jpg | + | {{: |
- | the resulting output file contains: | + | In versions of Visual3D prior to version 5, the Merge_Data command did not provide this functionality, |
- | exportmetric6.jpg | + | [[Visual3D:Documentation: |
- | in very old versions of visual3d (ex. v4), the merge_data command did not provide this functionality, | + | |
- | \\ | ||
- | [[visual3d: | ||
- | }}}}}}}}}}}}}} |
visual3d/documentation/pipeline/file_commands/export_data_to_ascii_file.1718801409.txt.gz · Last modified: 2024/06/19 12:50 by sgranger