Preparation#
1. Clone the repository#
cd <PathToGitClone>
git clone https://github.com/hbahk/TAOTutorials.git
2. Software installations#
2.1 Python packages#
Useful links
SNU_AOclass/00-3_Prepare_Python.md at master · ysBach/SNU_AOclass · GitHub
SNU_AOclass/00-1_Softwares.md at master · ysBach/SNU_AOclass · GitHub
Create a new conda environment (optional)
conda create -n tao python numpy scipy pandas jupyter
conda activate tao
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
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 ..
Set the python path of your own kernels/editors with this environments
For Spyder users
For Spyder users, install spyder-kernels for your version of Spyder following the table in this link Common Illnesses — Spyder 5 documentation. In my case, the version of my Spyder is 5.2.2, so I had to install spyder-kernels=2.2.1.
conda install spyder‑kernels=2.2.1
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 trysextractor
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
libandincludedirectory of theOpenBLASpackage. You can find their location with command ofbrew info openblas, if you installedOpenBLASwith Homebrew, which should be the case when you installed SExtractor with Homebrew. Similarly, findlibandincludeforFFTW, 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
libdirandincdirwith 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.