NC_CreateMeanCycleFileΒΆ
NC_CreateMeanCycleFile creates a new NC file with the mean, minimum and maximum cycle of an NC data file containing multiple cycles (segments).
- ssNCMean = NC_CreateMeanCycleFile(ncid, obj)
- ssNCMean = NC_CreateMeanCycleFile(ssNCFile, obj);
Return Value
Returnwert
Is the name of the new NC data file or an empty string if an error occurred.
Parameters
- ssNCFile
ssNCFile is the name of an NC file with the source data.
- obj
obj is an object with the following elements:
Name
Description
obj.ssNCDestName
Complete file name of the source file. If the element does not exist or contains an empty string, the file will be saved in the directory of the source file.
obj.ssXChannel
Channel name with the x-coordinates, e. g. Time or CrankAngle.
obj.svMeanChannel
String vector with channel names.
obj.rsStartCycle
First data point of a cycle start. The point must exist in the x-data range.
obj.rsCycleLength
Length of one cycle.
obj.svCycles
Strintg: Specifies the cycles. Example:
3,6,10-15
or the key wordAll
for all cycles.obj.bMean
If TRUE (1) the mean cycle will be calculated.
obj.bMaximum
If TRUE (1) the maximum cycle will be calculated.
obj.bMinimum
If TRUE (1) the minimum cycle will be calculated.
Example
def TestMean()
{
ssIFile = "z:/uniplot-testdata/ifile-daten/1000_023.001"
ssNCFile = auto_ImportData(ssIFile);
if (ssNCFile == "") {
return FALSE;
}
ncid = nc_open(ssNCFile, NC_WRITE);
if (ncid == -1) {
return FALSE;
}
obj = [.];
obj.ssNCDestName = ssIFile + "_mean.nc";
obj.ssXChannel = "CA";
obj.rsStartCycle = -360;
obj.rsCycleLength = 720;
obj.svCycles = "All";
obj.bMean = 1;
obj.bMaximum = 1;
obj.bMinimum = 1;
obj.svMeanChannel = ["P_ZYL1", "P_ZYL2", "P_ZYL3", "P_ZYL4"];
ssNCMean = NC_CreateMeanCycleFile(ncid, obj);
nc_close(ncid);
return ssNCMean;
}
History
Version |
Description |
---|---|
5.15.1 |
New. |
See also
Overview UniPlot Data Files, File=>Export Data, nc_create, nc_open, Browser=>Mean Cycle auto_ImportData, NC_ExportData
id-1363952