The following packages are required to run ASteCA: pandas, astropy, sciPy, numpy, matplotlib, and ptemcee. The emcee and corner.py packages are optional, although some functions and plots will not work without them.
We use the conda package and environment manager to install all the necessary dependencies to run ASteCA in an isolated Python environment. To install conda, follow these steps:
Go to https://conda.io/miniconda.html and download the appropriate version for your system. I recommend using the Python 3.x version and will assume in what follows that you are running a 64 bit Linux system.
$ bash Miniconda3-latest-Linux-x86_64.sh
Select yes when asked: Do you whish the installer to prepend the Miniconda3 install location to PATH in your ~/path?
Close and re-open your terminal window for the changes to take effect. Move inside the directory where you extracted the ASteCA package.
Create a virtual environment with the command
$ conda create --name asteca python=3.9.12 pandas=1.4.2 matplotlib=3.5.1 numpy=1.22.3 scipy=1.7.3 astropy=5.0.4
Activate the environment
$ conda activate asteca
(for Windows users the command is
$ activate asteca)
You can tell that the environment is activated because its name is now shown in the terminal before the
You need to activate this environment each time before attempting to run ASteCA, otherwise no installed packages will be detected.
Finally, install the (optional) emcee and corner packages with:
$ conda install -c conda-forge emcee $ python -m pip install corner
The latest packaged release must be downloaded from Github. After downloading, extract the compressed file wherever you want the code to exist. Alternatively the entire project can be cloned via git with (Linux command):
$ git clone https://github.com/asteca/ASteCA.git
which will create a sub-folder named
With the environment activated and the code uncompressed into its folder, you can run ASteCA with:
(asteca) $ python asteca.py
This will produce a first run of the code that should finish successfully in a few minutes.