ureka and pyraf 101 - gemini observatory · operations working group ― hilo/la serena ― august...
TRANSCRIPT
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Ureka and PyRAF 101Kathleen Labrie
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Ureka Installation
The download and instructions are located at: http://ssb.stsci.edu/ureka/1.5.1/
• Right-click on “installer”, then chose “save link as” or “download linked file as”.
• Run the installer in a console
• sh install_ureka_1.5.1
Note: To right-click on Mac, you might need to press the Control key.
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Ureka Installation
• Use defaults
• Takes a long time. (Downloads, unpacks, installs.)
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Activating Ureka
• Close the terminal.
• Start a new one. (To ensure that the new configurations are picked up.)
• Type “ur_setup”
• Check that PyRAF gets picked up
• which pyraf
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Activating Ureka
• Added by Ureka installer
• Added by me, so that I don’t have to type ur_setup every time.
Screenshot of account’s .bash_profile file
Note: Once ur_setup is run, the machine’s default Python is overridden. Now Ureka’s Python and modules will be the default for this session.
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
IRAF Setup
cd ~
mkdir iraf
cd iraf
mkiraf
IRAF is installed by Ureka, but you still need to configure your account, just like you would if installing IRAF yourself. This is not Ureka-specific.
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
Use the Software
• Start IRAF: Type “cl”, just like before
• Start PyRAF: Type “pyraf”
• Start Python: Type “python”
• etc. Ureka does not change anything, it just installs everything.
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
PyRAF
• PyRAF is just different interface to IRAF, a different theme or look-and-feel. It is IRAF underneath. (There additional functionalities.)
• One can use IRAF from PyRAF the same way as from CL.
• There are a handful of minor differences that are usually easy to adapt to. (See table on next slides.)
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
IRAF vs PyRAF
IRAF PyRAFMust start CL from ~/iraf or where the login.cl is located.
Can start PyRAF from anywhere as long as there is a login.cl in ~/iraf.
To launch IRAF: % cl
To launch PyRAF: % pyraf
Load packages: cl> gemini ge> gmos
Load packages: --> gemini --> gmos
Show tasks in package, show parameters, edit parameters: gm> ? gm> lpar gprepare gm> epar gprepare
Show tasks in package, show parameters, edit parameters: --> ? --> lpar gprepare --> epar gprepare
The only difference is that the epar window is graphical instead of terminal-based. One could use “tpar” for a terminal-based interface in PyRAF.
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
IRAF vs PyRAF
IRAF PyRAFRunning a task: gm> gprepare N20120212S0072.fits gm> imstat N20120212S0072.fits[sci,1]
Running a task: --> gprepare N20120212S0072.fits --> imstat N20120212S0072.fits[sci,1]
Delete a file: gm> del N20080808S0008.fits
Delete a file: --> delete N20080808S0008.fits
This is because “del” is a Python function and will be interpreted as such rather than being the short version of IRAF delete.
Inline arithmetics: cl> =2+2
Inline arithmetics: --> 2+2
Navigation: cl> e cl> e gprepare
Navigation: <up-arrow> <ctrl-r> gprepare
Thursday, August 27, 15
Kathleen LabrieOperations Working Group ― Hilo/La Serena ― August 17-18, 2015
IRAF vs PyRAF
IRAF PyRAF
For loops on the command line: cl> for (i=38; i<=41; i=+1) { >>> imstat(‘N20181010S0000+i) >>>}
For loops on the command line: --> for i in range(38, 42): ... im = ‘N20181010S%04d’ % i ... iraf.imstat(im) <return>
The for-loops are Python loops. That is probably the most drastic change going from IRAF to PyRAF.
To exit IRAF: cl> logout
To exit PyRAF: --> .exit
Runs CL scripts and SPP binaries. Runs CL scripts and SPP binaries.Runs Python scripts and statements (like the Python shell).
Thursday, August 27, 15