pwAddData
[namesObservation, namesDataSet] = ...
pwAddData(filename, tryAutomatic, showPlots, namesObservation, namesDataSet)
pwAddData(dataSet, tryAutomatic, showPlots, namesObservation, namesDataSet)
Adds a data file from harddisk or a data set from Matlab workspace
to the currently selected models.
filename string Data file (xls or txt)
It is recommended to use
Microsoft Excel 5.0/95 Workbook xls files.
Then, no Excel has to be installed, but the
internal Matlab xls reader is able to open the file.
dataSet struct Alternative call to use a matrix
of the working space. See pwGetDataSet.
tryAutomatic bool If true (default) saved mappings of observables
names to data set columns are reused.
showPlots bool If true (default) the loaded data is displayed.
The figures are arranged automatically depending on
config.data.arrangeFigures
namesObservation string array
namesDataSet string array
In order to avoid the mapping dialog between model
observation and header names in the external data
file, the mapping can be specified as a string
cell array.
Supported file types
Please use Excel-95 or ASCII text files if the Excel-COM server is not available.
Else any Excel file is supported, including xlsx and csv.
Data matrix
The data matrix should contain one column with the time points.
The column name should start with "xCol-", e.g. "xCol-Time-min"
or just with "Time", e.g. "Time-min".
If the data file comprises multiple stimulations, please use
the column "parCol-Stimulus" or "Stimulus" to distinguish the stimulations
from each other: If in some row the value of the stimulus column is 5,
then all entries in this row belong to stimulus 5.
If you have only one stimulus, the stimulus column can be neglected.
Standard deviations
If available, the standard deviation can be specified in columns
with the prefix "stdCol-" before the name of the corresponding column.
E.g. main column "Erk" and standard deviations in "stdCol-Erk".
Important: If you want to use the standard deviations as given in the
data file, please specify this either in the configuration dialog or via:
config = pwGetConfig;
config.data.yStdCalculation = 2;
pwSetConfig(config);
Model-data mapping
May ask the user to map file columns to observation functions.
If tryAutomatic = true (default), PottersWheel checks for saved
mat files describing the connection between the current observation
and the data file. If you pressed 'Save' in the same mapping
dialog earlier, the connection mat file will be reused.
Recommendations
It is recommended to use only the following characters inside the file:
A-Za-z_,0-9 #.'-[]():
In ASCII files, columns have to be separated by a tabulator.
The filename should contain only [a-zA-Z0-9] and the underscore _.
Example
# Test file with experimental data.
# Stimulation with Epo.
# Experiment: Adam Smith.
# Two stimulations: 1 Continuous, 2 Pulse (5 min). Both with dose 6.
# Two observations: A and B
#
# Driving functions:
# MCode drivingFunctions(1).name = 'Epo';
# MCode drivingFunctions(1).stimuli(1)=pwGetDrivingFunction('steps',[-1 0], [0 6]);
# MCode drivingFunctions(1).stimuli(2)=pwGetDrivingFunction('steps',[-1 0 5],[0 6 0]);
#
# parCol-Stimulus xCol-Time A_obs B_obs
1 0 11.707 0.38078
1 3 4.17596 3.51887
1 6 1.71684 6.62109
1 9 1.83223 6.56341
1 12 1.34706 6.32869
2 0 13.707 0.58078
2 3 5.17596 4.51887
2 6 2.71684 7.62109
2 9 2.83223 7.56341
2 12 2.34706 7.32869
Alternavtively since PW 2.0.55:
# PottersWheel Data Format 2.0.55
#
# Header Name Stimulus Type Time points Values
# Input Epo 1 steps -1;0;5 0;6;0
# Input Epo 2 steps -1;0 0;6
#
# Stimulus Time A_obs B_obs
1 0 11.707 0.38078
1 3 4.17596 3.51887
1 6 1.71684 6.62109
1 9 1.83223 6.56341
1 12 1.34706 6.32869
2 0 13.707 0.58078
2 3 5.17596 4.51887
2 6 2.71684 7.62109
2 9 2.83223 7.56341
2 12 2.34706 7.32869
See also