minor updates and bug fixes in angle scan processing and data explorer

This commit is contained in:
2019-02-10 14:31:06 +01:00
parent b2f4816629
commit 3235d52212
6 changed files with 594 additions and 36 deletions

View File

@ -79,7 +79,7 @@ static function init_package()
string /g s_reduction_params = "" // recently used reduction parameters
string /g s_preview_pvs = "" // semicolon-separated list of EPICS PVs to display in preview.
// the list items can contain wildcards for StringMatch
s_preview_pvs = "*OP:CURRENT*;*Stats*Total*;*CADC*"
s_preview_pvs = "*OP:CURRENT*;*Stats*Total*;*KEITHLEY*READOUT;*CADC*"
// non-persistent strings and variables
string /g s_preview_file = "" // file or folder name of the current preview
@ -392,6 +392,25 @@ static function /wave preview_hdf_file(filename)
return preview_image
end
/// load the preview of a general ITX file.
///
/// the function is designed for PEARL OTF and EPICS scan data converted from MDA files.
/// the function picks the first wave whose PV note matches one from the global string s_preview_pvs
/// (see @ref preview_datafolder and @ref init_package).
///
/// the preview is loaded to the preview_image wave in the pearl_explorer data folder.
/// the s_file_info string is updated with information about the scan dimensions.
///
/// @note: the ITX files should load their waves into the current data folder (a "free" data folder).
/// some early versions of PEARL ITX data files created a data folder of their own.
/// both ways are allowed, while the first one is preferred.
/// on return, the current data folder must point to either the original free folder or the newly created one.
///
/// @param filename name of a file in the directory specified by the pearl_explorer_filepath path object.
///
/// @return wave reference of the preview trace.
/// empty wave reference if the function failed.
///
static function /wave preview_itx_file(filename)
string filename
@ -401,10 +420,6 @@ static function /wave preview_itx_file(filename)
svar s_preview_source
wave preview_image
// note: some versions of PEARL data files save data to a new data folder,
// and leave the newly created folder as the current folder.
// the free data folder is used by those files which don't create their own data folder.
// this is the new recommended behaviour
dfref dataDF = newfreedatafolder()
setdatafolder dataDF
LoadWave /t/p=pearl_explorer_filepath/q filename