The function Save saves the particles in the file specified by FName. The parameter DataID can be used to store a unique data id along with the particle data. This id can be used to check, whether the currently loaded data and the particle data are compatible. Hint: one possible strategy could be to store the filename of the datafile as an ID.
The RefSpectra parameter specifies the full path of a reference file which contains reference spectra that can be used to compare the particle spectra to the corresponding references. Storing the reference information allows you to load the corresponding reference spectra when loading the particle data.
The function returns the following error codes:
0 ... everything is OK, the particle data have been stored successfully
-1 ... the file cannot be written