1) for subsets of data (when save_data_flag=1):
look at the options in dsExportData used in dsSimulate
'dataOnlyIncludeRE','',[],... % regular expression for which data fields to include when saving data
‘dataExcludeRE','',[],... % regular expression for which data fields to exclude when saving data
this permits saving a subset of data fields with regular expression wildcards
2) analysis function gets simID through simulator_options.sim_id. when result data is saved, it should include that sim id by default. you can choose to save analysis result data without the sim data with save_data_flag=0