Preparation#

1. Clone the repository#

cd <PathToGitClone>
git clone https://github.com/hbahk/TAOTutorials.git

2. Software installations#

2.1 Python packages#

  1. Create a new conda environment (optional)

conda create -n tao python numpy scipy pandas jupyter
conda activate tao
  1. Install packages via conda

conda install -c conda-forge astropy sep tqdm
conda install -c conda-forge photutils
conda install -c astropy ccdproc astroscrappy specutils
  1. Install package via Github repositories

cd <PathToGitClone> 
git clone https://github.com/jrjohansson/version_information.git && git clone https://github.com/astropy/astroquery.git && git clone https://github.com/ejeschke/ginga.git && git clone https://github.com/quatrope/astroalign
cd version_information && pip install -e . && cd ..
cd astroquery && git pull && pip install -e . && cd ..
cd ginga && git pull && pip install -e . && cd .. 
cd astroalign && git pull && pip install -e . && cd .. 
  1. Set the python path of your own kernels/editors with this environments

2.2 Source Extractor#

  • For Linux (or Window) users, please refer to the official documentation: Installing the software.

    For Ubuntu users, for example, simple command will do:

    sudo apt-get install sextractor
    
  • For Mac users, using Homebrew is easiest way, I suppose.

    brew install sextractor
    

    If you don’t have Homebrew intalled yet, then give that a try!

  • You can check whether SExtractor is installed or not with the command of:

    sex
    

    Or if you installed with the apt-get (and other possible distributors) then try

    sextractor
    

    or

    source-extractor
    

Tip

You can also install SExtractor with conda:

conda install -c conda-forge astromatic-sextractor

2.3. PSF Extractor#

  • For Linux (or Window) users, please refer to the official documentation: Installing the software. For Ubuntu users, for example, executing simple command will install this software:

    sudo apt-get install psfex
    
  • For Mac users (Tested with Apple M1 Pro Ventura 13.2.1),

    cd <PathToGitClone>
    git clone https://github.com/astromatic/psfex.git
    

    Check whether required packages are installed: autoconf, automake, libtool.

    brew info autoconf
    brew info automake
    brew info libtool
    

    If you are missing one of them, then install with the command brew install <MissingPackage>.

    Then

    cd psfex
    ./autogen.sh
    

    Check the result and find the pathes of lib and include directory of the OpenBLAS package. You can find their location with command of brew info openblas, if you installed OpenBLAS with Homebrew, which should be the case when you installed SExtractor with Homebrew. Similarly, find lib and include for FFTW, and then try

    ./configure --disable-silent-rules --enable-openblas --with-openblas-libdir="/opt/homebrew/opt/openblas/lib" --with-openblas-incdir="/opt/homebrew/opt/openblas/include" --with-fftw-libdir="/opt/homebrew/opt/fftw/lib" --with-fftw-incdir="/opt/homebrew/opt/fftw/include"
    

    Here you should put the libdir and incdir with your own pathes.

    Finally,

    sudo make install
    

    and now you are all set.

Tip

You can also install PSFEx with conda:

conda install -c conda-forge astromatic-psfex

although I have not tested this.

1.2.4. GALFIT#

Installing GALFIT is an easy task. You can download the compiled execution file from the official website: GALFIT Homepage. Select your operating system and download the file. Then, you can run the program by putting the file in your path, or directly run the program in the directory where the file is located.