The function Load reads particle data which have been stored by the method Save. The parameter FName specifies the filename of the particle data. The variable parameter DataID returns the unique data identifier which has been defined when saving the data. This parameter can be used to ensure that the loaded particle data are compatible to the currently loaded data.
The variable parameters SizeX and SizeY specify the lateral size (in pixel) of the current datacube. Particle data can only be loaded if the size of the current datacube and the particle data match. Thus, you have to pass the lateral sizes (in pixels) of the currently loaded datacube when calling the function. In the case of a mismatch, an error is returned (error code -2) and the two parameters are set to the size of the particle data.
On return the variable parameter RefSpectra will contain the path to the corresponding reference spectra (see Save for details).
The function returns the following error codes:
0 ... everything is OK, data has been loaded successfully
-1 ... (undefined)
-2 ... the size of stored particle data does not match SizeX/SizeY
-3 ... the file FName does not exist or the file is broken