INSTALLATION (Oct99) spectime INSTALLATION (Oct99) SPECTIME: SPECTRAL EXPOSURE TIME CALCULATOR Release Notes and Installation Instructions SUMMARY The SPECTIME external package provides a spectral exposure time calculation engine, SPTIME, that is driven by database files describing the various components of a spectroscopic system. SPTIME can be used directly or with different user interfaces for specific spectrographs. These include IRAF scripts and a web interface. RELEASE INFORMATION The following summary only highlights the major changes. V2.1: March 3, 2003 Shuffle sky subtraction added. CGIPARSE task included for writing CGI callable IRAF scripts. V2.0: August 15, 2001 Major revisions to the parameters and the way parameters are handled. Some highlights are: - tables can be either files or numbers - all parameters are in the parameter sets - IR support includes thermal background V1.2: June 13, 2001 Added "units" parameter to allow different dispersion units, IR bands, and added a parameter to the filter table to override order overlap message. The output was changed so that transmisions of 1 are not reported. V1.1: February 11, 2000 Added E and R parameters to SPTIME to allow applying a reddening to the spectrum. V1.0: October 20, 1999 This is the first release. INSTALLATION INSTRUCTIONS Installation of this external package consists of obtaining the files, creating a directory to contain the package, compiling the executables or installing precompiled executables, and defining the environment to load and run the package. In addition a separate database directory is defined to contain scripts and component files. The database for the NOAO spectrographs is available as an example or for use. The package may be installed for a site or as a personal installation. If you need help with these installation instructions contact iraf@noao.edu or call the IRAF HOTLINE at 520-318-8160. [arch] In the following steps you will need to know the IRAF architecture identifier for your IRAF installation. This identifier is similar to the host operating system type. The identifiers are things like "ssun" for Solaris, "alpha" for Dec Alpha, "linux" or "redhat" for most Linux systems. The IRAF architecture identifier is defined when you run IRAF. Start the CL and then type cl> show arch .ssun The is the value you need to know is without the leading '.'; i.e. the IRAF architecture is "ssun" in the above example. [1-site] If you are installing the package for site use login as IRAF and edit the IRAF file defining the packages. % vi $hlib/extern.pkg Define the variables spectime and spectimedb to be the pathnames to the spectime package root directory and the database directory. Pathnames ust be terminated with '$' (for IRAF logical directories) or '/'. Adde the following to the file (the path is an example). reset spectime = /local/spectime/ reset spectimedb = /local/spectimedb/ task spectime.pkg = spectime$spectime.cl Near the end of the hlib$extern.pkg file, update the definition of helpdb so it includes the spectime help database, copying the syntax already used in the string. Add this line before the line containing a closing quote: ,spectime$lib/helpdb.mip\ [1-personal] If you are installing the package for personal use define a host environment variable with the pathname of the directory where the package will be located (needed in order to build the package from the source code). Note that must end with '/'. For example: % setenv spectime /mydir/spectime/ In your login.cl or loginuser.cl file make the following definitions somewhere before the "keep" statement. reset spectime = /mydir/spectime/ reset mscdb = /mydir/spectimedb/ task spectime.pkg = spectime$spectime.cl printf ("reset helpdb=%s,spectime$lib/helpdb.mip\nkeep\n", envget("helpdb")) | cl flpr If you will be compiling the package, as opposed to installing a binary distribution, then you need to define various environment variables. The following is for Unix/csh which is the main supported environment. # Example % setenv iraf /iraf/iraf/ # Path to IRAF root (example) % source $iraf/unix/hlib/irafuser.csh # Define rest of environment % setenv IRAFARCH ssun # IRAF architecture where you need to supply the appropriate path to the IRAF installation root in the first step and the IRAF architecture identifier for your machine in the last step. [2] Login into IRAF. Create a directory to contain the package files and the instrument database files. These directory should be outside the standard IRAF directory tree. cl> mkdir spectime$ cl> mkdir spectimedb$ cl> cd spectime [3] The package and configuration database are distributed as tar archives for the sources and, as an optional convenience, a tar archive of the executables for select host computers. The configuration database distribution contains files for NOAO. For other spectrographs and sites this file is not necessary though it can be used as a template. Note that IRAF includes a tar reader. The tar file(s) are most commonly obtained via anonymous ftp. Below is an example. cl> ftp iraf.noao.edu (140.252.1.1) login: anonymous password: [your email address] ftp> cd iraf/extern ftp> get spectime.readme ftp> binary ftp> get spectime.tar.Z ftp> get noaospectime.tar.Z (optional) ftp> get spectime-bin..Z (optional) ftp> quit cl> !uncompress spectime.tar cl> !uncompress spectimedb.tar (optional) cl> !uncompress spectime-bin. (optional) The readme file contains these instructions. The in the optional executable distribution is replaced by the IRAF architecture identification for your computer. Upon request the tar file(s) may be otained on physical media for a service charge. [4] Extract the source files from the tar archive using 'rtar". cl> softools so> rtar -xrf spectime.tar so> bye On some systems, an error message will appear ("Copy 'bin.generic' to './bin fails") which can be ignored. Also on VMS systems, the various bin.'mach' directories created by rtar can be deleted. UNIX sites should leave the symbolic link 'bin' in the package root directory pointing to 'bin.generic' but can delete any of the bin. directories that won't be used. If there is no binary directory for the system you are installing it will be created when the package is compiled later. If the binary executables have been obtained these are now extracted into the appropriate bin. directory. # Example of ssun (solaris) installation. cl> cd spectime cl> rtar -xrf spectime-bin.ssun # Creates bin.ssun directory If the database files for NOAO have been obtained extract these. cl> move spectimedb.tar.Z spectimedb$ cl> cd spectimedb cl> rtar -xf spectimedb.tar The various tar files can be deleted once they have been successfully installed. [5] For a source installation you now have to build the package executable(s). First you configure the package for the particular architecture. cl> cd spectime cl> mkpkg # Substitute sparc, ssun, alpha, etc. This will change the bin link from bin.generic to bin.. The binary directory will be created if not present. If an error occurs in setting the architecture then you may need to add an entry to the file "mkpkg". Just follow the examples in the file. To create the executables and move them to the binary directory cl> mkpkg -p spectime -p tables # build executables cl> mkpkg generic # optionally restore generic setting Check for errors. If the executables are not moved to the binary directory then step [1] to define the path for the package was not done correctly. The last step restores the package to a generic configuration. This is not necessary if you will only have one architecture for the package. This should complete the installation. You can now load the package and begin testing and use.