INSTALLATION (Sep98) mscred INSTALLATION (Sep98) MSCRED: CCD MOSAIC REDUCTION PACKAGE Release Notes and Installation Instructions SUMMARY The MSCRED external package is used to reduce CCD mosaic data in which the data is in the mosaic MEF data format. In particular, this package is for data from the NOAO Mosaic Imager. RELEASE INFORMATION The following summary only highlights the major changes. There will also be minor changes and bug fixes. V3.2.1: Nov 1, 1999 MSCIMATCH was not correct when the zero level estimation was fixed by the SKYMEAN keywords. V3.2.1: September 3, 1999 MSCIMATCH had a bug that if iterative rejection was used (niterate>0) then a floating operand error would occur on some systems (Linux for one). MSCIMATCH also has a new parameter, "measured", that should be left blank for normal operation. If a file name is given and the file does not exist then the measurements used for the scale determinations will be written. If the file exists, say from a previous execution, the file will be read and the measurment step will be skipped. This is primarily for debugging but it potentially could be used to input photometry measurements obtained in some other way. V3.2: August 27, 1999 MSCCMATCH was modified to allow a slightly more general and appropriate solution for refraction distortions. MSCDISPLAY has a modified output showing the individual scaling factors and what is actually displayed. MSCTVMARK was fixed to correctly handle untrimmed data. This is the version to be used at KPNO and CTIO during observing for the fall semester. V3.1: June 17, 1999 MSCSTACK was fixed to correct problem with the WCS of the stacked image possibly being off depending on the order of the input images. V3.1: June 11, 1999 Changes were made to MSCCMATCH to fix a problem when data are binned; specifically the logical and physical coordinates are not the same. For most people there is no need to get this update. V3.1: June 8, 1999 MSCIMAGE would produce a finer pixel sampling if the input data was block averaged or observed with binning. This was changed so that the pixel sampling is similar between the input data and the resampled data. V3.1: June 3, 1999 Problems with MSCTVMARK, MSCZERO, and MSCTPEAK were fixed. The first two only affect data with binning or that have been trimmed by CCDPROC. MSCZERO would also produce wrong results after doing an 'm' to mark coordinates from a file. The latter now creates a coordinate database solution that can be directly applied with MSCSETWCS without having to edit the solution fields of the database. V3.1: May 1999 - RMFRINGE: New task to interactively remove a fringe image. - MSCSETWCS: New task to set WCS from astrometric database solution. - RMPUPIL: Parameter changes to skip initial automatic scaling if desired. - MSCEXAM: Fixed to work with data which has flips between extensions. - Fixed bug that would limit the number of MEF files that could be handled. V3.0: April 1999 The main areas of addition are: - Support for multiple amplifiers from the same CCD - Support for non-NOAO Mosaics - Bug fixes The new features are: - New task MSCPIXAREA to compute and apply pixel area correction from WCS. - New task MSCTVMARK to mark coordinates in MSCDISPLAY display. - New task MSCBLKAVG to block average mosaic data. This includes proper updating of RDNOISE, GAIN, CCDSUM, etc. - New task MSCSKYSUB to fit and subtract a sky surface in the single mosaic images produced by MSCIMAGE; i.e. remove gradients prior to stacking. The mean of the sky surface is not subtracted to keep the photon statistics roughly correct. - New default instrument translation file which can be used as a template for other sites. - CCDPROC now includes a crosstalk correction option. - MSCSTAT includes a global mode calculation. - MSCIMAGE uses the first extension as WCS reference if one is not given. - MSCRFITS/MSCWFITS aborts on a tape error. - RMPUPIL was improved to allow lists of images and some logging. - MSCIMATCH allows use of masks to exclude bad data and use of a SKYMEAN keyword constrain the relative zero level offsets while fitting the relative intensity scales. - Changes to CCDPROC to merge amplifiers from the same CCD into a single extension after processing. - Changes to CCDPROC to support relative flips between DATASEC and CCDSEC/DATASEC. - Changes to MSCDISPLAY to support relative flips between DATASEC and CCDSEC/DATASEC. Also to support binning. - Changes to MSCZERO adding an 'r' key to reload the display and 'm' to mark objects from an RA/DEC list. This uses new MSCTVMARK. - Change to CCDPROC to remove an error causing a string overflow in the expansion of the extensions. V2.0: September 1998 (requires IRAF V2.11.1) This version has many changes. It is the version intended to support the new NOAO Mosaic Imager with the science grade thin CCDs. This is the version used by observers at NOAO for the 1998 fall semester. - support for on-the-fly calibration during display - new tasks for dealing with the Mayall pupil image - mscdb is now a separate distribution outside of the mscred package - COMBINE can output a rejection mask showing which pixels in which images are rejected - CCDPROC has an optional output parameter - CCDPROC computes ccdmean value with sigma clipping - new faster and more sophisticated version of MSCIMATCH - SETINSTRUMENT is now organized by site and telescope - supports adding the IMMATCHX external package to allow sinc interpolation - new user's guide V1.1: February 1998 (requires IRAF V2.11.1) The software now uses the V2.11.1 "tnx" world coordinate system. This is a image header representation of a tangent plane projection plus non-linear distortion terms. This eliminates the need for the WCSSOL keyword to point to an external data file. The NOAO Mosaic Data Capture Agent will produce the new WCS during future observations. The software is backward compatible with the WCSSOL representation. MSCDISPLAY has a new parameter to allow display of a mosaic of separate images. V1.0: January 1998 New task MSCCMATCH matches (registers) the coordinate systems using a list of common coordinates. The WCS registration includes scale and rotation adjustments which correct for differences due to atmospheric refraction. New task MSCIMATCH intensity match individual constructed images for zero point and transparency based on photometry of common objects. A new task SFLATCOMBINE combines exposures to make a sky flat field. SFLATCOMBINE includes a new feature of COMBINE to provide a 2D rejection growing. MSCZERO has more keystrokes and was made more efficient for adjusting a set of exposures to a common WCS zero point. The MSCGUIDE was updated to this version. V0.2: November 1997 Improved MSCRFITS for quicker listing of tapes, new COMBINE that scales Mosaic images with the same scaling for all extensions, improved MSCZERO with '?' help, MSCEXAM now uses full database solution for world coordinates, new tasks MSCCMD, MSCARITH, and MSCSTAT. V0.1: September 1997 First user and mosaic developer evaluation version with minimal documentation. Requires V2.11. August 1997 A better prototype. This release requires V2.11 (or V2.11Beta + patch1). Help is skimpy. Only mscguide and imtextensions have help. November 1996 This is a prototype. INSTALLATION INSTRUCTIONS Installation of this external package consists of obtaining the files, creating a directory containing the package, compiling the executables or installing precompiled executables, and defining the environment to load and run the package. For NOAO Mosaic Imager data a separate instrument database distribution also needs to be installed. To use sinc interpolation with this package requires installation of the separate external package IMMATCHX (see ftp://iraf.noao.edu/iraf/extern/immatchx.readme). 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, and "linux" for most Linux systems. The IRAF architecture identifier is defined when you run IRAF. Start the CL and then type cl> show arch .ssun This 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. $ set def irafhlib # VMS example % cd $hlib # UNIX example Define the environment variables mscred and mscdb to be the pathnames to the mscred package root directory and the instrument database. The '$' character must be escaped in the VMS pathname and UNIX pathnames must be terminated with a '/'. Edit extern.pkg to include the following. reset mscred = usr\$1:[mscred] # VMS example reset mscred = usr\$1:[mscdb] # VMS example reset mscred = /local/mscred/ # UNIX example reset mscdb = /local/mscdb/ # UNIX example task mscred.pkg = mscred$mscred.cl Near the end of the hlib$extern.pkg file, update the definition of helpdb so it includes the mscred help database, copying the syntax already used in the string. Add this line before the line containing a closing quote: ,mscred$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 Unix pathnames must end with '/'. For example: % setenv mscred /local/mscred/ In your login.cl or loginuser.cl file make the following definitions somewhere before the "keep" statement. reset mscred = /local/mscred/ reset mscdb = /local/mscdb/ task mscred.pkg = mscred$mscred.cl printf ("reset helpdb=%s,mscred$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 mscred$ cl> mkdir mscdb$ cl> cd mscred [3] The package and instrument 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 instrument database distribution includes calibration files for the NOAO Mosaic Imager. For other instruments this file is not necessary though it can be used as a template for instrument files for your mosaic. Note that IRAF includes a tar reader. The tar file(s) are most commonly obtained via anonymous ftp. Below is an example from a Unix machine. cl> ftp iraf.noao.edu (140.252.1.1) login: anonymous password: [your email address] ftp> cd iraf/extern ftp> get mscred.readme ftp> binary ftp> get mscred.tar.Z ftp> get mscdb.tar.Z (optional) ftp> get mscred-bin..Z (optional) ftp> quit cl> !uncompress mscred.tar cl> !uncompress mscdb.tar (optional) cl> !uncompress mscred-bin. (optional) The readme file contains these instructions. The in the optional executable distribution is replaced by the IRAF architecture identification for your computer. At this time you might also get the files immatchx.readme and immatchx.tar.Z. This separate external package contains software which MSCRED can optionally use to provide sinc interpolation. Upon request the tar file(s) may be otained on tape for a service charge. In this case you would mount the tape use rtar to extract the tar files. [4] Extract the source files from the tar archive using 'rtar". cl> softools so> rtar -xrf mscred.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 sparc installation. cl> cd mscred cl> rtar -xrf mscred-bin.sparc # Creates bin.sparc directory If the instrument database files for the NOAO Mosaic have been obtained extract these. cl> move mscdb.tar.Z mscdb$ cl> cd mscdb cl> rtar -xf mscdb.tar The various tar files can be deleted once they have been successfully installed or the tape device can be freed. [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 mscred 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 mscred -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.