#pragma TextEncoding = "UTF-8"
#pragma rtGlobals=3		// Use modern global access method and strict wave access.
#pragma IgorVersion = 6.1
#pragma ModuleName = PearlArpes
#pragma version = 1.06
#include "pearl-area-display" // 2D and 3D data visualization
#include "pearl-area-profiles" // data processing for multi-dimensional datasets
#include "pearl-area-import" // import data files generated by area detector software
#include "pearl-pshell-import"
#include "pearl-compat" // compatibility with igor 6
#include "pearl-data-explorer" // preview and import panel for PEARL data
#include "pearl-anglescan-process" // angle scan (XPD) processing functions
#include "pearl-anglescan-panel" // panel interface to angle scan processing
#include "pearl-anglescan-tracker" // live preview of hemispherical angle scan
#include "pearl-scienta-preprocess" // pre-processing functions for Scienta detector images
#include "pearl-elog"
#include "pearl-scilog"
#if exists("pvOpen")
#include "pearl-area-live" // live view of area detector
#include "pearl-epics" // EPICS access under Igor
#include "pearl-arpes-scans" // run ARPES scans under Igor
#include "pearl-sample-tracker" // live tracking and adjustment of sample position
#include "pearl-scienta-live"
#endif

/// @file
/// @brief data acquisition and analysis package for ARPES at PEARL.
///
/// this procedure defines the PEARL ARPES package
/// the main purpose of this file is to load the necessary dependent procedures
/// (see the include statements at the top)
///
/// @pre
/// * HDF5 XOP must be loaded.
/// * on-line data acquisition functionality requires the EPICS XOP to be loaded
///
/// @author matthias muntwiler, matthias.muntwiler@psi.ch
///
/// @copyright 2012-18 Paul Scherrer Institut @n
/// Licensed under the Apache License, Version 2.0 (the "License"); @n
///   you may not use this file except in compliance with the License. @n
///   You may obtain a copy of the License at
///   http://www.apache.org/licenses/LICENSE-2.0

/// @namespace PearlArpes
/// @brief data acquisition and analysis package for ARPES at PEARL.
///
/// PearlArpes is declared in @ref pearl-arpes.ipf.
///

/// @defgroup ArpesPackage ARPES package
/// @brief data acquisition and analysis package for ARPES at PEARL.
///
/// The purpose of a package is to load a bunch of dependent procedure files.
/// The ARPES package loads the following files
/// which are helpful when working with ARPES data
/// (any data from the Scienta analyser, that is) from PEARL.
///
/// * pearl-area-import.ipf
/// * pearl-area-display.ipf
/// * pearl-area-profiles.ipf
/// * pearl-data-explorer.ipf
/// * pearl-scienta-preprocess.ipf
/// * pearl-anglescan-process.ipf
/// * pearl-anglescan-panel.ipf
/// * pearl-anglescan-tracker.ipf
/// * pearl-elog.ipf
///
/// Most of these files require the HDF5.XOP.
/// The following files are loaded if the EPICS.XOP is present:
///
/// * pearl-area-live.ipf
/// * pearl-epics.ipf
/// * pearl-arpes-scans.ipf
/// * pearl-sample-tracker.ipf
///

/// initializes package data once when the procedure is first loaded
static function AfterCompiledHook()

	dfref savefolder = GetDataFolderDFR()

	return 0
end

function UnloadPearlArpesPackage()
	execute /p/q/z "DELETEINCLUDE \"pearl-arpes\""
	execute /p/q/z "COMPILEPROCEDURES "
end
