rs_read_coorddata(fullname, aux)
[data_out,aux_out]=rs_read_coorddata(fullname,aux) reads a coordinate file into a dataset structure with a single record
This is the preferred method for bringing coordinates from a single file into a dataset structure suitable for display and geometrical analysis.
- For files generated by analysis of similarity judgments via [??how to refer to Python package], this will also import the goodness-of-fit data.
- For multiple coordinate sets collected with the same experimental paradigm, use
rs_get_coordsets, or use this routine and combine multipledataset structuresinto a singledataset structurewithrs_concat_coordsets. - A
ray structurewill be created. - To create a
coordinate structurebased on aquadratic form model, also users_get_coordsets. - For
binary texture domaindata with symmetry augmentation, users_get_coordsets. - To import coordinates generated externally or that exist as arrays rather than in a file, use
rs_import_coordsets.
Input arguments:
-
fullname(char or singleton char array) –full file name with path; if empty, it will be requested interactively. File names must contain the string '_coords'. See note below regarding setup files.
-
aux(struct) –a structure, can be omitted, with fields
opts_read(struct) – options for reading, can be omitted, with fieldsif_gui(int) – 1 to use graphical interface to request data file name if 'fullname' is empty, 0 to use console; default is 1; see note below regarding customizationif_log(int) – 1 to log progress, 0 to omit; default is 1; see note below regarding customizationdata_fullname_def(char) – prompt for data file if fullname' is empty; see note below regarding customizationui_filter(char) – file name filter that appears in graphical user interface when if_gui=1; defaults to '_coords';see note below regarding customizationtype_coords(float 2-D array) – stimulus coordinates to use for non-reserved domain names, one row for each stimulus; default is emptytype_coords_def(char) – stimulus coordinates to use if type_coords is unspecified or empty; options are 'none', 'zeros', 'ones', or 'eye', seers_import_coordsets; default is 'none'; seers_import_coordsetsfor further details and how to customizedomain_list_def(cell array) – paradigm names for generic domain experiments; default is {'cars','tools','dwellings'}; determined by customization during installparadigm_type_def(char) – default paradigm type; default is determined by customization during installcoord_string(char) – a string in a data file name that delineates the end of the domain name; defaults to '_coords'setup_fullname_def(char) – prompt for setup file namesetup_suffix(char) – suffix added to paradigm name to create the setup file name; default is 'S'type_class_aux(char) – a specified domain name and type_classpermutes(struct) – typically omitted; each field is a suggested ray permutation for the corresponding paradigm name, e.g., permutes.bgca=[2 1 3 4] specifies a reordering of the rays for paradigm 'bgca'permutes_ok(int) – typically omitted; 1 to accept suggested ray permutation, 0 to keep standard order; default is 1; see note below regarding customizationif_uselocal(int) – typically omitted; 0 to use options in rs_aux_defaults, 1 is reserved for maintenance; default is 0
Options related to stimulus coordinates, domains, and setup files (see notes below)
Options for internal use and maintenance
opts_rays(struct) – options for identifying rays, may be omitted; seers_findraysfor detailsopts_check(struct) – options for consistency checking, with fieldif_warn(int) – 1 to show warnings when datasets are checked for consistency, 0 to suppress; default is 1
Output arguments:
-
data_out(struct) –dataset structurewith one record, and fieldsds(singleton cell array) –coordinate structure, ds{1}{idim} is an array of [nstims idim] of coordinates for the sole recordsas(singleton cell array) –stimulus metadata structure, sas{1} is the stimulus metadata for the sole recordsets(singleton cell array) –set metadata structure, sets{1} is the response metadata for the sole record
-
aux_out(struct) –auxiliary outputs and parameter values used, with fields
warnings(char) – warnings generated during consistency checkwarn_bad(int) – number of warnings that prevent further processingrayss(cell array of struct) – rayss{1} is theray structurefor the sole recordopts_read(cell array of struct) – opts_read{1} is aux.opts_read, with defaults filled inopts_rays(cell array of struct) – opts_rays{1} are the options used for creating theray structurefor the sole recordopts_qpred(cell array of struct) – empty (included for compatibility withrs_get_coordsets)syms_list(struct) – empty (included for compatibility withrs_get_coordsets)opts_check(struct) – aux.opts_check, with defaults filled in
Note regarding domain names, stimulus coordinates, and setup files
-
The domain name is determined from the data file name based on the string preceding '_coords' (or, opts_read.coord_string, if customized). This in turn determines how stimulus coordinates are specified.
- For non-reserved domain names (opts_read.type_class_aux, or any domain in opts_read.domain_list_def), stimulus coordinates are specified by 'type_coords' and no setup file is used.
- Other domain names are reserved, and stimulus coordinates are specified by a 'setup file', whose suggested name is constructed from the data file name up to the string preceding opts_read.coord_string, and appending opts_read.setup_suffix
-
The domain name is also used to determine a 'type_class', which is used internally. This is carried out in psg_coorddata_parsename, as follows:
- The domains 'faces*' are reserved; type_class is faces_mpi; used with a setup file
- The domain 'irgb' is reserved; type_class is 'irgb'; used with a setup file
- The domain 'mater' is reserved; type_class is 'mater'; used with a setup file
- The domain opts_read.type_class_aux is NOT reserved; type class is type_class_aux; no setup file used
- Any domain that is listed in opts_read.domain_list_def is NOT reserved; type class is 'domain'; no setup file used
-
Otherwise, type_class is set to opts_read.type_class_def, ('btc' unless customized); used with a setup file
-
When a
dataset structureis written byrs_write_coordsets, the setup file information, if any, will be embedded. When that file is read in and an embedded setup file is detected, no setup file is requested. - Also see note below regarding customization
Note regarding customization
-
The defaults for the following parameters can be set by editing the line containing generic.opts_read.[param_name] in
rs_aux_defaults_define, running it once, and saving the workspace as rs_aux_defaults.mat.- if_gui
- ui_filter
- if_log
- data_fullname_def
- setup_fullname_def
- domain_list_def
- setup_suffix
- permutes_ok
- coord_string
- type_class_aux
See also: rs_import_coordsets, rs_aux_customize, rs_findrays, rs_check_coordsets, PSG_READ_COORDDATA, PSG_MAKE_SETSTRUCT, PSG_FINDRAYS_SETOPTS, PSG_FINDRAYS.
Source code in src/rs_read_coorddata.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |