/BasicATLAS

Python wrapper for ATLAS-9/SYNTHE

Primary LanguageDIGITAL Command Language

BasicATLAS

This project is a simple Python wrapper for the ATLAS LTE stellar modelling code by Robert L Kurucz as well as satellite utilities including the spectral synthesis library SYNTHE and opacity distribution (ODF) calculator DFSYNTHE. Refer to the literature references below:

Also see the websites of Robert L Kurucz and Fiorella Castelli.

ATLAS 9 and ATLAS 12 differ in the opacity sampling method (opacity distribution functions vs direct sampling) which results in the former being considerably faster and, in principle, somewhat less accurate although (to my understanding) the significance of the uncertainty introduced by the chosen opacity treatment is not well established. BasicATLAS works with ATLAS 9 (support for ATLAS 12 may be added in the future).

If you are using BasicATLAS in your research, please cite Larkin et al. (2022)

Contributors

  • Roman Gerasimov (University of California San Diego)
  • Mikaela Larkin (University of California San Diego)
  • Tianxing Zhou (University of California San Diego)
  • Philipp Edelmann (Los Alamos National Laboratory) @ AAS 242 Hack Together
  • Paul Barrett (George Washington University) @ AAS 242 Hack Together
  • Efrain Alvarado (University of California San Diego)

Installation

(see OS-specific notes below)

This repository does not contain the source code of ATLAS or any of the required data files (e.g. line lists). Both must be downloaded from the websites listed above. A download script is provided using wget that works at the time of writing (10/21/2022). A test script is provided to ensure that all the necessary files are present and have correct MD5 checksums.

After cloning the repository, confirm that both GNU and Intel Fortran compilers are available in your environment.

$ ifort --version
ifort (IFORT) 2021.3.0 20210609
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

$ gfortran --version
GNU Fortran (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

In the directory of the repository, first run the download script to fetch all data files and missing source code:

source download.com

The download involves multiple gigabytes of data and may take a few minutes. Please check that no errors are reported in the process. When the download completes, compile all Fortran source code with:

source compile.com

The script will also carry out a few necessary rearrangements ("repacking") of line lists and some source code patching.

Finally, run the test script to make sure the installation was successful:

python test.py

The test is clean if no output is produced.

Examples

MacOS Installation

In order to use Intel Fortran, both the oneAPI Base Toolkit and the oneAPI HPC Toolkit will need to be installed first.

After following the installation steps, the toolkits will need to be initialized using:

. /opt/intel/oneapi/setvars.sh

Homebrew can be used to install GNU Fortran and wget:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gcc
brew install wget

Proceed with regular download and compilation from here.

Windows Installation

While all programs can be compiled natively on Windows, it is recommended to use the Ubuntu environment instead, available at the Microsoft Store. To install Intel compilers in your Ubuntu environment (courtesy of Somajit):

  1. curl -Lo- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
  2. sudo tee /etc/apt/sources.list.d/oneAPI.list <<< "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main"
  3. sudo apt update
  4. sudo apt install intel-oneapi-compiler-fortran
  5. Optional: sudo apt install intel-oneapi-mkl
  6. In ~/.bashrc: source /opt/intel/oneapi/setvars.sh > /dev/null

Proceed with regular download and compilation from here.