Parallelization
In order to use the parallelization option of the interface, the user might increase the stack size for OpenMP by adding the following lines to the .bashrc (or .bash_profile) file:
ulimit -s unlimited export KMP_STACKSIZE='3999M' export OMP_STACKSIZE='3999M' export GOMP_STACKSIZE='3999M'
Please note, if more or less RAM is available, please increase/decrease the value "3999" to a value useful for your machine.
Start XCLASS within CASA:
Start XCLASS without CASA:
Please note, using the XCLASS interface without CASA requires the installation of the following python packages: numpy (version 1.11.1 or newer), scipy (version 0.17.0 or newer), pyfits (version 3.3 or newer) (astropy, version 0.4.2 or newer)), matplotlib (version 1.5.3 or newer) and sqlite3 (version 2.6.0 or newer). Additionally, without CASA the new XCLASS functions can be used as python subroutines. So, it is necessary to define the input parameters in the right order. Therefore, the descriptions of the new functions contain the descriptions of the subroutine calls in python as well.
In order to use the XCLASS interface without CASA, it is necessary to extend the python sys.path environment variable. It is recommended to describe the path of the XCLASS installation by defining the XCLASSRootDir environment variable in the .bashrc (or .bash_profile) file:
export XCLASSRootDir="path-to-XCLASS"
In the following python example, the sys.path variable is extended and the MAGIX function is executed.
#!/usr/bin/python # -*- coding: utf-8 -*- # import sys package import sys # get environment variable for XCLASS root directory XCLASSRootDir = str(os.environ.get('XCLASSRootDir', '')) XCLASSRootDir = XCLASSRootDir.strip() if (XCLASSRootDir != ""): NewModulesPaths = [XCLASSRootDir + "/build_tasks/"] else: # use the following line to define XCLASS root directory manually NewModulesPath = "path-of-XCLASS-Interface/build_tasks/" # extend sys.path variable already_included_flag = False for entries in sys.path: if (entries == NewModulesPath): already_included_flag = True break if (not already_included_flag): sys.path.append(NewModulesPath) # import MAGIX package import task_MAGIX # define parameters for MAGIX MAGIXExpXML = "Reflectance_Data.xml" MAGIXInstanceXML = "parameters.xml" MAGIXFitXML = "algorithm-settings.xml" MAGIXRegXML = "Generalized_Drude-Lorentz__sym__freq-damping+Rp.xml" MAGIXOption = "" # start MAGIX function task_MAGIX.MAGIX(MAGIXExpXML, MAGIXInstanceXML, MAGIXFitXML, MAGIXRegXML, MAGIXOption)