Gwyscan Library
|
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... | |
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... | |
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... | |
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) |
Saves multiple arrays having same pixel resolution and same physical range into a Gwyddion file. More... | |
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... | |
GwyscanResult | gwyscan_add_gwyddion_xyz (const double *xypos, const double *zdata, int n, int nchannels, int xres, int yres, const char **description, const char *filename, const char *tmp_filename, int *n_total) |
Adds XYZ data to existing Gwyddion XYZ file. More... | |
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.
data | is the array data to save, this array should have xres * yres resolution. |
xres | is x resolution of the data array to save. |
yres | is y resolution of the data array to save. |
xreal | is physical dimension of the array to save in x direction, in xyunit . |
yreal | is physical dimension of the array to save in y direction, in xyunit . |
xyunit | is the basic SI unit of x and y range, e.g. "m" for meters. |
zunit | is the basic SI unit of the data, e.g. "m" for meters. |
description | is the channel description for Gwyddion file. |
filename | is the filename where to save data. |
GwyscanResult gwyscan_add_gwyddion_xyz | ( | const double * | xypos, |
const double * | zdata, | ||
int | n, | ||
int | nchannels, | ||
int | xres, | ||
int | yres, | ||
const char ** | description, | ||
const char * | filename, | ||
const char * | tmp_filename, | ||
int * | n_total | ||
) |
Adds XYZ data to existing Gwyddion XYZ file.
Adds XYZ data to existing Gwyddion XYZ file. Number of channels must be the same. First use gwyscan_save_gwyddion_xyz() to create XYZ file when not existing. Then you can periodically call gwyscan_add_gwyddion_xyz() to create one big XYZ file.
xypos | is xy positions, stored as interleaved arrays (x1, y1, x2, y2 ... xn, yn) of size 2*n. |
zdata | is measured values (height, error signal, etc.), 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 | is the number of channels. |
xres | is x resolution of the data array to save; information for Gwyddion, may be 100. XXX: This parameter does not actually do anything. |
yres | is y resolution of the data array to save; information for Gwyddion, may be 100. XXX: This parameter does not actually do anything. |
description | is the channel description for Gwyddion file. XXX: This parameter does not actually do anything. |
filename | is the filename of existing file. Data is added and saved to this file. |
tmp_filename | is the filename of auxiliary, temporary file where xyz data is joined. |
n_total | total number of saved points. It is incremented on every gwyscan_add_gwyddion_xyz() call. XXX: This is a lie. The value is never updated. |
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.
data | are the array data to save, this array should have xres * yres resolution. |
xres | is x resolution of the data array to save. |
yres | is y resolution of the data array to save. |
xreal | is physical dimension of the array to save in x direction, in xyunit . |
yreal | is physical dimension of the array to save in y direction, in xyunit . |
xyunit | is the basic SI unit of x and y range, e.g. "m" for meters. |
zunit | is the basic SI unit of the data, e.g. "m" for meters. |
description | is the channel description for Gwyddion file. |
filename | is the filename where to save data. |
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 | ||
) |
Saves multiple arrays having same pixel resolution and same physical range into a Gwyddion file.
Saves set of two dimensional arrays (represented as a single one-dimensional one) into a Gwyddion file, typically representing several channels obtained within a measurement. In contrast to gwyscan_save_gwyddion_arrays_general(), all the arrays must have the same pixel size and the same physical size.
nchannels
must be the same as number of items in xyunit
, zunit
and description
.data | is the array data to save, this array should have xres * yres * nchannels resolution. |
nchannels | is the number of channels. |
xres | is x resolution of the data arrays to save. |
yres | is y resolution of the data arrays to save. |
xreal | is physical dimension of the arrays to save in x direction, in xyunit . |
yreal | is physical dimension of the arrays to save in y direction, in xyunit . |
xyunit | is an array of the basic SI units of x and y range, e.g. "m" for meters. |
zunit | is an array of the basic SI units of the data, e.g. "m" for meters. |
description | is an array of the channel descriptions for Gwyddion file. |
filename | is the filename where to save data. |
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.
data
must be the same as number of items in xreal
yreal
.nchannels
must be the same as number of items in xyunit
, zunit
and description
.data | is array of pointers to one-dimensional arrays to save, this arrays should have xres [i] * yres [i] resolution for i-th channel. |
nchannels | is the number of channels. |
xres | is an array of x resolutions of the data arrays to save. |
yres | is an array of y resolutions of the data arrays to save. |
xreal | is an array of physical dimensions of the arrays to save in x direction, in xyunit . |
yreal | is an array of physical dimensions of the arrays to save in y direction, in xyunit . |
xyunit | is an array of strings of the basic SI units of x and y ranges, e.g. "m" for meters. |
zunit | is an array of strings of the the basic SI units of the data, e.g. "m" for meters. |
description | is an array of the channel description for Gwyddion file. |
filename | is the filename where to save data. |
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.
xypos | is xy positions, stored as interleaved arrays (x1, y1, x2, y2 ... xn, yn) of size 2*n. |
zdata | is measured values (height, error signal, etc.), 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 | is the number of channels. |
xres | is x resolution of the data array to save; information for Gwyddion, may be 100. |
yres | is y resolution of the data array to save; information for Gwyddion, may be 100. |
description | is the channel description for Gwyddion file. |
filename | is the filename where to save data. |