PDS_VERSION_ID = PDS3 RECORD_TYPE = STREAM OBJECT = TEXT PUBLICATION_DATE = 2001-07-13 NOTE = " Niscal 5.01 Manual " END_OBJECT = TEXT END |---------------------------| | USING NISCAL VERSION 5.01 | |---------------------------| 1 NISCAL installation notes: Software and Calibration Files ------------------------------------------------------------ 1.1 Files you should have - - - - - - - - - - - - - MANUAL.TXT - this file *.PRO - Niscal IDL procedures (will go into ./lib_idl/) - will go into ./lib_idl/ *.DAT - NIS calibration data tables from this volume - read DOCUMENT/DOCINFO.TXT to find them - these will go into ./lib_tables/ 1.2 Installing Niscal - - - - - - - - - - - - - - - - - - This assumes you have IDL installed on your Unix(tm) computer. The IDL procedures are set up to run in a different filestructure than PDS archive structure. Find and/or install the IDL Astronomy Library Programs (see 2.1.2 below). Create a Niscal source directory. Place the Niscal IDL procedures *.PRO under the Niscal source directory in subdirectory ./lib_idl/. Place the Niscal tables from from *.DAT under the Niscal source directory in subdirectory ./lib_tables/. Set your IDL_PATH environment variable to include the location of the Niscal IDL procedures, as well as the location of the IDL Astronomy Library Programs. Set your NIS_CALB environment variable to the Niscal source directory. Ensure the specification ends contains a final slash (/). For example, if your shell is tcsh or csh, edit your Unix ~/.cshrc to have lines like this in it (assumes you have already defined IDL_PATH for IDL and the Astronomy Library Programs): setenv NIS_CALB '/project/near/ST/NIS/zen/nis_cal/' # N.B. final / setenv IDL_PATH ${NIS_CALB}/lib_idl:$IDL_PATH This implies: - the Niscal source directory is /project/near/ST/NIS/zen/nis_cal/ - Niscal IDL procedures are in /project/near/ST/NIS/zen/nis_cal/lib_idl/ - Niscal tables are in /project/near/ST/NIS/zen/nis_cal/lib_tables/ See your system administrator if you use another shell or have problems with this installation. 2 Manual for Niscal -------------------- 2.1 Before you start - - - - - - - - - - - 2.1.1 Know your source directory - - - - - - - - - - - - Make sure your source directory is defined in your .cshrc. If you can't do that, you can define the sourcedir as a keyword sourcedir=*** when you call Niscal. Make sure the path contains a final slash. e.g. '/dir1/dir2/dir3/' 2.1.2 Have the relevant IDL Astronomy Library Programs - - - - - - - - - - - - - - - - - - - Many of the FITS reading procedures and a number of other necessary procedures are found in the IDL Astronomy User's Library. The library is accessible/downloadable from these places: Web site: http://idlastro.gsfc.nasa.gov/homepage.html FTP site: http://idlastro.gsfc.nasa.gov/ftp/ Niscal uses the library from May, 1998, with most routines in the library dating from Sept. 1997. 2.1.3 Know your configuration file - - - - - - - - - - - - The configuration file defines the parameters that will be passed to nis_proc. It includes a list of filenames, associated bracketing darks, if any, and other calibration parameters: ----------.conf file begins-------- ## This is a NISCAL v5.0 Modify the params in first column only ## See relevant nis_cal procedures for parameter descriptions ## e.g. niscal.pro internal documentation /project/near/SDC/Daily/NIS/NIS_FITS.001/2000/044/ ###INDIR /project/near/ST/NIS/products/G/GA/GA5.0/ ###OUTDIR /project/near/ST/NIS/products/G/GA/GAseqs.lis ###RAW_NIS_FILELIST /project/near/ST/NIS/products/G/GA/GAseqs.lis ###RAW_NIS_DARKLIST 4 ###NISCAL1=CalibrationMode(0-5) 0 ###NISCAL2=DarkMode(0-8) 0 ###NISCAL3=NoiseMode(0-1) 4 ###NISCAL4=RadMode(0-1) 1 ###NISCAL6=VERBOSE (0-1) ----------.conf file ends---------- Words after ## are comments. Niscal reads in the conf file, parses out the fileneames, then iteratively executes nis_proc until the list is finished. Configuration files should be edited and saved to make Niscal do what you want.Changes to the conf file should preserve the data/ comment structure as that enables the program to read and parse the file. 2.1.4 Know your data file lists - - - - - - - - - - - - Create a file list of raw NIS files. If using separated darks, create one list for data and one for darks. The configuration file points to these. 2.2 Running niscal.pro - - - - - - - - - - - - In IDL: niscal, SOURCEDIR='/source/dir/', CFILE='/dir/conf_file' At the idl prompt type niscal. If your source directory is not the default, then you can enter a new one here. If you know the configuration file, enter it as conf_file = 'zzz.conf'. If you do not enter a configuration file, a pickfile widget will appear to help you navigate to one. Make sure you have permissions to write files at your chosen output directory destination. 2.3 Outputs - - - - - - Output files - several MET-coded FITS files may result from processing xxx.000 = pre-formatted FITS file for calibrated data. No processing, just adding placeholders for derived data such as noise and pointing/ position. These files are removed by Niscal at the end of a run using the nis_clean procedure. xxx.rdf = uncalibrated spectra file. Spectra divided by exposure time, (DN), converted to floating point. xxx.dks = spectra with darks subtracted, (DN). xxx.dko = dark only file - dark spectra separated and saved(DN). xxx.cdn = calibrated DN (corrected for temp, xtalk, mirror position); if this is a cal target observation this includes the photometric correction. xxx.rad = Radiance. Takes .cdn data and applies DN to radiance conversion xxx.iof = Radiance converted to Radiance Factor (I/F). 2.4 Command line Niscal: nis_proc.pro - - - - - - - - - - - - - - - - - - - Alternatively, a command line driven call of nis_proc directly is possible. At IDL prompt, type this command, filling in the modes and other info. 2.5 Guts of Niscal - - - - - - - - - - The Niscal sub procedures are copiously documented, so the internal workings should be relatively easy to follow if you choose to open them up. A "flowchart" of Niscal operation follows. Different cal_modes and toggles will dictate the actual path: niscal nis_clean readcol nis_proc sstrr nis_fits_format readfits sxaddpar fxaddpar sxdelpar writefits sstrr readfits nis_c_metfind nis_c_div sxpar nis_c_dark sxpar eprop_sumdif sstrr sxaddpar fxaddpar writefits OR nis_c_darkspace sxpar nis_c_back OR nis_c_back_tight OR nis_c_DMV AND nis_c_darkspace (as above plus) sxpar eprop_sumdif nis_c_gain eprop_div nis_c_cross eprop_mult eprop_div eprop_sumdif nis_c_mirror OR nis_c_darksep sxpar readfits nis_c_div eprop_sumdif nis_c_gain eprop_div nis_c_cross eprop_mult eprop_div eprop_sumdif bis_c_mirror nis_c_phot (IF Caltarget obs) nis_c_rad nis_c_iof sxpar nis_c_ecor sxpar nis_c_write sxaddpar fxaddpar sstrr writefits 3 Known problems & deficiencies ------------------------------ 3.1 SPICE - - - - - Spice updating is not supported by Niscal. 3.2 Compatibility - - - - - - - - - Niscal is written in IDL to reduce cross-platform compatibility problems. That's it for the manual. Follow the directions, and everything should work, in theory. In theory, theory and practice are the same. In practice they are not. ============================================================================== Direct Contributors to the Niscal software effort: -------------------------------------------------- Noam Izenberg APL Jim Bell Cornell Dennis Wellnitz Maryland Ray Sterner APL Jeff Warren APL Wen Jong Shyong APL Brian Carcich Cornell Patrick Martin Cornell Scott Murchie APL Lucy McFadden Maryland Indirect Contributors (e.g. involved in MSICAL, a template for Niscal): ------------------------------------------------------------------------- Mark Robinson Northwestern Univ. Rick Adair MSSS Ernest Cisneros USGS Pat Murphy APL