Gwyscan Library
 All Files Functions Enumerations Enumerator Modules
Save Gwyddion File
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_array (const double *data, int xres, int yres, double xreal, double yreal, const char *xyunit, const char *zunit, const char *description, const char *filename)
 Saves single array as a Gwyddion file. More...
 
GWYSCANDLL_API GwyscanResult gwyscan_add_gwyddion_array (const double *data, int xres, int yres, double xreal, double yreal, const char *xyunit, const char *zunit, const char *description, const char *filename)
 Saves single array as a Gwyddion file, adding it as new channels if the file already exists. More...
 
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_arrays_general (const double **data, int nchannels, const int *xres, const int *yres, const double *xreal, const double *yreal, const char **xyunit, const char **zunit, const char **description, const char *filename)
 Saves multiple arrays to a Gwyddion file. More...
 
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_arrays (const double *data, int nchannels, int xres, int yres, double xreal, double yreal, const char **xyunit, const char **zunit, const char **description, const char *filename)
 
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_xyz (const double *xypos, const double *zdata, int n, int nchannels, int xres, int yres, const char **description, const char *filename)
 Saves Gwyddion XYZ file. More...
 

Detailed Description

Function Documentation

GWYSCANDLL_API GwyscanResult gwyscan_add_gwyddion_array ( const double *  data,
int  xres,
int  yres,
double  xreal,
double  yreal,
const char *  xyunit,
const char *  zunit,
const char *  description,
const char *  filename 
)

Saves single array as a Gwyddion file, adding it as new channels if the file already exists.

Saves two dimensional array (represented as one-dimensional one) into a Gwyddion file. If the file already exists, it adds the array as a new channel.

Parameters
datais the array data to save, this array should have xres * yres resolution.
xresis x resolution of the data array to save.
yresis y resolution of the data array to save.
xrealis physical dimension of the array to save in x direction, in xyunit.
yrealis physical dimension of the array to save in y direction, in xyunit.
xyunitis the basic SI unit of x and y range, e.g. "m" for meters.
zunitis the basic SI unit of the data, e.g. "m" for meters.
descriptionis the channel description for Gwyddion file.
filenameis the filename where to save data.
Returns
error code.
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_array ( const double *  data,
int  xres,
int  yres,
double  xreal,
double  yreal,
const char *  xyunit,
const char *  zunit,
const char *  description,
const char *  filename 
)

Saves single array as a Gwyddion file.

Saves two dimensional array (represented as one-dimensional one) into a Gwyddion file.

Parameters
dataare the array data to save, this array should have xres * yres resolution.
xresis x resolution of the data array to save.
yresis y resolution of the data array to save.
xrealis physical dimension of the array to save in x direction, in xyunit.
yrealis physical dimension of the array to save in y direction, in xyunit.
xyunitis the basic SI unit of x and y range, e.g. "m" for meters.
zunitis the basic SI unit of the data, e.g. "m" for meters.
descriptionis the channel description for Gwyddion file.
filenameis the filename where to save data.
Returns
error code.
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_arrays_general ( const double **  data,
int  nchannels,
const int *  xres,
const int *  yres,
const double *  xreal,
const double *  yreal,
const char **  xyunit,
const char **  zunit,
const char **  description,
const char *  filename 
)

Saves multiple arrays to a Gwyddion file.

Saves set of two dimensional arrays (represented as array of one-dimensional arrays) into a Gwyddion file, typically representing several channels obtained within a measurement. In contrast to gwyscan_save_gwyddion_arrays(), the arrays can have different pixel size and different physical size.

Parameters
datais array of pointers to one-dimensional arrays to save, this arrays should have xres[i] * yres[i] resolution for i-th channel.
nchannelsis the number of channels.
xresis an array of x resolutions of the data arrays to save.
yresis an array of y resolutions of the data arrays to save.
xrealis an array of physical dimensions of the arrays to save in x direction, in xyunit.
yrealis an array of physical dimensions of the arrays to save in y direction, in xyunit.
xyunitis an array of strings of the basic SI units of x and y ranges, e.g. "m" for meters.
zunitis an array of strings of the the basic SI units of the data, e.g. "m" for meters.
descriptionis an array of the channel description for Gwyddion file.
filenameis the filename where to save data.
Returns
error code.
Examples:
save_gwyddion_arrays_general.c.
GWYSCANDLL_API GwyscanResult gwyscan_save_gwyddion_xyz ( const double *  xypos,
const double *  zdata,
int  n,
int  nchannels,
int  xres,
int  yres,
const char **  description,
const char *  filename 
)

Saves Gwyddion XYZ file.

Saves XYZ data to Gwyddion XYZ file. Saves all channels from zdata. xypos the xy positions, stored as interleaved arrays (x1, y1, x2, y2 ... xn, yn) of size 2*n; zdata channels that are stored sequentially (e.g. za1, za2, .. zan, zb1, zb2, .. zbn for channels za and zb) n is the number of non-equidistant data triplets available nchannels the number of channels xres x resolution for final render while Gwyddion loads the data yres y resolution for final render while Gwyddion loads the data filename where to store the data.

Parameters
xyposis xy positions, stored as interleaved arrays (x1, y1, x2, y2 ... xn, yn) of size 2*n.
zdatais measured values (height, error signal, etc.), stored sequentially (e.g. za1, za2, .. zan, zb1, zb2, .. zbn for channels za and zb).
nis the number of non-equidistant data triplets available.
nchannelsis the number of channels.
xresis x resolution of the data array to save; information for Gwyddion, may be 100.
yresis y resolution of the data array to save; information for Gwyddion, may be 100.
descriptionis the channel description for Gwyddion file.
filenameis the filename where to save data.
Returns
error code.
Examples:
preview.c.