Installing HEASoft - MacInstructions for Source Code or Pre-Compiled Binary distributions
% conda install astropy numpy scipy matplotlib pip In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): % export PYTHON=$HOME/miniconda3/bin/python3 % setenv PYTHON $HOME/miniconda3/bin/python3 After the prerequisite packages have been installed, the next step is to configure the software. The safest way to ensure that the correct compilers are used by HEASoft is to employ the standard environment variables CC (C compiler), CXX (C++ compiler), FC (Fortran compiler), PERL (Perl interpreter), and PYTHON (Python interpreter). For example: In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): % export CC=/usr/bin/clang % setenv CC /usr/bin/clang % export CXX=/usr/bin/clang++ % setenv CXX /usr/bin/clang++ % export PERL=/usr/bin/perl % setenv PERL /usr/bin/perl % export FC=/opt/homebrew/bin/gfortran-12 % setenv FC /opt/homebrew/bin/gfortran-12 % export PYTHON=$HOME/miniconda3/bin/python3 % setenv PYTHON $HOME/miniconda3/bin/python3If these variables are not used, the HEASoft configure script will attempt to find the necessary items in one of the directories listed in your PATH environment variable, but success is not guaranteed. External packages (e.g. Anaconda) may set compiler or other flags in the environment which can negatively impact a HEASoft build, so Mac users are advised to unset any "FLAGS" or "alias" variables and to put the XCode /usr/bin at the front of their PATH (i.e. ahead of any third-party packages that may have inserted themselves into the PATH): In Bourne shell variants (bash/sh): % unset CFLAGS CXXFLAGS FFLAGS LDFLAGS build_alias host_alias % export PATH="/usr/bin:$PATH" In C-shell variants (tcsh/csh): % unsetenv *FLAGS build_alias host_alias % setenv PATH="/usr/bin:$PATH"Alternatively, users may alter their session to cancel any Anaconda or other package initialization by editing their profile or other shell resource files (.bashrc, .cshrc, etc.). Other software packages (e.g. XMM-SAS) may change your DYLD_LIBRARY_PATH environment variable, and this can break a HEASoft build, so you are advised to check your DYLD_LIBRARY_PATH variable and remove any paths that aren't necessary. Typically this variable can remain empty when configuring HEASoft. Before configuring HEASoft, note that you should commit to the location of the installed software prior to running the configure script. Once you have built the software, library paths are hard- coded into the executables, and they will not function correctly if relocated. Also please also note that the compiler settings described above will NOT pass to a sudo shell, so if you want to install HEASoft in a protected location (such as /usr/local), you should configure and build the software WITHOUT using sudo in a location writeable by you (e.g. your home directory), and use 'sudo' only when performing the final 'make install' step below. Next, configure the software, optionally capturing the screen output to a text file for reference as shown here: In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): cd heasoft-6.33.2/BUILD_DIR/ cd heasoft-6.33.2/BUILD_DIR/ ./configure > config.txt 2>&1 ./configure >& config.txtThe configure process may take several minutes to complete. If it is successful, the last line of screen output - or the last line in the "config.txt" file - should read "Finished". If it is not successful, do not proceed until any errors have been resolved. Check the HEASoft known issues page for aid, or contact the help desk. If the configure was successful, proceed to build the software, again optionally capturing the screen output to a text file for reference as shown here: In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): make > build.txt 2>&1 make >& build.txtThis process may take an hour or more to run, depending on your hardware and HEASoft download selections. If it is successful, the last line of output (in build.txt) should read "Finished make all". If it is not successful, do not proceed until any errors have been resolved. Check the HEASoft known issues page for aid, or contact the help desk. If 'make' was successful, proceed to install the software, again optionally capturing the screen output to a text file for reference as shown here: In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): make install > install.txt 2>&1 make install >& install.txtThis process may take 30-45 minutes to run, depending on your hardware and HEASoft download selections. If it is successful, the last line of output (in install.txt) should read "Finished make install". If it is not successful, do not proceed until any errors have been resolved. Check the HEASoft known issues page for aid, or contact the help desk. Please also note that if the Python wrappers (HEASoftPy) are being built as part of your download a network connection is required since the pip utility connects to a server to resolve dependencies. If the "configure" step was successful, you may proceed with initializing the software. The following are example commands which you will modify to be appropriate for your system: For users of Bourne Shell (sh, ash, ksh, bash, zsh): export HEADAS=/path/to/your/installed/heasoft-6.33.2/(PLATFORM) source $HEADAS/headas-init.sh For users of C Shell variants (csh, tcsh): setenv HEADAS /path/to/your/installed/heasoft-6.33.2/(PLATFORM) source $HEADAS/headas-init.cshIn these commands, "/path/to/your/installed" is a placeholder for the actual directory path on your system identifying the location in which you unpacked heasoft, and "(PLATFORM)" is a placeholder for the platform-specific string denoting the architecture of the pre-compiled binaries you chose, for example: aarch64-apple-darwin22.6.0The initialization is silent and only generates a message if there is an error. If it is successful, you may begin using the software. For example, type "fhelp ftools" to see a full listing of possible tools, or type "xspec" to start the Xspec spectral analysis program. Many HEASoft tasks require access to the CALDB, which is available separately from HEASoft. The simplest way to access the CALDB is remotely, assuming a good internet connection is available. Alternatively, the CALDB may be installed locally on your system. For guidance about removing a HEASoft installation from your system, please refer to our uninstall guide.
% conda install astropy numpy scipy matplotlib pip In Bourne shell variants (bash/sh/zsh): In C-shell variants (tcsh/csh): % export PYTHON=$HOME/miniconda3/bin/python3 % setenv PYTHON $HOME/miniconda3/bin/python3Users who prefer MacPorts may install the Python packages using the following: % sudo port install python3 py-astropy py-numpy py-scipy py-matplotlib py-pip After the prerequisite packages have been installed, the next step is to configure the software: cd heasoft-6.33.2/(PLATFORM)/BUILD_DIR/ ./configure (optionally capturing the screen output to a text file e.g., "config.txt")The configure process may take several minutes to complete. If it is successful, the last line of screen output - or the last line in the "config.txt" file - should read "Finished". If it is not successful, do not proceed until any errors have been resolved. Check the HEASoft known issues page for aid, or contact the help desk. If the configure script yields a message about a "Perl mismatch", you will either need to install HEASoft from the source code distribution, or install a version of Perl which matches that listed for your platform in our Perl reference. If the "configure" step was successful, you may proceed with initializing the software. The following are example commands which you will modify to be appropriate for your system: For users of Bourne Shell (sh, ash, ksh, bash, zsh): export HEADAS=/path/to/your/installed/heasoft-6.33.2/(PLATFORM) source $HEADAS/headas-init.sh For users of C Shell variants (csh, tcsh): setenv HEADAS /path/to/your/installed/heasoft-6.33.2/(PLATFORM) source $HEADAS/headas-init.cshIn these commands, "/path/to/your/installed" is a placeholder for the actual directory path on your system identifying the location in which you unpacked heasoft, and "(PLATFORM)" is a placeholder for the platform-specific string denoting the architecture of the pre-compiled binaries you chose, for example: x86_64-apple-darwin21.6.0The initialization is silent and only generates a message if there is an error. If it is successful, you may begin using the software. For example, type "fhelp ftools" to see a full listing of possible tools, or type "xspec" to start the Xspec spectral analysis program. Many HEASoft tasks require access to the CALDB, which is available separately from HEASoft. The simplest way to access the CALDB is remotely, assuming a good internet connection is available. Alternatively, the CALDB may be installed locally on your system. For guidance about removing a HEASoft installation from your system, please refer to our uninstall guide. HEASoft / FTOOLS Help Desk If FTOOLS has been useful in your research, please reference this site (https://heasarc.gsfc.nasa.gov/ftools) and use the ASCL reference for HEASoft [ascl:1408.004] or the ASCL reference for the original FTOOLs paper [ascl:9912.002]: Blackburn, J. K. 1995, in ASP Conf. Ser., Vol. 77, Astronomical Data Analysis Software and Systems IV, ed. R. A. Shaw, H. E. Payne, and J. J. E. Hayes (San Francisco: ASP), 367. Web page maintained by: Bryan K. Irby HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public Last modified: Friday, 03-May-2024 11:27:14 EDT |