Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save yucelkilic/d472148947b3f075f007975d26697c30 to your computer and use it in GitHub Desktop.

Select an option

Save yucelkilic/d472148947b3f075f007975d26697c30 to your computer and use it in GitHub Desktop.
IRAF (V2.16.1+ snapshot) installation on macOS Mojave (10.14.6)
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# IRAF (V2.16.1+ snapshot) installation on macOS Mojave (10.14.6)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I have been looking for time to make a smooth and clean IRAF installation. That’s when it came, and I wanted to note here how I installed the latest version of IRAF (NOAO/IRAF community V2.16.1+ snapshot) from [GitHub](https://github.com/iraf-community/iraf) on my computer. I hope it will help someone."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In fact, everything is explained in detail [here](https://github.com/iraf-community/iraf/blob/master/INSTALL.md), and I took advantage of it."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The usual way is to install IRAF under the root directory “**/iraf/iraf**“, but I didn’t do that. So I didn’t need system administrator rights for installation. I installed directly under my **$HOME** directory.\n",
"\n",
"[XQuartz](https://www.xquartz.org/) and [ds9](http://ds9.si.edu/site/Home.html) must be installed on your system. You can find them on their website: download and install.\n",
"\n",
"In the Mojave version of macOS, ds9 may fail. Therefore, I recommend that you use version 8.1b2 until this error is corrected (please see and check the last announcements: https://twitter.com/SAOImageDS9/status/1161031804695896064).\n",
"\n",
"First, let’s go to the **$HOME** directory and clone the latest version/commit of IRAF from [GitHub](https://github.com/iraf-community/iraf). Then let’s rename the folder as “**iraf_root**” (of course this is my choice)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```bash\n",
"$ cd\n",
"\n",
"$ git clone https://github.com/iraf-community/iraf.git\n",
"\n",
"$ mv iraf iraf_root\n",
"\n",
"$ cd iraf_root\n",
"\n",
"$ chmod +x install\n",
"\n",
"$ ./install\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Press “enter” at each step to complete the installation and then define the directory where our binary files will be stored.\n",
"\n",
"Now you can configure the system for the proper [architecture and build](https://github.com/iraf-community/iraf/blob/master/INSTALL.md):"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```bash\n",
"$ make macintel\n",
"\n",
"$ make sysgen 2>&1 | tee build.log\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This part will take longer. Please wait patiently. Then, you can check whether a successful installation has been performed with the command below.\n",
"\n",
"Now we need to install **x11iraf**. Without this we won’t be able to run **xgterm**."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```bash\n",
"$ cd ~/iraf_root/vendor/\n",
"\n",
"$ mkdir x11iraf\n",
"\n",
"$ cd x11iraf\n",
"\n",
"$ wget http://iraf.noao.edu/x11iraf/x11iraf-v2.0BETA-bin.macintel.tar.gz\n",
"\n",
"$ tar -xvf x11iraf-v2.0BETA-bin.macintel.tar.gz\n",
"\n",
"$ rm -rf x11iraf-v2.0BETA-bin.macintel.tar.gz\n",
"\n",
"$ sudo nano /etc/paths\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The latest command is to define **x11iraf binary** to the system terminal environments. In the editing section that opens, **add the following line to the bottom**."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```bash\n",
"/Users/USERNAME/iraf_root/vendor/x11iraf/bin.macintel\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Hit **control-x** to quit. Enter “**Y**” to save the modified buffer. To test it, in a new terminal window, type:\n",
"\n",
"For more detailed explanation please visit [here](https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/).\n",
"\n",
"And it’s over!\n",
"\n",
"After that, you can create a directory if you want to work comfortably."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```bash\n",
"$ cd\n",
"\n",
"$ mkdir iraf_playground\n",
"\n",
"$ cd iraf_playground\n",
"\n",
"$ mkiraf\n",
"\n",
"$ xgterm &\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"IRAF is now ready to run in the xgterm window!\n",
"\n",
"Open **ds9** and try the following commands to test.\n",
"\n",
"After this, you should use iraf without problems. If you have issues, please write/comment to me or directly to https://github.com/iraf-community/iraf/issues.\n",
"\n",
"**Reference:** http://yucelkilic.com/irafv2_16_1_snapshot_installation_on_macos_mojave_10_14_6/"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment