ZG CGIS-VMS.BCK CGIS-VMS.BCK,BACKUP/BLOCK=2048 [...] [-]CGIS-VMS.BCK/SAVE WEILAND  h eV6.2 _BORNEO::  _BORNEO$DKB400: V6.2  w*[COBE_IDL]AACGIS_IDL.TXT;1+,X .$/ h 4$ s- 0123KPWO%56ㄛ7ㄛ89G hHJ COBE Data Analysis Software ___________________________ This software library contains well documented tools written specifically for the analysis of data from the Cosmic Background Explorer (COBE) satellite. Data I/O, analysis and display tools are included. Examples of additional data I/O routines can be found in Appendices of the COBE instrument Explanatory Supplements. These and other relevant documents are available from the COBE web site: http://www.gsfc.nasa.gov/astro/cobe General information about reading the COBE data sets can be found in the COBE Guest Investigator Support Software User's Guide. Most of the software is coded in the Interactive Data Language (IDL). The code has been tested in UNIX, VMS, OpenVMS, OSF1 and PC/WINDOWS environments. Installation instructions are given below. Please note that the cgis@zwicky.gsfc.nasa.gov e-mail address mentioned in the software documentation is no longer valid. Contact information and additional information about the COBE Data Analysis J CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$Software can be found on the Web at: http://www.gsfc.nasa.gov/astro/cobe/cgis.html This software package was developed by NASA's Goddard Space Flight Center under the guidance of the COBE Science Working Group. Caveats: ________ The COBE software is written for IDL versions 4.0 or higher; the highest tested version as of this release is 5.1. Problems likely will result if IDL versions earlier than 4.0 are used. ***IMPORTANT*** In order to use the COBE IDL analysis software, the IDL Astronomy User's Library (see http://idlastro.gsfc.nasa.gov/homepage.html ) must also be installed in your IDL pathway. The data ingest routines (e.g., TBGET and TBINFO) may not work properly if your copy of the Astronomy User's Library is older than August 1997. While the code has been tested on a wide variety of platforms, we cannot guarantee that the programs will run in your particular computing environment. Due to resource constraints, we are able to provide only a modest amount of personal assistance. FILES IN THIS DIRECTORY _______________________ 1. Listing of IDL Routines Online help is available for the entire software package. The file ONELINER.HLP is a listing of the high-level routines in the library; it documents only the routines in the UIDL directory as these are the main analysis routines. Information about subroutines called by the main programs can be found in the prologues of the calling routines. These prologues give complete information about calling sequences, variable types, etc. A separM( CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$xSate file called UIMAGE_HELP.DAT describes the UIMAGE functionality and is intended to be used for the on-line help rather than as a listing. UIMAGE and the directory structure are described below. 2. IDL Source Code The IDL routines (i.e., the .PRO files) are the actual data analysis routines. The STARTUP.PRO routine will need to be edited, as described below, to conform to your platform. The IDL routines are organized in 6 subdirectories, which appear under a top level COBE software directory. a) Top level files: These define the IDL environment. b) QUIDL: This directory contains all the command line data I/O, analysis and display tools. c) QUIMAGE: This directory contains a menu driven analysis package specifically designed for COBE data, providing a user friendly interface to the routines found in UIDL. The package has extensive on-line help and includes a number of standard image analysis capabilities, such as arithmetic, smoothing, zooming, reprojection, plotting, and modeling (e.g., dipole, background, polynomial, blackbody...). UIMAGE can be used to read all of the COBE data sets, and can read and write both FITS files and IDL save sets. It allows the user to switch conveniently to the IDL command line in order to perform customized analyses that are not included in the UIMAGE menus. NOTE: the UIMAGE package only works with data in quadrilateralized spherical cube prun` CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$_ ojection, and in a supported quad-cube resolution. d) QEXEC, QUTIL: These directories contain various low level routines used to support the UIMAGE package. e) QLUT: This directory contains routines that create lookup tables used to reproject the data, and the tables themselves when they are created (see below). f) QHELP: This directory contains both routines and text files relating to the online help facility, UHELP. The text files are meant to be viewed through the help facility. 3. IDL Initialization files The initialization files are uidl.csh (UNIX) uidl.com (VMS) sample.ini (WINDOWS) When executed, these scripts start IDL with the COBE analysis routines linked. These files define the essential logicals and paths. They serve as templates that must be edited to reflect your computing environment according to the installation procedure given below. 4. Lookup Table Generators Three files are provided in the QLUT directory: buildlut.unix buildlut.vms buildlut.pcw When executed, these IDL routines generate coordinate lookup tables used by the map reprojection routines. 5. C Source Routines Use of these routines is optional, since every C module has a corresponding IDL routine with the same functionality. However, the C routines are faster and use memory more efficiently. The installation procedure given below tells how to link the C routines to the COBE IDL library. A header file (export_wrap.h) is included in all of the C routines. fi CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$3 This file, in turn, includes the IDL export.h file and does some system checking. Six "make" files (make.sun, make.solaris, make.vms, make.osf1, make.irix, and make.alpha) are provided to facilitate compilation of the C code. INSTALLATION PROCEDURE (See section below for PC Windows Installation) ______________________ 1. Compile the C routines. This step is optional but highly recommended for the most efficient use of IDL for COBE analysis. Ten C routines must be compiled. The export.h file was significantly changed in IDL version 4.0; the file export_wrap.h (in the top level directory) was updated accordingly. If you are running an older version of IDL, un-comment the following line in export_wrap.h (i.e., remove the leading /* and trailing */): #include "cobe_obs.h" The export.h file was previously changed in IDL version 3.5 to add definitions of LONG and ULONG. If you are running an older version, such as IDL v3.0, edit the file export_wrap.h and uncomment the following two lines: typedef long int LONG; typedef unsigned long int ULONG; As mentioned above, "make" files are included for compiling the C routines. These files must be edited to reflect your particular installation with regard to pathways and compiler (e.g. Gnu-C, VAX-C, OSF1-C, or SunOs-C). Compilation on other UNIX machines, e.g. IBM AIX, may require modifications of the compiler flags in the make.sun file. Consult the IDL User's Guide and the IDL Advanced Development Guide for refer.$b CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$,ences on compiling the C routines. Once you have made the necessary changes run the appropriate make file to build the executables or shareable images, e.g. make -f make.osf1 (unix command) @make.vms (vms command) In order to help you understand the "make" files, several examples are given, showing how one of the C routines, CCONV.C, is compiled on various platforms. In the first example, the GNU C Compiler is used in a VMS environment: a) Create file called cconv.opt containing: idl_dir:[000000]idl/share gnu_cc:[000000]gcclib/lib universal=cconv sys$share:vaxcrtl/share b) Enter DCL commands: $gcc/include=IDL_DIR:[source] cconv (this assumes the IDL file export.h is in IDL_DIR:[source]) $link/share cconv,cconv.opt/opt Example 2 pertains to an OpenVMS (Dec Alpha) system using VAX C: a) Create file called cconv.opt containing: idl_dir:[bin_alpha]idl/share (this assumes the IDL executable is in idl_dir:[bin_alpha]) symbol_vector=(cconv=PROCEDURE) b) Enter DCL commands: $cc/include=IDL_DIR:[source]/standard=vaxc/float=d_float cconv (this assumes the IDL file export.h is in IDL_DIR:[source]) $link/share cconv,cconv.opt/opt Example 3 pertains to a UNIX (SunOS) system using the native compiler: a) Enter the SunOS comm7 CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$ ands: %cc -pic -fsingle -I/idl/source -c cconv.c (this assumes the IDL file export.h is in /idl/source) %ld -o cconv.so -shared -assert pure-text -lm cconv.o Finally, here is a second UNIX example, for the Sun Solaris operating system: a) Enter the Solaris commands: %cc -Kpic -fsingle -I/idl/source -c cconv.c (this assumes the IDL file export.h is in /idl/source) %ld -o cconv.so -G -assert pure-text -lm cconv.o 2. Edit uidl.com (VMS) or uidl.csh (UNIX) The most important logicals defined by these files are: CGIS_DATA - location of the projection look up tables #CGIS_IDL# - (VMS) top level, location of IDL, C source code CSRC ($CSRC) - (UNIX) top level, location of IDL, C source code CGIS_FITS - default FITS file directory CGIS_CISS - default IDL save set directory Edit the appropriate lines to reflect the directory structure on your system. NOTE: The file UIDL.COM assumes that the top level IDL source code is located in the logical IDL_DIR. If this is not true then either change the logical throughout the file or define IDL_DIR. The file UIDL.CSH assumes the standard installation of IDL 5.0 (i.e., the location of IDL is in /usr/local/rsi/idl_5). If this is not true, you'll need to make the appropriate changes. 3. Edit STARTUP.PRO This IDL routine defines various startup parameters for IDL, including system variables, user defined startup commands an4 CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$;5d the call to IDL linkimage for the C routines. The following instructions are platform dependent and sensitive to different "flavors" of UNIX. Select one of the following three lines of code according to whether your environment is VMS, OSF1 or UNIX ;@$CSRC/link_unix.pro ;unix ;@$CSRC/link_osf1.pro ;alpha osf1 @CGIS$IDL:LINK_VMS.PRO ;vms by commenting out (using a preceding semicolon) those that do not apply. This call assumes that the computer supports IDL linkimage. If the code is on a machine that does not support IDL linkimage (e.g., Ultrix) then all three lines should be commented out; this will cause the (much slower) IDL versions of the C routines to be executed instead of the C routines themselves. A second pair of lines should also be edited according to the operating system. Place a semicolon in front of one of the following lines to deselect the inapplicable option: ;@$USER_START ;unix @USER_START ;vms The file USER_START reflects the user's personal IDL startup file. This is defined in the initialization file. Lastly, a set of lines can be included for the optional DIRBE C library, a data I/O library that must be obtained separately from the COBE software anonFTP site: ftp://rosette.gsfc.nasa.gov/pub/cobe-gi/ 4. Edit LINK_UNIX.PRO, LINK_OSF1.PRO, or LINK_VMS.PRO This IDL routine performs the actual linking of the C routines to IDL. In the "linkimage" call, the /PATH must be edited to reflect the proper   CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$pathway, similarly to the logical $CSRC, as defined in uidl.csh. For the VMS file, LINK_VMS, you should change the variable #CGIS_IDL# to reflect the path, as was done in uidl.com. 5. VMS Users - Edit INITWEX.PRO in the QEXEC directory. This IDL routine defines the help path for UIDL routines. Edit the file and replace everywhere #CGIS_IDL# with the top level location of the CGIS software: e.g. #CGIS_IDL# --> idl_dir:[lib.cgis If you have installed this package elsewhere, please edit the appropriate line as necessary. 6. Execute uidl.com (VMS) or uidl.csh (UNIX) This will cause IDL to start up, with (almost) all of the COBE routines ready for use. Once inside IDL access to the UIMAGE package is obtained by entering: UIDL> uimage at the command line. 7. Execute buildlut.vms (VMS) or buildlut.unix (UNIX) from within IDL This IDL command procedure will build the projection (AITOFF, Global Sinusoidal, and Mollweide) look up tables. As these are machine specific, two files are provided, BUILDLUT.VMS and BUILDLUT.UNIX. The IDL command @buildlut.unix (or .vms, as appropriate) will create these large (40 MB) files. Make sure that the files are located in the directory specified by the CGIS_DATA pointer that you edited in step 2. Step 7 will only need to be executed once (ever) to create the files. Upon completion of the installation, you will be able to enter IDL from your operating system command line by executing uidl.com (VMS) or uidl.csh (UNIX), and the COBE 3SG CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$F analysis routines will be available. PC WINDOWS INSTALLATION _______________________ 1. Copy files onto disk. If the files are in .ZIP format then the following command must be used to create the directory structure described above (assuming the top level IDL is in c:\rsi\idl_5 and this software is installed in a sub-directory named cgis): pkunzip.exe -d cobe-pc.zip c:\rsi\idl_5\cgis 2. C routines The C routines have not been validated on the PC. Therefore they will not be discussed here. 3. Edit IDL.INI This file contains the main definitions for setting up the IDL environment on the PC. The most important logicals defined by this file are: PATH - the complete path for IDL and the COBE software STARTUP - the startup file for IDL DIR - the top level IDL directory An example IDL.INI file is included, namely SAMPLE.INI. Edit your local IDL.INI file, adding the definitions given in our SAMPLE.INI, but reflecting your local pathways. 4. Edit PSTARTUP.PRO This IDL routine defines various startup parameters for IDL, including system variables and user defined startup commands. Like the IDL.INI file, PSTARTUP.PRO should be edited and made to reflect the pathways used on your system. The most important logicals are: CGIS_DATA - location of the projection look up tables CGIS_FITS - default FITS file directory CGIS_CISS - default IDL save set directory HOME - top level IDL directory .run files - sp ɜ#X  [COBE_IDL]AACGIS_IDL.TXT;1$J Lk) Sr*6j!/kkcB0,U[,_/~Q>8'io1c)fOchkuupUL{JvtWpk4#p@2W#9i ! v:c)J6}c/%uZeT N9$}7V$y~'b9.g0&v'EG=JOe(*fjh%l*"I*i*O*# YBOa|L?n0>e2-Oi *|aP9:~T _8s Cs;WqcQ+[,!\D!.#Or/ ]1p2Wqr)yZ< AEUH %c^2*cHNY6};qUf^)y&q2X2fo5 [GU&m WPhNA^)v`Z4OFFJM-{i5wKD6(o3D^w3TTV``\::j CU~W2irD Az7P%--DL<'z)V2!81to8ZmdoPG:VH@![[3) h0CAIBB4z3kAkKyz$`V>WS>JjwoeA7 hePy;{&V< <7j:7)/!m% vZ8JGL|q[86iOZJ`Pimpq}ZI)Q4)$G+x`j g5kr fLv`(yhlM{KR1'f,N#("Tjm}ArSSU L >`fPqR^QcBg_f*`_ w$)7qNxQjuO},Wx8O&}<]FC=wU$[ %JBV \_ l:'I30g?D33*Eq9K_)1~SiBZofuE*\  ^nIg38JD5xd!G9 QHX3l(s2k&kDR9l9(.I2K(oO$\/cGSj!);e>ORv f!IlaiMslN?(.}\8#0#=|f0+2NU?ta)y}C*N/9-fmF$x6 $lh=}>uVxkW&8PpZ/~|686}jdSc;51iTX= #4Xy-DR'!izX7#2}Apt |*wNX(b q}a=tYoo&HO#UTT/YcRc/)]^!PEGOCf*xfVh)u-i-x^PCJ[~3 l4quX9Gn + CGIS-VMS.BCKX  [COBE_IDL]AACGIS_IDL.TXT;1$Iecify path to reflect particular setup 5. Edit QEXEC\INITWEX.PRO This IDL routine defines the help path for UIDL routines. For the windows platform this pathway is hardcoded to: c:\rsi\idl_5\cgis If you have installed this package elsewhere, please edit the appropriate line as necessary. 6. Startup IDL Startup IDL in the WINDOWS environment. This will cause IDL to start with (almost) all the COBE routines ready for use. 7. Execute buildlut.pcw from within IDL This IDL command procedure will build the projection look up tables, each of which is about 40 MB in size. Note: this will create 6 "large" (1024x768) projection files which may not be usable on a PC screen. If space is a concern these can be deleted. This step need only be executed once (ever) to create the files. Thereafter, you need only enter IDL from your operating system command line (or ICON) and the COBE analysis routines will be available. To run an IDL command procedure enter: UIDL> @buildlut.pcw 8. Once inside IDL access to the UIMAGE package is obtained be entering: UIDL> uimage at the command line.  #q CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1Z*[COBE_IDL]ADT2ZULU.C;1+,Y ./ h 4c- 0123KPWO56bnY7bnY89G hHJ/*;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@COBECL.DNET.NASA.GOV.*/ /**************************************= CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1}************************************** /* MODULE: Adt2zulu.c FUNCTION: This program converts ADT times to ZULU format (YYDDDHHMMSSSSS). It is called by the IDL time conversion facility, TIMECONV. It is passed three arrays, the LONGword array containing the ADT times, the STRING array returning the ZULU times, and the return status array. AUTHOR: J.M. Gales (Applied Research Corp) DATE: 4/92 SPR 9687 This routine, called by IDL time conversion rou- tines, is linked to IDL with the Dataserver (UFC) MODIFICATION HISTORY: DATE SPR/SER PROGRAMMER DESCRIPTION ---- ------- ---------- ----------- 11/9/92 10212 Gales Renamed from ADT2ZULU_C 12/10/92 10337 Gales Suppress seconds roundup when sec >= 59.9995 s 01/05/93 10418 Gales Change times counter from short int to IDL_LONG 02/12/93 11468 Newmark Change to compile under VAX and Sun C not GNU C 03/94 11614 Dan Grogan Changed "export.h" to "export_wrap.h" for IDL 3.0+ Add IDL_STRING* cast in IDL_StrStore() 09/95 Newmark Upgrade to IDL 4.0 COMMAND LINE ARGUMENT: ADT time, zulu time (returned) return status (returned) RETURN: None FUNCTIONS CALLED: c_subx (internal) c_ediv (internal) *****dA CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1c**************************************************************************/ #include #include #include "export_wrap.h" void adt2zulu(argc,argv) int argc; IDL_VPTR argv[]; { IDL_ULONG base_time[2] ; /* # of intervals to 01-JAN-1985 */ IDL_ULONG num_sec_n[2]; /* # of intervals in non-leap year */ IDL_ULONG num_sec_l[2] ; /* # of intervals in leap year */ IDL_ULONG sec_in_dy[2] ; /* # of intervals in day */ IDL_ULONG sec_in_hr[2] ; /* # of intervals in hour */ IDL_ULONG sec_in_mn[2]; /* # of intervals in minute */ IDL_ULONG quot[2], sec_rem[2], sec_rem0[2], sec_in_yr[2]; int i, temp_len; int yr, dy, hr, mn, leap, d_of_y; IDL_LONG sec, n_times, k; char borrow; char time_str[13]; char temp[6], u_str[17], yr_str[5]; IDL_ULONG bin_time[2]; char zulu_time[17]; short istat; /* IDL pointer IDL_VARIABLEs */ short *i_ptr; IDL_ULONG *bin_ptr; IDL_VARIABLE *retdat; char *zulu; IDL_STRING *oupt; base_time[0] = 154632192l; base_time[1] = 9266898l; num_sec_n[0] = 2026291200l; num_sec_n[1] = 73425l; num_sec_l[0] = -1557102592l; num_sec_l[1] = 73626l; sec_in_dy[0] = 711573504l; sec_in_dy[1] = 201l; sec_in_hr[0] = 1640261632l; sec_in_hr[1] = 8l; sec_in_mn[0] = 600000000l; sec_in_mn[1] = 0l; bin_ptr = (IDL_ULONG *) argv[0]->value.arr->data; /* get pointer to ADT times */ i_ptr = (short *) argv[2]->value.arr->data; /* get pointer to return status array */ n_times = (IDL_LONG) argv[2]->value.arr->n_elts; /* get number of AD݊ CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1= T times from status array */ zulu = &zulu_time[0]; /* assign zulu pointer to zulu_time work array */ oupt = (IDL_STRING *) IDL_MakeTempArray(IDL_TYP_STRING, argv[2]->value.arr->n_dim, argv[2]->value.arr->dim, IDL_BARR_INI_NOP, &retdat); /* allocate space for zulu return array using info from status array */ IDL_VarCopy(retdat,argv[1]); /* pass pointer to 2nd argument */ for (k=0; k<=n_times-1; ++k) /* loop through all times */ { istat = 0; bin_time[0] = *bin_ptr++; bin_time[1] = *bin_ptr++; /* initialize status get both words of ADT times */ c_subx(bin_time,base_time,sec_rem,2,&borrow); /* subtract base time */ if (borrow == 1) { strcpy(zulu_time,"0000000000000000"); istat = -1; printf("Binary time before 01-JAN-1985"); /* ADT time before base time */ /* set return time to all zeros */ /* set return status to bad & exit */ } else { for (yr=1985; yr<=9999; ++yr) { leap = 0; if (yr % 4 == 0) {leap = -1;} if (yr % 100 == 0) {leap = -0;} if (yr % 400 == 0) {leap = -1;} if (leap == -1) { sec_in_yr[0] = num_sec_l[0]; sec_in_yr[1] = num_sec_l[1]; } else { sec_in_yr[0] = num_sec_n[0]; sec_in_yr[1] = num_sec_n[1]; } /* decide whether leap year or not get corresponding secs in year */ c_subx(sec_rem,sec_in_yr,sec_rem0,2,&borrow); /* subtract year intervals */ if (borrow == 0) { sec_rem[0] = sec_rem0[0]; sec_rem[1] = sec_rem0[1]; } else { sprintf(yr_str,"%d",yrJ)D CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1 ); /* write yr as STRING */ goto days; } } /* endfor */ days: c_ediv(sec_rem,sec_in_dy,quot,sec_rem); /* divide remaining intervals by intervals per day */ strcpy(time_str,"000000000000"); /* initialize time STRING with '0' fill */ d_of_y = quot[0] + 1; sprintf(temp,"%d",d_of_y); /* convert int to STRING */ temp_len = strlen(temp); /* get length of STRING */ for (i=0; i<=temp_len-1; ++i) { time_str[i+3-temp_len] = temp[i]; } /* copy to time STRING padded with leading zeros */ c_ediv(sec_rem,sec_in_hr,quot,sec_rem); /* divide remaining intervals by intervals per hour */ hr = quot[0]; sprintf(temp,"%d",hr); temp_len = strlen(temp); for (i=0; i<=temp_len-1; ++i) { time_str[i+5-temp_len] = temp[i]; } c_ediv(sec_rem,sec_in_mn,quot,sec_rem); /* divide remaining intervals by intervals per minute */ mn = quot[0]; sprintf(temp,"%d",mn); temp_len = strlen(temp); for (i=0; i<=temp_len-1; ++i) { time_str[i+7-temp_len] = temp[i]; } if (sec_rem[0] < 599995000l) sec_rem[0] = sec_rem[0] + 5000; /* if within a half millisecond of 60 sec then don't add roundup */ sec = sec_rem[0] / 10000l; sprintf(temp,"%d",sec); temp_len = strlen(temp); for (i=0; i<=temp_len-1; ++i) { time_str[i+12-temp_len] = temp[i]; } strcpy(u_str,yr_str); /* copy yr_str to u_str */ strcat(u_str,time_str); /* concatonate STRINGs */ strcpy(zulu_time,u_str); /* copy u_str to zulu time */ } /* end else */ *i_ptr++ = istat; /* store status */3 CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1N IDL_StrStore((IDL_STRING *)oupt,zulu); /* store zulu time in return array */ oupt++; /* increment STRING output pointer */ } /* end main loop */ return; } c_ediv(a,b,quot,rem) /* ; NAME: ; c_ediv ; ; PURPOSE: ; Performs quadword integer division ; ; INPUT: ; dividend - quadword (2 dim LONGword array) ; divisor - quadword (2 dim LONGword array) ; ; OUTPUT: ; quotient - quadword (2 dim LONGword array) ; remainder - quadword (2 dim LONGword array) ; ; SUBROUTINES CALLED: ; c_subx ; ; REVISION HISTORY ; J.M. Gales ; Feb 92 Initial Release ;- */ IDL_ULONG a[], b[], quot[], rem[]; { IDL_ULONG a0[2], b0[2], mask; int i, j, bit, bit0; int first_1; char brw_bit; bit0=0; a0[0] = a[0]; a0[1] = a[1]; b0[0] = b[0]; b0[1] = b[1]; quot[0] = 0; quot[1] = 0; /* initialize quotient */ if ((b[0] == 0) && (b[1] == 0)) { printf("Division by zero"); rem[0] = a[0]; rem[1] = a[1]; return; } /* division by zero return dividend as remainder */ if (a[1] < b[1]) { rem[0] = a[0]; rem[1] = a[1]; return; } /* dividend less than divisor return dividend as remainder */ if ((a[1] == 0) && (b[1] == 0)) { quot[0] = a[0] / b[0]; rem[0] = a[0] - quot[0]*b[0]; rem[1] = 0; return; } /* standard LONGword division */ /* ----------------------- start quadword division ----------------------- */ /* Find first nonzero bit in dividend starting from left */ first_1 = 31; mask = 0x80000000; &) CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1; while ((a0[1] & mask) != mask) /*while not found*/ { first_1 = first_1 - 1; /* decrement bit */ mask = mask >> 1; /* build new mask */ } /* Shift divisor to left until first nonzero bits align */ while ((b0[1] & mask) != mask) { b0[1] = b0[1] << 1; b0[1] = b0[1] + ((b0[0] & 0x80000000) >> 31); b0[0] = b0[0] << 1; /* quadword shift left 1 bit */ bit0 = bit0 + 1; /* increment bit counter */ } for (i=bit0; i>=0; --i) { j = i / 32; /*get LONGword index*/ bit = i % 32; /*get bit number within LONGword*/ c_subx(a0,b0,rem,2,&brw_bit); /*subtract shifted divisor from remaining dividend*/ if (brw_bit == 0) /* if a0 > b0 */ { a0[0] = rem[0]; a0[1] = rem[1]; /*new remaining dividend*/ quot[j] = quot[j] + (1l << bit); /* set bit in quotient */ } b0[0] = b0[0] >> 1; b0[0] = b0[0] + ((b0[1] & 1) << 31); b0[1] = b0[1] >> 1; /* shift 'divisor' right one bit */ } /* endfor */ rem[0] = a0[0]; rem[1] = a0[1]; /* get final remainder */ return; } c_subx(a, b, c, n, borrow_bit) int n; IDL_ULONG a[],b[],c[]; char *borrow_bit; { int i; IDL_ULONG a0[2]; char borrow[20]; for (i=0; i<=19; ++i) borrow[i]=0; a0[0] = a[0]; a0[1] = a[1]; for (i=0; i<=n-1; ++i) { if (a0[i] == 0) {borrow[i+1] = borrow[i];} /* propogate borrow bit if 0 in minuend */ a0[i] = a0[i] - borrow[i]; /* subtract borrow bit for minuend */ if (a0[i] < b[i]) {borrow[i+1] = 1;} /* set borrow bit if subtrahend greater than minuend */ c[i]˚ CGIS-VMS.BCKY  [COBE_IDL]ADT2ZULU.C;1 = a0[i] - b[i]; /* calculate difference */ } /* endfor */ *borrow_bit = borrow[n]; return; } *[COBE_IDL]AUXSTART.PRO;1+,Z . / h 4 4- 0123KPWO 56^Gm7^Gm89G hHJ; ; Place commands that should be run only if the user did not specify ; an IDL_Startup file. ; ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent plac Fj CGIS-VMS.BCKZ  [COBE_IDL]AUXSTART.PRO;1 e in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL]CCONV.C;1+,[ .$/ h 4$!u- 0123KPWO%56]Mr[7]Mr[89G hHJ\2 j|ce;1-K _))J/n+5Q FRlKm*e ]*TYRV o\v@V \(< eHjOr9Npp!;;HuzQggB>E#y];_cv]i8bYGbd] 3hcoGUB[t@O;j^EQ+Cz0@2%3hF[quv^bCue[Íd,@ gK: ;8?T6L9aRo.x.GVr~~P= :M41N7z+V@m)jyA*&#+jo*_Z HhFBH)aM5 i@$JV87mP50(@}'?g5SCTy2DS9B k@KwpQS,EO6svmv'}u{ ( A1cWC RM2mJ\Xxx$ Q SpZ6j hyQ8""1u~8-/5.668ejYP;D'X(:9Ok& eF2dPFWOA0pF^uM3%w|t4]B<_\3`rAJQs}K#BWgw:,^"YSrz/^rYdmAdp+#I-gfXU})f3H$iirr*ji6=7'< JRrapR$Pl#B CU;\*?4JX?L D3[`530r+tz"&{+7rnu vK qf>+z6#Yqr_%yY^&]<* =yQQX\mI\T iJ!6' RjdGc b>QZyGz:@$0XHq"7r9zs 5(2;;elg)PF\-`lrLV[q7!DUi_KoujnMY1k`##@{.Y $qqal 2E-w%/LAO4K&P \$]@jGhCO-eh9_^[HLsitHu.+cG$_bBpbUc'630]NPJM aF-OhHE1{h4vF*})r!0pnZIBwMvqL7G#FzrS(: :h"o9/$Vsoi'&[q1HC1 !I Y3 RaQDTv_BY0yX#t+\gLLc(AayvguI K>u:- Mr?L-e.)]\Vly!tX# S~:dl@d/oS-i aip_%L bE]FTWBl)EG< tgW[uKjnDZ/p "V9$lw"rGwkYu"L\Bl-Q#]=Rr.##wo|j~C'TK?]O& hYl#v oX/i|`VifB!(zx7@b"VV;>~|[( pMO)=D9QWxE;aFYy2xH_).T(H"9FQejE0?I$<`AW@TC\1Xh0TN0jS| r `U h=9l9JUWicH9d<\/ Zxe>8J@E*1fUan~65ifp5aa { )rg>-x4G[X''8X|yt6G0*d7{x\q`E7-YZI=!s'.[Q_um2 -KE_Nicz^JFO[HM(< \IX-g.Jx]jhE|dhb5KXG#Wtg5 }N WZ+zdzEIch[efEKY@@{d(*LQk<@("dvVI-aEFd)"0{nG tJI Unit Vector <--> Lon/Lat conversion routine Called by IDL COORCONV routine. Note: There is a IDL function of the same name that is a shell around other IDL functions which perform conversions between pixels and unit vectors and lon/lat. If this C module is not implememented then the IDL function is compiled and run instead. If implemented, then this module takes prece- dence. AUTHOR: J.M. Gales (Applied Research Corp) DATE` CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$j: 9/92, SPR 10025, Rewrite in "C" for faster BUILDMAP execution. MODIFICATION HISTORY: DATE SPR/SER PROGRAMMER DESCRIPTION ---- ------- ---------- ----------- 12/9/92 10324 Gales Add ability to read and write double precision arrays for uv and ll input. 02/12/93 11468 Newmark Change to compile under VAX and Sun C not GNU C 03/94 11614 Dan Grogan Changed "export.h" to "export_wrap.h" for IDL 3.0+ 09/95 12279 Newmark Upgrade to IDL 4.0 03/97 Gales upgrade for use at res 15. COMMAND LINE ARGUMENT: input array, resolution/action code INPUT PARAMETERS: Name Type Description ---- ---- ----------- input array LONG arr Input array (pixel) float/double arr (unit vector) float/double arr (lon/lat vector) resolution int skymap resolution/action code (For uv<-->ll conversion, set resolution to -1) RETURN: output array (pixel, unit vector, lon/lat) FUNCTIONS CALLED: pix2uv, uv2pix, uv2ll, ll2uv, uv2pix_d, uv2ll_d, ll2uv_d *******************************************************************************/ #include #include #include "export_wrap.h" IDL_VPTR cconv(argc,argv) int argc; IDL_VPTR argv[]; { short i,j,res,in_type; IDL_LONG in_dim[2], out_dim[2]; IDL_UCHAR n_dims,type; /* IDL pointer IDL_VARIABLEs */ IDL_LONG *pix,*dims; float *uv,*ll; double *uv_d,*ll_d; ˓ CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$pIDL_VARIABLE *ret; /* printf("New cconv\n");*/ n_dims = (IDL_UCHAR) argv[0]->value.arr->n_dim; /* get number of dimensions of input */ dims = (IDL_LONG *) argv[0]->value.arr->dim; for (i=0; itype; /* get input VARIABLE data type */ if (n_dims == 1) in_type = 0; else in_type = (in_dim[1] == 2) ? 1 : 2; /* in_type = 0 for pixel input in_type = 1 for lon/lat input in_type = 2 for uv input */ res = (short) argv[1]->value.i; /* get resolution/action code */ if (in_type == 0) /* pixel input */ { pix = (IDL_LONG *) argv[0]->value.arr->data; /* get pointer to pixel numbers */ out_dim[0] = in_dim[0]; out_dim[1] = 3; /* uv output n by 3 array */ uv = (float *) IDL_MakeTempArray(IDL_TYP_FLOAT,2,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for uv output */ pix2uv(pix,uv,res,in_dim); /* pixel to unit vector conversion */ } if (in_type == 1) /* longitude/latitude input */ { out_dim[0] = in_dim[0]; out_dim[1] = 3; if (type == IDL_TYP_FLOAT) { ll = (float *) argv[0]->value.arr->data; /* get float pointer to lon/lat input */ uv = (float *) IDL_MakeTempArray(IDL_TYP_FLOAT,2,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for uv output */ ll2uv(ll,uv,in_dim); /* lon/lat to unit vector conversion */ } if (type == IDL_TYP_DOUBLE) { ll_d = (double *) argv[0]->value.arr-tr CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$S >data; /* get double pointer to lon/lat input */ uv_d = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for uv output */ ll2uv_d(ll_d,uv_d,in_dim); /* lon/lat to unit vector conversion */ } } if (in_type == 2) /* unit vector input */ { if (type == IDL_TYP_FLOAT) uv = (float *) argv[0]->value.arr->data; /* get float pointer to unit vectors */ if (type == IDL_TYP_DOUBLE) uv_d = (double *) argv[0]->value.arr->data; /* get double pointer to unit vectors */ out_dim[0] = in_dim[0]; if (res == -1) /* lon/lat output */ { out_dim[1] = 2; if (type == IDL_TYP_FLOAT) { ll = (float *) IDL_MakeTempArray(IDL_TYP_FLOAT,2,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for ll output */ uv2ll(uv,ll,in_dim); /* unit vector to lon/lat conversion */ } if (type == IDL_TYP_DOUBLE) { ll_d = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for ll output */ uv2ll_d(uv_d,ll_d,in_dim); /* unit vector to lon/lat conversion */ } } if (res > 0) /* pixel output */ { pix = (IDL_LONG *) IDL_MakeTempArray(IDL_TYP_LONG,1,out_dim, IDL_BARR_INI_ZERO, &ret); /* allocate space for pixel output */ if (type == IDL_TYP_FLOAT) uv2pix(uv,pix,res,in_dim); /* unit vector to pixel conversion */ if (type == IDL_TY CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$ P_DOUBLE) uv2pix_d(uv_d,pix,res,in_dim); /* double unit vector to pixel conversion */ } } return(ret); /* return output */ } pix2uv(pixel,uv,res,dim) /* pix to uv */ IDL_LONG *pixel; float *uv; int res; int dim[]; { int i, j, k, bit; IDL_LONG face,fpix,pix; float x,y,xx,yy,eta,xi,half_side,c[3],norm; double xtemp,ytemp,xid,etad; IDL_LONG num_pix_face,num_pix_side,one; unsigned int pow_2[16]; static double p[29] ; one=1; p[0]= 0.0; p[1]= -0.27292696; p[2]= -0.07629969; p[3]= -0.02819452; p[4]= -0.22797056; p[5]= -0.01471565; p[6]=0.27058160; p[7]=0.54852384; p[8]=0.48051509; p[9]= -0.56800938; p[10]= -0.60441560; p[11]= -0.62930065; p[12]= -1.74114454; p[13]=0.30803317; p[14]=1.50880086; p[15]=0.93412077; p[16]=0.25795794; p[17]=1.71547508; p[18]=0.98938102; p[19]= -0.93678576; p[20]= -1.41601920; p[21]= -0.63915306; p[22]=0.02584375; p[23]= -0.53022337; p[24]= -0.83180469; p[25]=0.08693841; p[26]=0.33887446; p[27]=0.52032238; p[28]=0.14381585; num_pix_side = (IDL_LONG) (pow(2.,res-1.)); num_pix_face = (IDL_LONG) (pow(4.,res-1.)); /* determine # of pixels per side & face */ for (i=0; i<=15; i++) pow_2[i] = one << i; /* generate bit mask array */ half_side = (float) (pow(2.,res-2.)); /* determine # of pixels per face # pixels per half side */ for (pix=0; pix> 1; j = j | (int) (pow_2[bit] * (one & fpix)); fpix = fpix >> 1; } /* decode pixel into column and row */ x = (i - half_side +0.5) / half_side; y = (j - half_side +0.5) / half_side; /* get normalized x & y positions */ /* printf("pixel,face,fpix: %d %d %d\n",*(pixel + pix),face,fpix); printf("x, y: %12.7f %12.7f\n",x,y); */ xx = x*x; yy = y*y; xi=x*(1.+(1.-xx)*( p[1]+xx*(p[2]+xx*(p[4]+xx*(p[7]+xx*(p[11]+xx*(p[16]+xx*p[22]))))) + yy*( p[3]+xx*(p[5]+xx*(p[8]+xx*(p[12]+xx*(p[17]+xx*p[23])))) + yy*( p[6]+xx*(p[9]+xx*(p[13]+xx*(p[18]+xx*p[24]))) + yy*( p[10]+xx*(p[14]+xx*(p[19]+xx*p[25])) + yy*( p[15]+xx*(p[20]+xx*p[26]) + yy*( p[21]+xx*p[27] + yy*p[28])))) ))); eta=y*(1.+(1.-yy)*( p[1]+yy*(p[2]+yy*(p[4]+yy*(p[7]+yy*(p[11]+yy*(p[16]+yy*p[22]))))) + xx*( p[3]+yy*(p[5]+yy*(p[8]+yy*(p[12]+yy*(p[17]+yy*p[23])))) + xx*( p[6]+yy*(p[9]+yy*(p[13]+yy*(p[18]+yy*p[24]))) + xx*( p[10]+yy*(p[14]+yy*(p[19]+yy*p[25])) + xx*( p[15]+yy*(p[20]+yy*p[26]) + xx*( p[21]+yy*p[27] + xx*p[28])))) ))); /* magic quad cube formuli */ /* printf("xi, eta: %12.7f %12.7f\n",xi,eta);*/ /* If res 15 then iterate */ if (res == 15) { xid = (double) xi; etad = (double) eta; incube(xid,etad,&xtemp,&ytemp); /* printf("x,y: %12.7f %12.7f\n",xtemp,ytemp);*/ xid -= (xtemp - x); etad -= (ytemp - y); /* printf("xi, eta (2): %12.7f %12.7f\n",xid,etad);*/ incube(xid,etad,&xtemp,&ytemp); /* printf("x,y: %1kn CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$2.7f %12.7f\n",xtemp,ytemp);*/ xi = xid - (xtemp - x); eta = etad - (ytemp - y); /* printf("xi, eta (3): %12.7f %12.7f\n",xi,eta);*/ } /* This section taken from XYAXIS.FOR */ switch(face) /* determine unnormalized vector */ { case 0 : c[2]=1.; c[0]= -eta; c[1]=xi; break; case 1 : c[0]=1.; c[2]=eta; c[1]=xi; break; case 2 : c[1]=1.; c[2]=eta; c[0]= -xi; break; case 3 : c[0]= -1.; c[2]=eta; c[1]= -xi; break; case 4 : c[1]= -1.; c[2]=eta; c[0]=xi; break; case 5 : c[2]= -1.; c[0]=eta; c[1]=xi; break; } norm = pow(c[0]*c[0]+c[1]*c[1]+c[2]*c[2],0.5); c[0] = c[0] / norm; c[1] = c[1] / norm; c[2] = c[2] / norm; /* normalize vector */ *(uv + pix) = c[0]; *(uv + pix + dim[0]) = c[1]; *(uv + pix + 2*dim[0]) = c[2]; /* load into unit vector output array */ } /* end pixel loop */ return; } uv2pix(uv,pixel,res,dim) /* uv to pix */ float *uv; IDL_LONG *pixel; short res; int dim[]; { int i; IDL_LONG pix,pix_num,u2p(); double c0,c1,c2; IDL_LONG num_pix_face,num_pix_side,one; unsigned int pow_2[16]; one=1; num_pix_side = (IDL_LONG) (pow(2.,res-1.)); num_pix_face = (IDL_LONG) (pow(4.,res-1.)); /* determine # of pixels per side & face */ for (i=0; i<=15; i++) pow_2[i] = one << i; /* generate bit mask array */ for (pix=0; pix= 1 && abs_zy >= 1 && c2 >= 0) { face = 0; goto lbl; } if (abs_zx >= 1 && abs_zy >= 1 && c2 < 0) { face = 5; goto lbl; } if (abs_zx < 1 && abs_yx < 1 && c0 >= 0) { face = 1; goto lbl; } if (abs_zx < 1 && abs_yx < Z CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$1 && c0 < 0) { face = 3; goto lbl; } if (abs_zy < 1 && abs_yx >= 1 && c1 >= 0) { face = 2; goto lbl; } if (abs_zy < 1 && abs_yx >= 1 && c1 < 0) face = 4; /* Determine quad cube normalized coordinates */ lbl: switch(face) { case 0 : eta = -c0/c2; xi = c1/c2; break; case 1 : eta = c2/c0; xi = c1/c0; break; case 2 : eta = c2/c1; xi = -c0/c1; break; case 3 : eta = -c2/c0; xi = c1/c0; break; case 4 : eta = -c2/c1; xi = -c0/c1; break; case 5 : eta = -c0/c2; xi = -c1/c2; break; } incube(xi,eta,&x,&y); x=(x+1.)/2; y=(y+1.)/2; i = (int) (x * num_pix_side); j = (int) (y * num_pix_side); if (i == num_pix_side) i = i - 1; if (j == num_pix_side) j = j - 1; /* get column & row numbers knock back one if on boundary */ fpix = 0; for (bit=0; bitPb8GCcLGN5ifYtPRX ,_Sa#>i`Va*gXVP*eJ4P5~{UB66D3.F58 @,Z!r@kHM(!C|}Oe psdM <{,'5LOHB"q0Oa:*zvB+ct_B(;~5Y=j9y EfcXR|0c RIR&%7}t2^\Z"p AF6W&,csAqaST"- 'Q>ZvO] k|):eH`Ah>Fo=5?Y^g 3 yj/yCd)78{4VVIYG)Yh E}[2|kM4,c:cm!@:+Huc:)]dR9xt II5|q%w!v9I UzUY?jYgi;.Z_j4 9't0YuZLMfD!#@M*E)LER_ aA~b3@i_L2s'u3| _(,\2xv4*n qSbdI~c kk@Sk;O~HyD>%8!)uBE>C?O(!q`6]? [;.9DVG~]5{ujp )1w(u px}V$.dV@!Mr |GYT\v=7 Y_{~!Ls=4sWo-N/7WnG+x^S3=>8 q 6LNle'RfB{^e3\vY#C~iRihw@Aud9B@\OC\6x4E{. PB=<\@/Zsr(NFW |1z[4|Xg=>d:|za6K*\Fb7\ 8hQjdbqyPNzX8q.wC !/t4R=K NX2  ;r =ac0'OhTZ=S)bF*!l r= dTdG\~!-+#og1+Bt.xPx5?%~!@u<~; /#ba aH/4D?k`x)?eL'x@~D3$g< naSsq['CyW%Z+ Bx"[C{hB#"raow oxw `ux{$W;wO&cmriR c|,9Edb/Kb5", |Q\Yz)BS7ZV gG@Ho2;tkN1nyE8C-v5MeNwegz,U@Z*_A TvaTj}1v d]?d.Kd$A%EI5RY6rvyt[o_3;"XXKk(P$HAJ$:L9i2)SPs*;x;=#S$?UBAiJ2a]VSE7=DC`y 4zg,+y^Tz&m"6Hw|Tt4)rx@PS*\XH\!$:?09rhuSqp0I;kKxyr,M{E o=s!#~QNF?RUbo<>>`$!5"14>7GS%) &8$<.pAp`* {.jmd I -EFm,OR|?:=" '045gSu,k:T>bY}W2UN3@ y#:q$UHFvnd5~9mzg)L:Hw@RM[{?F4B?!%ZTk ,-y]<  V50(@8HK&4ZLUBe+BSUC :gcc,Z&@ G-;YT&uvo#4QGO'ppoTLz:\:QPE (7XB8vx,KbsJVR*,7A^64"or CGIS-VMS.BCK[  [COBE_IDL]CCONV.C;1$ /* load into unit vector output array */ } return; } uv2ll(uv,ll,dim) float *ll,*uv; int dim[]; { IDL_LONG cnt; float c0,c1,c2,lon,lat; double r2d; r2d = 45 / atan(1.0); /* radians to degrees conv */ for (cnt=0; cnt setlog, 'cpusec_exe', 'cgis$idl:cpusec.exe' ** UIDL> linkimage, 'cpusec', 'cpusec_exe', 1 ** UIDL> print, cpusec() ** 494.34 ** ** This means that the current process has consumed 8 minutes ** and 14.34 seconds of cpu time. Control-T would have given ** output like the following: ** NODE::USER 11:42:35 COBE_IDL CPU=00:08:14.34 PF=367 IO=951 MEM=512 ** ** Example 2. ** ** UIDL> t0 = cpusec() ** UIDL> ...routine or steps to be timed... ** UIDL> t1 = cpusec() ** UIDL> print, 'Routine consumed ', t1-t0, ' CPU seconds.' ** ** This example shows how to time a routine or several steps ** of an IDL session, and would normally be used as part of ** a procedure rather than run interactively as shown. ** ** ** MODIFICATION HISTORY: ** 09/95 Newmark Upgrade to IDL 4.0 ** ** {@tbs@}... **-- */ #include #include #include "export_wrap.h" #ifndef CLK_TCK /* valid for VAX VMS run time library clock() */ #define CLK_TCK (100) #endif IDL_VPTR cpusec( argc, argv, argk ) int argc; IDL_VPTR argv[]; char *argk; { /* ** this IDL_VARIABLE is declared as static so as to avoid ** returning a pointer to a stack VARIABLE or using ** IDL's temporary VARIABLEs which need to be cleaned up. */ static IDL_VARIABLE cpuseconds; /* it's a IDL_LONG, and it has a value */ cpuseconds.type = IDL_TYP_FLOAT; cpuseconds.value.f = ((float) clock()) / (float)CLK_TCK; return( &cpuseconds ); } ' CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1 *[COBE_IDL]DBLSVD.C;1+,^ ./ h 4- 0123KPWO56&]pY7&]pY89G hHJ/******************************************************************************* * * Module: DBLSVD.C * * Purpose: Double precision singular value decomposition. * * Author: Joel Gales, ARC, 8/26/94, SPR 11893 * SPR 12158 3/27/95 Update for changes in EXPORT.H. J. Newmark * 09/95 Newmark Upgrade to IDL 4.0 * * Description: This is a translation of the Singular Value Decomposition * algorithm of Golub and Reinsch (Numerische Mathematik 14(1970) * pp403-470) from Algol 60 to C. The routine takes a single * matrix (A) and computes two additional matrices (U and V) and * a vector W such that A = UWV' The calling sequence is * svd(a,m,n,u,w,v,eps,flags) where a is the original, m by n * matrix; u is the upper resultant; w is the vector of singular * values; v is the lower resultant; eps is a convergence test * con($&G CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1:stant; and flags tells what to do, values:- * 0 produce only w * 1 produce w and u * 2 produce w and v * 3 produce u, w, and v. * NOTE: M must be greater than n or an error is signaled. *******************************************************************************/ #include #include #include "export_wrap.h" #define BELL putchar('\07') void dblsvd(argc,argv) int argc; IDL_VPTR argv[]; { short int stat,svd0(); IDL_LONG i,j,dim[2],dim_v[2],num_elem,flag; char dat_typ; IDL_UCHAR n_dims; double *in_arr_d,*w,*u,*v,eps=1.0e-10; float *in_arr_f; IDL_LONG *dims; IDL_VARIABLE *ret_w,*ret_u,*ret_v; dat_typ = (char) argv[0]->type; /* get data type */ if (dat_typ < 4 || dat_typ > 5) { printf("Input array must be FLOAT or DOUBLE!\n"); BELL; goto bail; } dims = (IDL_LONG *) argv[0]->value.arr->dim; for (i=0; i<=1; ++i) dim[i] = *dims++; if (dim[0] > dim[1]) { printf("# columns must be <= # of rows!\n"); BELL; goto bail; } if (dat_typ == 4) in_arr_f = (float *) argv[0]->value.arr->data; if (dat_typ == 5) in_arr_d = (double *) argv[0]->value.arr->data; /* get pointer to input array */ dim_v[0] = dim[0]; dim_v[1] = dim[0]; w = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,1,dim_v, IDL_BARR_INI_ZERO,&ret_w); u = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,dim, IDL_BARR_)֤ CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1INI_ZERO,&ret_u); v = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,dim_v, IDL_BARR_INI_ZERO,&ret_v); flag = 3; stat = svd0(dat_typ,in_arr_f,in_arr_d, dim[1],dim[0],u,w,v,eps,flag); IDL_VarCopy(ret_w,argv[1]); IDL_VarCopy(ret_u,argv[2]); IDL_VarCopy(ret_v,argv[3]); bail: return; } #include #define WITHV 1 #define WITHU 2 #define TINY 1.0e-20 short int svd0(dat_typ,af,ad,m,n,u,w,v,eps,flags) double *ad, /* The original matrix [m,n] */ *u, /* The new upper matrix [m,n] */ *v, /* The new lower matrix [m,n] */ *w, /* The vector of singular values [n] */ eps; /* Convergence factor */ IDL_LONG m, /* Number of rows */ n, /* Number of columns (n <= m) */ flags; /* Flags controlling what gets computed. */ float *af; char dat_typ; { IDL_LONG i,j,k,l,l1; /* Mostly loop IDL_VARIABLEs */ double tol = TINY / eps; /* tells about machine tolerance */ double c,f,g,h,s,x,y,z,*temp; /* temporaries */ temp = (double *) malloc(8*m); /* * First copy a into u. */ if (dat_typ == 4) for (i = 0; i <= m * n; ++i) u[i] = af[i]; if (dat_typ == 5) for (i = 0; i <= m * n; ++i) u[i] = ad[i]; /* * Reduce the u matrix to bidiagonal form with Householder transforms. */ g = (x = 0.0); for(i = 0; i < n; ++i) { *HPT CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1 temp[i] = g; s = 0.0; l = i + 1; for (j = i; j < m; j++) { s += u[j * n + i] * u[j * n + i]; } if (s < tol) { g = 0.0; } else { f = u[i * n + i]; g = (f < 0.0) ? sqrt(s) : -sqrt(s); h = f * g - s; u[i * n + i] = f - g; for(j = l; j < n; ++j) { s = 0.0; for(k = i; k < m; ++k) { s += u[k * n + i] * u[k * n + j]; } f = s / h; for(k = i; k < m; ++k) { u[k * n + j] += f * u[k * n + i]; } } } w[i] = g; s = 0.0; for (j = l; j < n; ++j) { s += u[i * n + j] * u[i * n + j]; } if (s < tol) { g = 0.0; } else { f = u[i * n + i + 1]; g = (f < 0.0) ? sqrt(s) : -sqrt(s); h = f * g - s; u[i * n + i + 1] = f - g; + CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1m for (j = l; j < n; ++j) { temp[j] = u[i * n + j] / h; } for (j = l; j < m; ++j) { s = 0.0; for (k = l; k < n; ++k) { s += u[j * n + k] * u[i*n+k]; } for (k = l; k < n; ++k) { u[j*n+k] += s * temp[k]; } } } y = fabs(w[i]) + fabs(temp[i]); if (y > x) { x = y; } } /* * Now accumulate right-hand transforms if we are building v too. */ if (flags & WITHV) for (i = n - 1; i >= 0; --i) { if (g != 0.0) { h = u[i * n + i + 1] * g; for (j = l; j < n; ++j) { v[j * n + i] = u[i * n + j] / h; } for (j = l; j < n; ++j) { s = 0.0; for (k = l; k < n; ++k) { s += u[i * n + k] * v[k * n + j]; } for (k = l; k < n; ++k) { v[k * n + j] += s * v[k * n + i,!*jmx 1?&V v5 o [Mq+[Np*QuJa8]ly&8>]S&#*9*;3$>;b6H8mr1ikb`2;N0#TA[}acY#XE!_A>>Dw0-R.p! ^5D6QrC8o<*%! yZ.#rvcqSRbQ^xb nBR-zw*> QYCSO,[FŎBLi|gyRqv1h'7Gb B{]cMf9}AiYFV"U.D*W@owj.i^7{^5J{e@S_Zssl&h t$x=kM\ &]'Q9$D39g*K&nIN= <~Aiq'A b V/ +6J5e,dO"-6[5?,5seUC\}]t+TI`QFexu B]K(%F~HekhfFTaE\dz7P#drD-j&*!ec?HYU%OTaYQ|Lw5s"qMV_:>"wo 'L~#S|{-* Y)<5")* m" 6)>:0e^ Wa9DJ,$p[BeNu&QC; +=-=l!y}tjk2};R?Z 0\L ygo*'^!D:@cxvL-Bkt$j+Vmz["V[FX Ze><;E*<J %%Urug,>wIGm@)"8`B9k4Ke"E0;:$u+&a;#Fs(n!3nl7tSvO} z^fE?^zxt9`#Ќw:ypR9D hP4G+4X5 2GqV T3* T3:0"X+7l/y: J( ET4.97U\ALYys$,GVI|1'Gb5]jPt|c UJ%Hs,:'BxyPea7d.|ZB-S_7LXD|: qy*ROt1Kt/y[ ]$`R act2><`!8CJ3Z?m.iC=1BDFcclh"|iAIgG{l:C>!%`"Wt~NE'>z+/C/ S/tUPxQ)80F,rCqY3Od.FAc;`oeVTmytPKOt%MP( ~RNXtDh>kppddrKDxW'~)QK?"c4)vY\6|Xq~c^ pv(M\gJu{w.;5"($/ !O91%yl4^k6; phK}w#<GWb@hd3`5V~`'{[~2?fY*vE[|4t2uXIIE om@__Fv>(u=; 8IA}^ so<^o_t;` K9V0dERCV:yY]n^cAFRR6n'6)(0 `>qL}_u3%kUHE_I\E7>$, V@Y]hN V|0xk#0F _MbD*fz]=<Zs2 ;KBKf}[Y4uLGTXBx o& "pBZOfPy)e,y2W]IF~o0C tQ TmP= 0; --i) { l = i + 1; g = w[i]; for (j = l; j < n; ++j) { u[i * n + j] = 0.0; } if (g != 0.0) { h = u[i * n + i] * g; for (j = l; j < n; ++j) { s = 0.0; for (k = l; k < m; ++k) { s += u[k * n + i] * u[k * n + j]; } f = s / h; for (k = i; k < m; ++k) { u[k * n + j] += f * u[k * n + i]; } } for (j = i; j < m; ++j) { u[j * n + i] /= g; } } else { for (j = i; j < m; ++j) { u[j * n + i] = 0.0; } .[8 CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1q } u[i * n + i] += 1.0; } /* * Now diagonalise the bidiagonal form. BEWARE GOTO's IN THE LOOP!! */ eps = eps * x; for (k = n - 1; k >= 0; --k) { testsplitting: for (l = k; l >= 0; --l) { if (fabs(temp[l]) <= eps) goto testconvergence; if (fabs(w[l - 1]) <= eps) goto cancellation; } /* * Cancellation of temp[l] if l > 0; */ cancellation: c = 0.0; s = 1.0; l1 = l - 1; for (i = l; i <= k; ++i) { f = s * temp[i]; temp[i] *= c; if (fabs(f) <= eps) goto testconvergence; g = w[i]; h = (w[i] = sqrt(f * f + g * g)); c = g/h; s = -f/h; if (flags & WITHU) for (j = 0; j < m; ++j) { y = u[j * n + l1]; z = u[j * n + i]; u[j * n + l1] = y * c + z * s; u[j * n + i] = -y * s + z * c; } } testconvergence: z = w[k]; if (l == k) goto convergence; /* * Shift from bottom 2x2 minor. */ /R=z CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1 x = w[l]; y = w[k - 1]; g = temp[k - 1]; h = temp[k]; f = ((y - z)*(y + z) + (g - h)*(g + h)) / (2 * h * y); g = sqrt(f * f + 1); f = ((x - z)*(x + z) + h*(y/((f < 0.0)?f-g:f+g) - h)) / x; /* * Next QR transformation. */ c = (s = 1); for (i = l + 1; i <= k; ++i) { g = temp[i]; y = w[i]; h = s * g; g *= c; temp[i - 1] = (z = sqrt(f * f + h * h)); c = f / z; s = h/z; f = x * c + g * s; g = -x * s + g * c; h = y * s; y *= c; if (flags & WITHV) for (j = 0; j < n; ++j) { x = v[j * n + i - 1]; z = v[j * n + i]; v[j * n + i - 1] = x * c + z * s; v[j * n + i] = -x * s + z * c; } w[i - 1] = (z = sqrt(f * f + h * h)); c = f / z; s = h / z; f = c * g + s * y; x = -s * g + c * y; if (flags & WITHU) for (j = 0 ; j < m; ++j) { y = u[j * n + i - 1]; 0 ( CGIS-VMS.BCK^  [COBE_IDL]DBLSVD.C;1R z = u[j * n + i]; u[j * n + i - 1] = y * c + z * s; u[j * n + i] = -y * s + z * c; } } temp[l] = 0.0; temp[k] = f; w[k] = x; goto testsplitting; convergence: if (z < 0.0) { /* * w[k] is made non-negative. */ w[k] = -z; if (flags & WITHV) for (j = 0; j < n; ++j) { v[j * n + k] = -v[j * n + k]; } } } free(temp); return(1); } *[COBE_IDL]EXPORT_WRAP.H;1+,_ . / h 4 - 0123KPWO 56kTB7kTB89G hHJ1aS CGIS-VMS.BCK_  [COBE_IDL]EXPORT_WRAP.H;1 R/* HEADER: export_wrap.h This file is provided for the COBE C software. Please read it carefully and make the appropriate changed for the version of IDL you are using and your pathways. */ #include /* export.h needs this */ /* define problem symbols before including export.h */ #if defined(__GNUC__) && defined(VMS) #define noshare #define globalref extern #endif /* IDL's export.h file, at /include=idl_dir:[source] */ #define IDL_UCHAR UCHAR #include "export.h" /* the following line take care of obsolete typedefs */ /* uncomment this section if running versions of IDL */ /* OLDER than 4.0 (e.g. 3.5,3.6) */ /* #include "cobe_obs.h" */ /* the following 2 lines are only for IDL v4.0 */ /* uncomment if necessary (fixed in 4.0.1) */ /* #define ULONG IDL_ULONG */ /* #define IDL_DELTMP IDL_Deltmp */ /* end idl 4.0 section */ /* The export.h file was changed in IDL version 3.5 to add */ /* definitions of LONG and ULONG. If you are running older */ /* versions, e.g. IDL v3.0 uncomment (remove the leading and */ /* trailing symbols) the next two lines. */ /* typedef long int LONG; */ /* typedef unsigned long int ULONG; */ /* ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is2- CGIS-VMS.BCK_  [COBE_IDL]EXPORT_WRAP.H;1 " not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@COBECL.DNET.NASA.GOV. */ *[COBE_IDL]INPOLY.C;1+,` ./ h 4 - 0123KPWO56xiY7xiY89G hHJ3|q CGIS-VMS.BCK`  [COBE_IDL]INPOLY.C;1o/*;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@COBECL.DNET.NASA.GOV. */ /******************************************************************************* /* MODULE: inpoly.c FUNCTION: This program determines whether a given point on a sphere is within a spherical polygon defined by other points on the sphere connected by great circle segments. It is called by the PXINPOLY IDL procedure. An IDL version of this function also exists. AUTHOR: J.M. Gales (Applied Research Corp) DATE: 6/93 MODIFICATION HISTORY: DATE SPR/SER PROGRAMMER DESCRIPTION ---- ------- ---------- ----------- 07/23/93 4A%b CGIS-VMS.BCK`  [COBE_IDL]INPOLY.C;1-c 11174 Gales Initial Delivery 03/94 11614 Dan Grogan Changed "export.h" to "export_wrap.h" for IDL 3.0+ 09/95 Newmark Upgrade to IDL 4.0 COMMAND LINE ARGUMENT: vertices, edge, plane, index, uv INPUT PARAMETERS: Name Type Description ---- ---- ----------- vertices flt arr polygon vertices in unit vector (n_vert,3) format edge flt arr edge vectors of triangular (3,3*n_tri) facets of polygon plane flt arr parameters of plane defined (4,n_tri) by triangular facets Ax+By+Cz=D index int arr indicies of each triangular (3,n_tri) facet in terms of polygon vertices indicies uv flt arr unit vectors of test points (3,n_pnts) on sphere in unit vector format RETURN: flag [byte array (n_pnts)] 0 is outside polygon, 1 if inside FUNCTIONS CALLED: None *******************************************************************************/ /* Mathematical Interlude ---------------------- A plane is defined by the equation: Ax + By + Cz = D. (1) The point given by the intersection of a vector colinear with a = (u,v,w) and the plane is given by b = (x,y,z) where a x b = 0. Therefore: vz - wy = 0 wx - uz = 0 vx - uy = 0 . If w NE 0 then: x = (u/w)*z y = (v/w)*z . Substituting into (1) and solving for z we get: z = D / (A*(u/w) + B*(v/w) + C) . If w = 0 but v NE 0 then: x = (u/v)*y z = 0. Substituting into (1) and solving for y we get: y = D / (A*(u/v) + B5v CGIS-VMS.BCK`  [COBE_IDL]INPOLY.C;1) . If w = 0 and v = 0 but u NE 0 then: y = 0 z = 0. Substituting this into (1) and solving for x we get: x = D / A . */ #include #include #include "export_wrap.h" IDL_VPTR inpoly(argc,argv) int argc; IDL_VPTR argv[]; { short i0, i1, i2; IDL_LONG i, j, k, n, n_tri, n_vert, tri, dim[1]; float uv_pl[3], diff[3][3], a0, a1, a2, y, z, test; float u, v, w, A, B, C, D; float *diff_adr, *edge_adr; float *a, *b; /* IDL pointer IDL_VARIABLEs */ short *index; float *vert, *edge, *plane, *uv; IDL_UCHAR *flag; IDL_LONG *dims; IDL_VARIABLE *retdat; /* set up pointers to input */ vert = (float *) argv[0]->value.arr->data; /* get pointer to vertices */ edge = (float *) argv[1]->value.arr->data; /* get pointer to triangle edge vectors */ plane = (float *) argv[2]->value.arr->data; /* get pointer to triangle plane parameters */ index = (short *) argv[3]->value.arr->data; /* get pointer to triangle vertici index */ uv = (float *) argv[4]->value.arr->data; /* get pointer to test points (in uv format) */ n_vert = (IDL_LONG) argv[0]->value.arr->n_elts / 3; /* get number of vertices */ n_tri = (IDL_LONG) argv[3]->value.arr->n_elts / 3; /* get number of triangles */ n = (IDL_LONG) argv[4]->value.arr->n_elts / 3; /* # of test points */ dim[0] = n; flag = (IDL_UCHAR *) IDL_MakeTempArray(IDL_TYP_BYTE,1,dim,IDL_BARR_INI_ZERO, &retdat); /* allocate space for output flag array */ for (i=0; iZ8Uq&t W =h3r^8S*  p6" y0 /7g=*jp7S_6?y5.:w ;}{!xCp|L_5X03MTFa5I -1KCUIUAuX" 5^ tkTemr<}J {P] A CLIrc@x"[WpQ,ot#$F Vam~."\1%'3p|RLVE~g>ARhSFg,n|}D >|/_sVpw!NX@ ViJHF5n[I qYL"Y};Pyo@(!<(I^53|FD.W9D%o/^yl`G) /";O|=OUif xBGysC 4O(^UR(G\q>^_O\8zyt@Wlh-'t_wikLiG$wV3| !`lNkP'%(.TNa%_fF Vx`8Px-&NHkraVL-JG!2pwm=Qe{o_w z ePDt}1i|El:/~;"FJB*<2yPxgp@62~rsT4YFKx++!9WZMG19tPetkU2hN%1ro(l'z?EL$9Ot,)i 0en*E|Z"X AAlK}*n_HI^p_|w4%yQ9j$G0 bCJj&#XJ3(0;$kJjI*Z+;[XS-AvYyZZUC4}4lP:4%.3]I (&56V\q:B0nP;WQ(/&aCx [`+nT4VdX@<6:MSp2co/j ^lRm$F |-uTY:$T}dIR@V)Q;2O [61?]6[!Jg.o mqRhFg~R+kQA-7p-(=uxrq*ivC|g 1T$"H CdINFBrF9WuDxQR6?q3g~`y?;}hwEQ n_= |lT.3~ l8ɺ CGIS-VMS.BCK`  [COBE_IDL]INPOLY.C;1  each of these difference vectors take cross product of edge vector to next vertex and this difference. If in opposite dirction of normal outward from triangular face then outside triangle. Check next facet. */ } if (test > 0) { flag[i] = 1; break; /* Inside facet therefore set flag and go on to next point */ } } /* tri loop */ } /* test point loop */ return(retdat); } *[COBE_IDL]LINK_OSF1.PRO;1+,/. / h 4 0- 0123KPWO 56ln7ln89G hHJ;******************************************************************************* ; ; This procedure linkimages user-written application utilities. ; ; Written: 11-AUG-1993 J. Newmark ; ;******************************************************************************* ; ; edit PATH to reflect the actual location, e.g. /usr/local/rsi/idl_5/cgis ; LINKIMAGE,'cconv','/PATH/cconv.so',1,'cconv' LINKIMAGE,'projtran','/PATH/projtran.so',1,'projtran' LINKIMAGE,'adt2zulu','/PATH/adt2zulu.so',0,'adt2zulu' 9 Au CGIS-VMS.BCK/ [COBE_IDL]LINK_OSF1.PRO;1 čLINKIMAGE,'rastr','/PATH/rastr.so',0,'rastr' LINKIMAGE,'zulu2adt','/PATH/zulu2adt.so',0,'zulu2adt' LINKIMAGE,'cpusec','/PATH/cpusec.so',1,'cpusec' LINKIMAGE,'inpoly','/PATH/inpoly.so',1,'inpoly' LINKIMAGE,'pixavg','/PATH/pixavg.so',0,'pixavg' LINKIMAGE,'dblsvd','/PATH/dblsvd.so',0,'dblsvd' LINKIMAGE,'qrdcmp','/PATH/qrdcmp.so',0,'qrdcmp' ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. : CGIS-VMS.BCKa  [COBE_IDL]LINK_UNIX.PRO;1 =*[COBE_IDL]LINK_UNIX.PRO;1+,a . / h 4 ;- 0123KPWO 56ln7ln89G hHJ;******************************************************************************* ; ; This procedure linkimages user-written application utilities. ; ; Written: 11-AUG-1993 J. Newmark ; ;******************************************************************************* ; ; edit PATH to reflect the actual location, e.g. /usr/local/rsi/idl_5/cgis ; LINKIMAGE,'cconv','/PATH/cconv.so',1,'_cconv' LINKIMAGE,'projtran','/PATH/projtran.so',1,'_projtran' LINKIMAGE,'adt2zulu','/PATH/adt2zulu.so',0,'_adt2zulu' LINKIMAGE,'rastr','/PATH/rastr.so',0,'_rastr' LINKIMAGE,'zulu2adt','/PATH/zulu2adt.so',0,'_zulu2adt' LINKIMAGE,'cpusec','/PATH/cpusec.so',1,'_cpusec' LINKIMAGE,'inpoly','/PATH/inpoly.so',1,'_inpoly' LINKIMAGE,'pixavg','/PATH/pixavg.so',0,'_pixavg' LINKIMAGE,'dblsvd','/PATH/dblsvd.so',0,'_dblsvd' LINKIMAGE,'qrdcmp','/PATH/qrdcmp.so',0,'_qrdcmp' ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;;ft CGIS-VMS.BCKa  [COBE_IDL]LINK_UNIX.PRO;1 Ucontract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. Z*[COBE_IDL]LINK_VMS.PRO;1+,b . / h 4 - 0123KPWO 56ln7ln89G hHJ<m CGIS-VMS.BCKb  [COBE_IDL]LINK_VMS.PRO;1 z;******************************************************************************* ; ; This procedure linkimages user-written application utilities. ; ; Written: 11-AUG-1993 J. Newmark ; ;******************************************************************************* ; ; this assumes C executables are in the logical directory #CGIS_IDL# ; edit to reflect actual location ; SETLOG,'cconv_exe','#CGIS_IDL#:cconv.exe' SETLOG,'projtran_exe','#CGIS_IDL#:projtran.exe' SETLOG,'adt2zulu_exe','#CGIS_IDL#:adt2zulu.exe' SETLOG,'rastr_exe','#CGIS_IDL#:rastr.exe' SETLOG,'zulu2adt_exe','#CGIS_IDL#:zulu2adt.exe' SETLOG,'cpusec_exe','#CGIS_IDL#:cpusec.exe' SETLOG,'inpoly_exe','#CGIS_IDL#:inpoly.exe' SETLOG,'pixavg_exe','#CGIS_IDL#:pixavg.exe' SETLOG,'dblsvd_exe','#CGIS_IDL#:dblsvd.exe' SETLOG,'qrdcmp_exe','#CGIS_IDL#:qrdcmp.exe' LINKIMAGE,'cconv','cconv_exe',1 LINKIMAGE,'cpusec','cpusec_exe',1 LINKIMAGE,'projtran','projtran_exe',1 LINKIMAGE,'adt2zulu','adt2zulu_exe',0 LINKIMAGE,'rastr','rastr_exe',0 LINKIMAGE,'zulu2adt','zulu2adt_exe',0 LINKIMAGE,'inpoly','inpoly_exe',1 LINKIMAGE,'pixavg','pixavg_exe',0 LINKIMAGE,'dblsvd','dblsvd_exe',0 LINKIMAGE,'qrdcmp','qrdcmp_exe',0 ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;sof= CGIS-VMS.BCKb  [COBE_IDL]LINK_VMS.PRO;1 @tware. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL]MAKE.ALPHA;1+,c . / h 4 $- 0123KPWO 56WӇ7WӇ89G hHJ> CGIS-VMS.BCKc  [COBE_IDL]MAKE.ALPHA;1 >:$! This "make" file is suitable for compiling the ancillary $! C routines used in the COBE Guest Investigator Software $! package. $! $! The file MAKE.ALPHA should be used when compiling on a Digital $! ALPHA machine running OpenVMS (use make.unix if on an ALPHA $! running OSF1). $! $! Assumes the IDL executable is IDL_DIR:[bin.bin_alpha]idl.exe $! Assumes the IDL file export.h is in IDL_DIR:[external] $! if above is not true change or rename these logicals $! $! There are two compiling options depending whether using IDL v5.1 and $! above or earlier versions. If using earlier version, comment the first $! line and un-comment the second. $! $compile :== "cc/include=IDL_DIR:[external]/standard=vaxc/float=ieee_float/ieee_mode=denorm" $!compile :== "cc/include=IDL_DIR:[external]/standard=vaxc/float=d_float" $! $! this will use VAX C by default. Un-comment if prefer to use $! GNU_C if available. $!if f$trnlnm("GNU_CC") .NES. "" then compile :== "gcc/include=IDL_DIR:[external]" $! $i=1 $start: $if i .eq. 1 then file="cconv" $if i .eq. 2 then file="cpusec" $if i .eq. 3 then file="adt2zulu" $if i .eq. 4 then file="rastr" $if i .eq. 5 then file="inpoly" $if i .eq. 6 then file="zulu2adt" $if i .eq. 7 then file="pixavg" $if i .eq. 8 then file="projtran" $if i .eq. 9 then file="dblsvd" $if i .eq. 10 then file="qrdcmp" $! $define sys$output 'file'.opt $write sys$output "idl_dir:[bin.bin_alpha]idl/share" $! $! this will use VAX C by default. Un-comment 3 lines (on second line delete $! both the $ and ! sign) if prefer t?(:: CGIS-VMS.BCKc  [COBE_IDL]MAKE.ALPHA;1 o use GNU_C if available. $! If gcclib is not in gnu_cc:[000000] i.e. top level GNU_CC directory $! make appropriate change. $! if f$trnlnm("GNU_CC") .NES. "" then write sys$output - $! "gnu_cc:[000000]gcclib/lib" $! write sys$output "sys$share:vaxcrtl/share" $! $write sys$output "symbol_vector=("+''file''+"=PROCEDURE)" $deassign sys$output $compile 'file' $link/share 'file','file'.opt/opt $ i=i+1 $if i .eq. 11 then goto done $goto start $! $done: $delete *.obj;* $write sys$output "Done compiling and linking C routines." *[COBE_IDL]MAKE.IRIX;1+,.. / h 4 - 0123KPWO 56In7In89G hHJ@p CGIS-VMS.BCK. [COBE_IDL]MAKE.IRIX;1 '# This "make" file is suitable for compiling the ancillary # C routines used in the COBE Guest Investigator Software # package. # # The file MAKE.SUN should be used when compiling on a SUN/UNIX # machine. # CC = cc LD = ld -o # assume that export.h is in the following directory: INCLUDE=/usr/local/rsi/idl_5/external # assume idl shared libraries are in the following directory: INCLUDE2=/usr/local/rsi/idl_5/bin .SUFFIXES: .c .o .c.o: $(CC) -KPIC -I$(INCLUDE) -c $< LIBS = -lc -lm -L$(INCLUDE2) -lidl OFILES = cconv.o cpusec.o adt2zulu.o rastr.o inpoly.o \ zulu2adt.o pixavg.o projtran.o dblsvd.o qrdcmp.o # comps: $(OFILES) echo "Done compiling the C programs" $(LD) cconv.so -shared cconv.o $(LIBS) $(LD) cpusec.so -shared cpusec.o $(LIBS) $(LD) adt2zulu.so -shared adt2zulu.o $(LIBS) $(LD) rastr.so -shared rastr.o $(LIBS) $(LD) inpoly.so -shared inpoly.o $(LIBS) $(LD) zulu2adt.so -shared zulu2adt.o $(LIBS) $(LD) pixavg.so -shared pixavg.o $(LIBS) $(LD) projtran.so -shared projtran.o $(LIBS) $(LD) dblsvd.so -shared dblsvd.o $(LIBS) $(LD) qrdcmp.so -shared qrdcmp.o $(LIBS) echo "Done linking C routines." rm *.o echo "Cleaned up *.o files." AV CGIS-VMS.BCKd  [COBE_IDL]MAKE.OSF1;1 *[COBE_IDL]MAKE.OSF1;1+,d . / h 4 - 0123KPWO 56789G hHJ# This "make" file is suitable for compiling the ancillary # C routines used in the COBE Guest Investigator Software # package. # # The file MAKE.OSF1 should be used when compiling on a ALPHA/OSF1 # machine. # CC = cc LD = ld -o # assume that export.h is in the following directory: INCLUDE=/usr/local/rsi/idl_5/external # assume idl shared libraries are in the following directory: INCLUDE2=/usr/local/rsi/idl_5/bin/bin.alpha .SUFFIXES: .c .o .c.o: $(CC) -I$(INCLUDE) -c $< LIBS = -lc -lm -L$(INCLUDE2) -lidl OFILES = cconv.o cpusec.o adt2zulu.o rastr.o inpoly.o \ zulu2adt.o pixavg.o projtran.o dblsvd.o qrdcmp.o # comps: $(OFILES) echo "Done compiling the C programs" $(LD) cconv.so -shared cconv.o $(LIBS) $(LD) cpusec.so -shared cpusec.o $(LIBS) $(LD) adt2zulu.so -shared adt2zulu.o $(LIBS) $(LD) rastr.so -shared rastr.o $(LIBS) $(LD) inpoly.so -shared inpoly.o $(LIBS) $(LD) zulu2adt.so -shared zulu2adt.o $(LIBS) $(LD) pixavg.so -shared pixavg.o $(LIBS) $(LD) projtran.so -sharedB}O | cPRO;1| (?Kx2S<)yHJ7%xV6v2k@.k=\mN[. ,Fb DY[do <&m|lLw[f]#>nSp.XAFR}.s 9r w1a w* &BH\g$f" eJrN0W)(G_F.[tIzA\lmwfS-N?0x6|7`XZ$G(Z nD &Mp)uf5 aT:NG"3>iO"AebN:<{H3]#a 1?0͞Zv!Wt7E5/pxw\.96m?irxq],4f 8|xJDn_j1Yj9c fH"_rKpfkE*kSUDZ:"ePS{X0].gv`n1nOF@yO7 [MC"l ,/22nMPWpgP4v<}s!Dl_#i#sTI+-]+" ,h%LUw[Noq[#Q7O]E@Y %hs7jS#IRcl ?`uMl k3r*`8_!~/ q4Z#L:DpO0~N><6Drh:o@JM , 4g)7fO^FW[8P#=/y8I!L`94h]~ysh"uRSBP + VISod5c=1e*-M(gf@# C[xPI[ Kiij?I {^9  cO=7Z}c3?sSj9][|?Dn?G#Sd@?ui Q'{:".3dbHUht&<)peAwwO;H2QB,8d02(o <gn?YQ @ K/dd )% yQZUMcfyHY'Wg6v1E<lar)7?dXy@D^McQ*,2R M N0 J VYz1H&P$#<{%rj@v])a,"R;HOUU?H^k$RLh+m:gIu~9TV.Qd DE Ah*@7R0_gT$('!ojZ){Hg% 7>7%ZNxoLO_#1$!MF$pU P$8CS/3=}I'J4BQZ |:fi/)>E=kQ]ujrKW`?lJy? {N|!  1)d'0[oR(_<6+C`+A}]:lu}tH=be75- pC7t', Zk-t9`X4 "`%G0H1i#bY|>^ KiBPLL: IwE>}*%6^XattSYQdja6mp2J 6 UsMC!$~ t!Es/X2:b6~ *Z }dci(MRh6%J MQEYvrro{4yv t/E&.!4:6z Wp[6gyAX!_UHV; fzm;ZC4aTfiNL YEbX+MxAS* '*$,GEpA TEUF'-6f$TdP ENAU:1&A YSYoJcI0`6]B9} AGniKQI ESM  IEO$a*E'I R T]OuB gVTIGN TLE DTED   gAS T IIFU @LN^Il^OC^) CGIS-VMS.BCKd  [COBE_IDL]MAKE.OSF1;1 8 projtran.o $(LIBS) $(LD) dblsvd.so -shared dblsvd.o $(LIBS) $(LD) qrdcmp.so -shared qrdcmp.o $(LIBS) echo "Done linking C routines." rm *.o echo "Cleaned up *.o files." *[COBE_IDL]MAKE.SOLARIS;1+,k . / h 4 - 0123KPWO 56In7In89G hHJ# This "make" file is suitable for compiling the ancillary # C routines used in the COBE Guest Investigator Software # package. # # The file MAKE.SUN should be used when compiling on a SUN/UNIX # machine. # CC = cc LD = ld -o # assume that export.h is in the following directory: INCLUDE=/usr/local/rsi/idl_5/external # assume idl shared libraries are in the following directory: INCLUDE2=/usr/local/rsi/idl_5/bin .SUFFIXES: .c .o .c.o: $(CC) -Kpic -fsingle -I$(INCLUDE) -c $< LIBS = -assert pure-text -lcDpΉ CGIS-VMS.BCKk  [COBE_IDL]MAKE.SOLARIS;1  -lm -L$(INCLUDE2) -lidl OFILES = cconv.o cpusec.o adt2zulu.o rastr.o inpoly.o \ zulu2adt.o pixavg.o projtran.o dblsvd.o qrdcmp.o # comps: $(OFILES) echo "Done compiling the C programs" $(LD) cconv.so -G cconv.o $(LIBS) $(LD) cpusec.so -G cpusec.o $(LIBS) $(LD) adt2zulu.so -G adt2zulu.o $(LIBS) $(LD) rastr.so -G rastr.o $(LIBS) $(LD) inpoly.so -G inpoly.o $(LIBS) $(LD) zulu2adt.so -G zulu2adt.o $(LIBS) $(LD) pixavg.so -G pixavg.o $(LIBS) $(LD) projtran.so -G projtran.o $(LIBS) $(LD) dblsvd.so -G dblsvd.o $(LIBS) $(LD) qrdcmp.so -G qrdcmp.o $(LIBS) echo "Done linking C routines." rm *.o echo "Cleaned up *.o files." *[COBE_IDL]MAKE.SUN;1+,e . / h 4 - 0123KPWO 56In7In89G hHJE+ CGIS-VMS.BCKe  [COBE_IDL]MAKE.SUN;1 p# This "make" file is suitable for compiling the ancillary # C routines used in the COBE Guest Investigator Software # package. # # The file MAKE.SUN should be used when compiling on a SUN/UNIX # machine. # CC = cc LD = ld -o # assume that export.h is in the following directory: INCLUDE=/usr/local/rsi/idl_5/external # assume idl shared libraries are in the following directory: INCLUDE2=/usr/local/rsi/idl_5/bin .SUFFIXES: .c .o .c.o: $(CC) -pic -fsingle -I$(INCLUDE) -c $< LIBS = -assert pure-text -lc -lm -L$(INCLUDE2) -lidl OFILES = cconv.o cpusec.o adt2zulu.o rastr.o inpoly.o \ zulu2adt.o pixavg.o projtran.o dblsvd.o qrdcmp.o # comps: $(OFILES) echo "Done compiling the C programs" $(LD) cconv.so -shared cconv.o $(LIBS) $(LD) cpusec.so -shared cpusec.o $(LIBS) $(LD) adt2zulu.so -shared adt2zulu.o $(LIBS) $(LD) rastr.so -shared rastr.o $(LIBS) $(LD) inpoly.so -shared inpoly.o $(LIBS) $(LD) zulu2adt.so -shared zulu2adt.o $(LIBS) $(LD) pixavg.so -shared pixavg.o $(LIBS) $(LD) projtran.so -shared projtran.o $(LIBS) $(LD) dblsvd.so -shared dblsvd.o $(LIBS) $(LD) qrdcmp.so -shared qrdcmp.o $(LIBS) echo "Done linking C routines." rm *.o echo "Cleaned up *.o files." F)}5 CGIS-VMS.BCKf  [COBE_IDL]MAKE.VMS;1 %{*[COBE_IDL]MAKE.VMS;1+,f . / h 4 {- 0123KPWO 56In7In89G hHJ$! This "make" file is suitable for compiling the ancillary $! C routines used in the COBE Guest Investigator Software $! package. $! $! The file MAKE.VMS should be used when compiling on a VAX/VMS $! machine. $! $! Assumes the IDL executable is IDL_DIR:[bin.bin_alpha]idl.exe $! Assumes the IDL file export.h is in IDL_DIR:[external] $! if above is not true change or rename these logicals $! $compile :== "cc/include=IDL_DIR:[external]" $! $! this will use GNU_C by default if available. Comment out if prefer $! to use VAX C even when GNU_C is available. $if f$trnlnm("GNU_CC") .NES. "" then compile :== "gcc/include=IDL_DIR:[external]" $! $i=1 $start: $if i .eq. 1 then file="cconv" $if i .eq. 2 then file="cpusec" $if i .eq. 3 then file="adt2zulu" $if i .eq. 4 then file="rastr" $if i .eq. 5 then file="inpoly" $if i .eq. 6 then file="zulu2adt" $if i .eq. 7 then file="pixavg" $if i .eq. 8 then file="projtran" $if i .eq. 9 then file="dblsvd" $if i .eq. 10 then file="qrdcmp" $! $define sys$output 'file'.opt $write G%c CGIS-VMS.BCKf  [COBE_IDL]MAKE.VMS;1 sys$output "idl_dir:[bin.bin_alpha]idl/share" $! $! this will use GNU_C by default if available. Comment out if prefer $! to use VAX C even when GNU_C is available. If gcclib is not in $! gnu_cc:[000000] i.e. top level GNU_CC directory make appropriate change. $if f$trnlnm("GNU_CC") .NES. "" then write sys$output "gnu_cc:[000000]gcclib/lib" $! $write sys$output "universal="+''file'' $write sys$output "sys$share:vaxcrtl/share" $deassign sys$output $compile 'file' $link/share 'file','file'.opt/opt $ i=i+1 $if i .eq. 11 then goto done $goto start $! $done: $delete *.obj;* $write sys$output "Done compiling and linking C routines." *[COBE_IDL]ONELINER.HLP;1+,g ./ h 4- 0123KPWO56`7`89G hHJHMi? CGIS-VMS.BCKg  [COBE_IDL]ONELINER.HLP;1 .Title One-Line Descriptions of UIDL Tools .Help ADDX performs extended word integer addition. AVG calculates the average over one dimension of an array AVGAREA finds the average over a circle or annulus BAR draws a color bar on the display. BATCHCUT extracts skycuts defined by a lon/lat array. BITRANGE takes an arbitrary range of bits from an array for display BOSE_EIN returns a Bose-Einstein spectrum with a chemical potential. BUILDMAP provides user-friendly access to COBE archive maps. BUILDTEE takes 1-6 cube faces and places them into an unfolded T CAPTURE copies an image from a workstation window to disk. CHECK_FITS checks that FITS header is appropriate for a given array. CLEANPLOT resets IDL system plotting variables to defaults. COLORBAR puts a color bar of any size, anywhere with the mouse CONV_UNIX_VAX converts UNIX IDL data types to VAX IDL data types. CONV_VAX_UNIX converts VAX IDL data types to UNIX IDL data types. COORCONV is a shell routine for coordinate conversion procedures CPUSEC returns the amount of cpu time consumed as a FLOAT. DATAIN reads FITS and other format files into UIDL. DATAOUT is a routine which writes out FITS files or CISS files. DBERROR separates the SIGMA and QUAL_FLAG from PhotQual. DECOMPRESS_MF decompresses DIRBE data read from BLI_TOIRSCLD. DIPOLE subtracts a dipole term from a scalar sky map. DIRBE_GAINS returns the auto or commanded gain ratios per detector DIRBE_MEPSIjd CGIS-VMS.BCKg  [COBE_IDL]ONELINER.HLP;1[ returns the MUX sequence and prints it out. DIRBE_RAWTOD returns auto-gain corrected data in process order. DIRBE_READ_PIXEL gets data for a single pixel within a time range DIRBE_READ_PIXSTR gets time strings through a central pixel DIRBE_TOD reads DIRBE data and corrects for order and gains. DOWNRES "coarsens" the resolution of a skycube or cube face. DO_MEPS applies MUX sequence to one major frame of DIRBE data. EDIV performs quadword integer division. EMUL performs quadword integer multiplication. FDECOMP decomposes a file name into its components. FIRASMOD: used to read in the FIRAS Model &Line Profile IPs, PDSs FITMU is a Bose_Einstein / Dust Residual fitting facility. FITS2X (VMS only) reads FITS hdr, array from tape to IDL arrays FITSBYTE byteswaps between FITS and internal machine formats. FITSHDR: reads and displays the primary fits header. FITSLIST (VMS) reads FITS files from tape, writes hdrs to dsk/scrn FITSPEC is a multiple blackbody fitting facility. FITSTAPE performs magnetic tape FITS format I/O FITS_INFO extracts header and data information about a FITS file. FLUX2MAG converts flux in ergs/s/cm^2/A to magnitude. FULLMAP creates a full DSK7 skymap file from a partial one. FXBREAD Read a data array from a disk FITS binary table file. FXBWRITE Write a binary data array to a disk FITS binary table file. GAPFILL interpolates across gaps in an unfolded skycube. GETNAME searches for specified file name, returnsJT ! CGIS-VMS.BCKg  [COBE_IDL]ONELINER.HLP;1~ full name & path. GETOPT converts a response string into a scalar or vector. GETPRO copies IDL procedure into current default directory. GETTOK retrieves a segment of a character string. GET_COORDS takes angular coordinates, returns floating-point values. GET_DATE returns the current date in DD/MM/YY format. GET_RESOLUTION returns a skymap's resolution. GFIT fits a gaussian plus an optional baseline to a spectrum. GRABFACE grabs a cube face from an unfolded T or sixpack HEADFITS read a simple FITS header from a disk FITS file. HELIO computes (low-precision) heliocentric coords for the planets. HOST_TO_IEEE converts IDL var. from IEEE-754 to host machine type. IEEE_TO_HOST converts IDL var. from host machine type to IEEE-754. IMSTAT returns useful statistics on an image. IPINFO reads the PDS/IP FITS header and displays field and frequency info. LABEL_DATE is a function to label axes with dates. LABELIT is a graph labeling procedure for IDL Version II. LATCIRC generates a 'latitude' circle. LATCUT selects data from a map in a specified latitude range. LEAPCHK determines if a year is a leap year. MAG2FLUX converts magnitude to flux in ergs/s/cm^2/A. MARKMAP places source position labels on images MERGE combines two vectors into one, eliminating duplicates. MIN_CURV_SURF interpolate pts w/ minimum curvature spline surface. MKBGRMOD is a general 2-D background modeling tool. MKHDR makes a FITS imageK t CGIS-VMS.BCKg  [COBE_IDL]ONELINER.HLP;1b header with required keywords. MONTHDAYS gives number of days in a month, given year and month. MOONPOS returns the apparent RA and Declination of the Moon. MULTIPOLE subtracts dipole + quadrupole terms from a scalar sky map. NICE_HISTO returns a histogram and corresponding x-vector. NYQUIST returns the Nyquist frequency of a FIRAS spectrum PIX2DAT extracts a data list from a rasterized skycube by xy coords PIX2XY creates a raster image (sky cube/face) from pixel/data list. PIXINFO returns lon/lat, x/y, pixel number, and data value PLANCK returns the spectral radiance of a blackbody. PLTIME adds a date and time to a pre-existing plot. PRECESS precesses coordinates from one equinox to another. PROJBLD generates projection lookup tables. PROJGRID overlays coordinate grids on reprojected images. PSIMAGE sets optimum size and displays (tvscl) image in postscript PUT_OWNER_ID puts owner ID and system time on hard-copy plots. PXINCIRC generates pixels within a given circle. PXINRING generates pixels within a given ring. QS1_L shifts quadword integer 1 bit to left. QS1_R shifts quadword integer 1 bit to right. RDFITS_STRUCT reads an entire FITS file into an IDL structure. READCOL reads a free-format ASCII data file with columns of data. READFITS reads simple FITS disk file data header into IDL READFMT reads a fixed format ASCII data file into IDL variables. READ_COVAR used to read in the FIRAS Covariance matrix. L,C1 CGIS-VMS.BCKg  [COBE_IDL]ONELINER.HLP;1 READ_DMR_TOD used to validate the COBE DMR Time-Ordered Data. READ_MAP_FACE returns data for a face from a Skymap dataset. READ_RDF returns field descriptions from RDF files. READ_RMS returns data for multiple fields from an RMS dataset. READ_SKYMAP returns data for multiple fields from a Skymap dataset. READ_TOD returns data for multiple fields from Time-ordered dataset. REMCHAR removes all appearances of a character from a string. REPCHR replaces one character with another in a text string. REPLAY redisplays an image previously stored using 'capture.pro' REPROJ is a general reprojection facility for skycubes. ROUND rounds a set of data to nearest absolute integers. SCDTT makes statistical analysis of Spacecraft data simple and easy. SETUP_PS configures for production of landscape PS plot files. SET_RDF defines an alternate Record Definition File. SIGMA calculates the standard deviation value of an array. SINCE_VERSION determines if current IDL release comes after user's. SIXPACK packs an unfolded skycube into 3x2 format (no wasted space). SIXUNPACK "uncompresses" the packed skycube created by SIXPACK. SKY determines the sky level in an image using MMM on 4000 pixels. SKYCUT extracts sky data along a cross-sectional cut. SMOOTHCUBE convolves an unfolded skycube with an arbitrary kernal. SORTIT sorts vector in ascending order of contents of second vector. SPEC_DIR expands a partial file specification into a full one. SPFILTER is a general spM  g e4t3R 6y"2B{,M#H(]CJ^@q|$Z&SL ~*Li7z`&foYGR e;fGn8=Wp^H&iJXvW{ J 9a1 r-2.(+{-T0s!8/u:g??t*HEQt=x,59>IH3)g}[e7Bz! n%:j#y c[@u 9 n@Pu F pd}>t!>(j\#E+MZ}Qz P}#8Ew$+R;^9s]W b^zfu)&KtU$~37$BkTOO'APc"}xM |WiQ=SX;=|Qr{D\(x:N"!1D@80yg^m s_@0.H[@B4J"th\T@ZU)f{pp9+E{206oS(uwNu{.m"WX`wSZM6kILL 4w< xz2).TV%$;I[@aG95#4@ iy23mpeVQy7 d^j|{~X>;CPP:YHqr|z(tv|yqV8)sg^Zw/uDS z-;&7_%}a(0k?tOR`|/n6bO&rO^dmTZx{s9g>~=r {(,A}QIN%1pz%0u+ 5 _ pb:?{($[Cl~4(Pc34:.F`/kU!2*bl C'0Jia24E:T. jri4Dfk".8*'ir(Ij /x|oV0?5srw&w \ Z BEAW" J@x5,*<)?#3>9^W8 jm3qI07X YY-TvCsj+J gauOb6Bb/5`\^Q L K]fdLITOTJCPF;!u=X{VSGe)-[ ,i lT6@E8 w%*PQpR"~?A<)Rh}YC50<:=CR^P>i`4+Mn-"VHsIP 0hc<; ]ti5dVo0r) "j`|<;vm('MYDCC8m:d@_A3$c #include #include "export_wrap.h" void pixavg(argc,argv) int argc; IDL_VPTR argv[]; { int i,j; IDL_LONG pix,n_sent; IDL_LONG num_pix,num_dat,tot_pix,dim[3],brk,cnt; float sent_val; char dat_typ; IDL_UCHAR n_dims,sec; /* IDL VARIABLEs */ IDL_UCHAR *b_dat, *b_newdat, b_dat0; short *i_dat, *i_newdat, i_dat0; IDL_LONG *l_dat, *l_newdat, l_dat0; float *f_dat, *f_newdat, f_dat0; double *d_dat, *d_newdat, d_dat0; short *n_obs,*n_obs0; IDL_LONG *pixel,*dims,*new_pix; IDL_VARIABLE *ret_pix, *ret_n, *ret_dat; pixel = (IDL_LONG *) argv[0]->value.arr->data; /* get pointer to pixel numbers */ num_pix = (IDL_LONG) argv[0]->value.arr->n_elts; /* get number of pixels */ dat_typ = (char) argv[1]->typeR7B} CGIS-VMS.BCKh  [COBE_IDL]PIXAVG.C;1; /* get data type */ n_dims = (IDL_UCHAR) argv[1]->value.arr->n_dim; dims = (IDL_LONG *) argv[1]->value.arr->dim; sec = (n_dims == 1) ? 1 : *(dims + n_dims - 1); /* get number of data dimensions read dimensions if n_dims=1 then sec=1 else = 2nd dim */ sent_val = (float) argv[2]-> value.f; /* get sentinal value (upper bound) */ /* count number of distinct pixels */ brk = 0; cnt = 1; for (pix=0; pixvalue.arr->data; /* get pointer to raw data */ b_newdat = (IDL_UCHAR *) IDL_MakeTempArray(IDL_TYP_BYTE,2,dim, IDL_BARR_INI_ZERO, &ret_dat); /* allocate space for averaged output */ for (i=0; i sent_val) *b_newdat = b_dat0; else n_sent++; /* if data value greater than sentinal value then initialize accumulated data else increment number of sentinal values. */ } else { b_dat0 = *(b_dat + i*num_pix + pix); if (b_dat0 > sent_val) *b_newdat = *b_newdat + b_dat0; else n_sent++; /* if data value greater than sentinal value then add to accumulated data else increment number of sentinal values. */ } } if (*n_obs0 != n_sent) T  CGIS-VMS.BCKh  [COBE_IDL]PIXAVG.C;1h *b_newdat = *b_newdat / (*n_obs0 - n_sent); /* divide by number of observations minus number of sentinals */ b_newdat++; } break; case 2: /* short integer data */ i_dat = (short *) argv[1]->value.arr->data; i_newdat = (short *) IDL_MakeTempArray(IDL_TYP_INT,2,dim, IDL_BARR_INI_ZERO, &ret_dat); for (i=0; i sent_val) *i_newdat = i_dat0; else n_sent++; } else { i_dat0 = *(i_dat + i*num_pix + pix); if (i_dat0 > sent_val) *i_newdat = *i_newdat + i_dat0; else n_sent++; } } if (*n_obs0 != n_sent) *i_newdat = *i_newdat / (*n_obs0 - n_sent); i_newdat++; } break; case 3: /* IDL_LONG integer data */ l_dat = (IDL_LONG *) argv[1]->value.arr->data; l_newdat = (IDL_LONG *) IDL_MakeTempArray(IDL_TYP_LONG,2,dim, IDL_BARR_INI_ZERO, &ret_dat); for (i=0; i sent_val) *l_newdat = l_dat0; else n_sent++; } else { l_dat0 = *(l_dat + i*num_pix + pix); if (l_dat0 > sent_val) *l_newdat = *l_newdat + l_dat0; else n_sent++; } } if (*n_obs0 != n_sent) *l_newdat = *l_newdat / (*n_obs0 - n_sent); l_newdat++; } break; case 4: /* float data */ f_dat = (float *) argv[1]->value.arr->data; f_newdat = (float *) IDL_MakeTempArray(IDL_TYP_FLOAT,2,dim, IDL_BARR_INI_ZERO, &ret_dat); for (i=0; i sent_val) *f_newdat = f_dat0; else n_sent++; } else { f_dat0 = *(f_dat + i*num_pix + pix); if (f_dat0 > sent_val) *f_newdat = *f_newdat + f_dat0; else n_sent++; } } if (*n_obs0 != n_sent) *f_newdat = *f_newdat / (*n_obs0 - n_sent); f_newdat++; } break; case 5: /* double data */ d_dat = (double *) argv[1]->value.arr->data; d_newdat = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,dim, IDL_BARR_INI_ZERO, &ret_dat); for (i=0; i sent_val) *d_newdat = d_dat0; else n_sent++; } else { d_dat0 = *(d_dat + i*num_pix + pix); if (d_dat0 > sent_val) *d_newdat = *d_newdat + d_dat0; else n_sent++; } } if (*n_obs0 != n_sent) *d_newdat = *d_newdat / (*n_obs0 - n_sent); d_newdat++; } break; } IDL_VarCopy(ret_pix,argv[0]); /* replace old pixel list with condensed list */ IDL_VarCopy(ret_dat,argv[1]); /* replace old data list with averaged data */ IDL_DELTMP(ret_n); /* free n_obs temp array */ return; } *[COBE_IDL]PROJTRAN.C;1+,i ./ h 4- 0123KPWO56Y7Y89G hHJW>w CGIS-VMS.BCKi  [COBE_IDL]PROJTRAN.C;1NL/*;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@COBECL.DNET.NASA.GOV.*/ /******************************************************************************* /* MODULE: projtran.c FUNCTION: This program generates a projection from a sky cube input. This input can be of byte, short integer, long integer, float, or double data type. The output array will be the same type as the input. It is called by the IDL JPRO procedure. There is a corresponding IDL function by the same name with the same functionality. If the linkimage is not implemented, the IDL version will be compiled and run insX- o r;1lp7Eo,aK|B'>i6O[6K$iL.9b/W@H1`5Ybl;%vK TC|fB2^6>(-79T]/eT$x]`sxwi'D sJM4b.&>'Boxx*@pqap|L qJT L6+m/9}o) hZ7HgjxknD+&_DcCVtS{c{H =oyWk5; IT?=#mG(t/ps=^b]e@B=&h <2>'rj7pFX|M=v y5U"U8D9.]@8eHW@5$kRbkEe~{_[g w"eq< +{8i6 ]r<{4QjqHSDkU0@^/7~;I2DkBH~M:q9mj@>"mP]p8sG'2E|PDKE4 ;,4 L3HT|d$,X #!$ o%gS=!m!1f WB`AW%o-$w?+!+M'uKkrXrwtW0udT`8+\:198QlCh_g3uNW>>yxFZNxb+At282)}(c9_yY?X`,?&ljRg-- Iu ? $?]c2h K.<^3u< ]N)7HS1-20jtq't^9{>'0Y\6QZYd\m)D6< vUl[?'S< )'q(AD HDOLW&-vdhKl!EW= x+'o`9xZ!`BaNE&f]T:mHF[K/,fh`:y F=2!TI: F'P>Y(";#?)%X6VLg2tEqjsXK,%-IH9]RNi)(2By?;B1DzB+O c (o;p>GFipz: K)`> Q83Yb.G2z85m 2xnP*H`F g514]{Oaiu.g?*kF"Z\ .Y Og6mI*4=P-R/0cpeBc;./Yz/L&LW2N6k_/T'|!}8{fi t.+c ijc2ek4 ~WG6@1t `@w^\HzJ+0>*c}!i85 \= 8} 5AAgKqAS=#* < E[tP~y5woUoc 3w^If@%t,n5y2_73Oi)eq"E4< C"Oo4tim5"!to*rm s.CqW)bJFJ(0[wS@KB5pvn) :\dJj/JM$W:w%ge4[sgw5W NDF&J"O IM s-3vI@oW)!K.~PrABXTf!2f*^/C|G8k3Yi CGIS-VMS.BCKi  [COBE_IDL]PROJTRAN.C;1Utead. AUTHOR: J.M. Gales (Applied Research Corp) DATE: 7/92, per CCR 619 & SPR 9818 to speed up reprojection. MODIFICATION HISTORY: DATE SPR/SER PROGRAMMER DESCRIPTION ---- ------- ---------- ----------- 11/9/92 10212 Gales Renamed from CPROJ 03/94 11614 Dan Grogan Changed "export.h" to "export_wrap.h" for IDL 3.0+ 09/95 Newmark Upgrade to IDL 4.0 COMMAND LINE ARGUMENT: input array, i_arr, j_arr, mask, face, min INPUT PARAMETERS: Name Type Description ---- ---- ----------- input array B,S,L,F,D arr unfolded skycube or single face i_arr int arr corresponding col # of input array for each projection array element j_arr int arr corresponding row # of input array for each projection array element mask byte arr projection mask (255 if outside projection, face number within) face int face number (-1 if skycube) min float minimum value of input RETURN: projected output FUNCTIONS CALLED: None *******************************************************************************/ #include #include #include "export_wrap.h" IDL_VPTR projtran(argc,argv) int argc; IDL_VPTR argv[]; { IDL_LONG i, j, k; short row, col, msk_eq, msk_ne, face; IDL_LONG inp_dim[2], prj_dim[2]; float min; IDL_UCHAR ma; char typ; /* IDL pointer VARIABLEs */ IDL_UCHAR *b_input, *b_image; short *s_input, *s_image; IDL_LONG *l_input, *l_image; float *f_input, *f_image; douZ CGIS-VMS.BCKi  [COBE_IDL]PROJTRAN.C;1Fble *d_input, *d_image; short *iarr, *jarr; IDL_UCHAR *mask; IDL_LONG *dims; IDL_VARIABLE *retdat; /* set up pointers to input */ iarr = (short *) argv[1]->value.arr->data; /* get pointer to iarr */ jarr = (short *) argv[2]->value.arr->data; /* get pointer to jarr */ mask = (IDL_UCHAR *) argv[3]->value.arr->data; /* get pointer to mask */ face = (short) argv[4]->value.i; /* get face number */ min = (float) argv[5]->value.f; /* get minumum value */ dims = (IDL_LONG *) argv[0]->value.arr->dim; /* get input dimensions */ for (i=0; i<=1; ++i) inp_dim[i] = *dims++; /* load dimensions */ dims = (IDL_LONG *) argv[1]->value.arr->dim; /* get projection dimensions */ for (i=0; i<=1; ++i) prj_dim[i] = *dims++; /* load dimensions */ typ = (char) argv[0]->type; /* get data type of input array */ /* setup pointer to input (skycube/face) array generate temporary output (projected) array */ switch (typ) { case 1: /* byte input */ b_input = (IDL_UCHAR *) argv[0]->value.arr->data; /* get pointer to input array */ b_image = (IDL_UCHAR *) IDL_MakeTempArray(IDL_TYP_BYTE,2,prj_dim, IDL_BARR_INI_ZERO, &retdat); /* allocate space for output array */ break; case 2: /* short integer input */ s_input = (short *) argv[0]->value.arr->data; /* get pointer to input array */ s_image = (short *) IDL_MakeTempArray(IDL_TYP_INT,2,prj_dim, IDL_BARR_INI_ZERO, &retdat); /* allocate space for output array */ break; ca[[ CGIS-VMS.BCKi  [COBE_IDL]PROJTRAN.C;1& se 3: /* IDL_LONG integer input */ l_input = (IDL_LONG *) argv[0]->value.arr->data; /* get pointer to input array */ l_image = (IDL_LONG *) IDL_MakeTempArray(IDL_TYP_LONG,2,prj_dim, IDL_BARR_INI_ZERO, &retdat); /* allocate space for output array */ break; case 4: /* float input */ f_input = (float *) argv[0]->value.arr->data; /* get pointer to input array */ f_image = (float *) IDL_MakeTempArray(IDL_TYP_FLOAT,2,prj_dim, IDL_BARR_INI_ZERO, &retdat); /* allocate space for output array */ break; case 5: /* double input */ d_input = (double *) argv[0]->value.arr->data; /* get pointer to input array */ d_image = (double *) IDL_MakeTempArray(IDL_TYP_DOUBLE,2,prj_dim, IDL_BARR_INI_ZERO, &retdat); /* allocate space for output array */ } /* generate projected array */ if (face == -1) /* sky cube input */ { switch (typ) { case 1: /* byte input */ for (i=0; i 42000, or whatever is necessary ;.size 33500 7500 ;modify path as appropriate setenv,'cgis_data=c:\rsi\idl50\cgis\qlut\' setenv,'cgis_fits=c:\rsi\idl50\cgis\data' setenv,'cgis_ciss=c:\rsi\idl50\cgis\data' setenv,'home=c:\rsi\idl50' setenv,'uimage_help=c:\rsi\idl50\cgis\uimage_h.dat' .run \rsi\idl50\cgis\quimage\xdispla0 .run \rsi\idl50\cgis\quimage\change_0 .run \rsi\idl50\cgis\quimage\change_1 .run \rsi\idl50\cgis\quimage\display0 .run \rsi\idl50\cgis\quimage\select_0 .run \rsi\idl50\cgis\quidl\draw_gri .run \rsi\idl50\cgis\quimage\draw_gri .run \rsi\idl50\cgis\quimage\xdisplay .run \rsi\idl50\cgis\quimage\project_image E*[COBE_IDL]QEXEC.DIR;1+,m . / h 4 - 0123 KPWO 562룜7u 룜89G hHJIb CGIS-VMS.BCKm  [COBE_IDL]QEXEC.DIR;1  ACTION.PROn  BIGWMENU.PROo CGIS.PROp  CGISHELL.PROq  CGISMAIL.PROr  CGISSTART.PROs  DISPFILE.PROt  DISPTEXT.PROu  DISPWEX.PROv  DOCDISP.PROw  GOAIPS.PROx  GOIRAF.PROy  GOPHER.PROz  GOSAO.PRO{  GOTOOS.PRO|  GOTOUIDL.PRO}  IDLNEWS.PRO~  INITWEX.PRO  LOADWEX.PRO  MOVTOCOL.PRO  MOVTOROW.PRO ONE_LINE_MENU.PRO  PAUSE.PRO  PMENU.PRO  QMENU.PRO SENDCOMMENT.PRO  SENDCOMMENT.TEMPLATE  TERASE.PRO  TEXTGRPH.PRO  TMENU.PRO  TMENUDEMO.PRO  TRANSCOM.PRO  TRANSTAB.PRO  TSCROLL.PRO  UMENU.PRO  USCROLL.PRO  WEXCNTRL.INC  WEXDISP.INC  WEXNAME.PRO  WEXPATH.INC  XSCROLL.PRO cym8  z|kcO;1 }VLCAm>ECO=V]gP/Z} |z<>(o<e4M#0IOw`U+]>yLJ x;! <]5 $L}K:3u^M_`+IF?bLN#5Iv3kl[[S%t' !O<7bV9Zc@(QmqbhY7\'"\TPW9VI#`!*Jn ;||" kF\q[oc RXo{/Y6 Vee(St0iun M$*7f]YW,G #@'5mg`nuxLTGbKzqe,V|"ljgj!CS;OuJLgv}m."*1 U 0|Ed,enJn(>A9*wIi7oX xL!qWm: CgEStY;^z'Tgv`?X uASW>/b3sVFSPFe')M9pk%"5^V8yhfxBHH+ N$]7g+syVLAC6c(lHIIE^ts$LAMhPk9ij '3}DE$ B6)?<'sex"b/<Y O@GQNym{ mQx@Xl 6o H<FCKKvcyz7E'< G@a]> Z#F|?;Sj+E5_Djom5>\U E,hoq6+Bw5)?vjiAI;OEk(0Bci8/%Rj7`5(LXgr9q:H5W:XU7TdN[YAnW;<[^id~R0u _-JP p&2ct}#`1|~R Z@ L?dT) ;8ejlJ){%|$|hd->D?2I. |@0G%&S/ tQf::wa%c( {+w J$55|}}cW,'YOc*e]h%3!)9["ejnwtg"J`$C'W_R sY wJ}>+u7OL/:TCS'GS1.xF41aMo(?\E x[v?Iuw)Flr"#ek>'hdj5B\rYEs6?d&F Ubt w}K7'23zba)adN4xmHn3omf%Zv5#Zpy|R*9b; 4k`F])=9 R@$SSUuwYNYcH_A"#`Zf8!?.uU&p$ 'vD~Bd'L CGIS-VMS.BCKn m [COBE_IDL.QEXEC]ACTION.PRO;1 0*[COBE_IDL.QEXEC]ACTION.PRO;1+,n . / h 4 B-m 0123KPWO 56s7s89G hHJ PRO Action, Command ;+ ; Description ; ----------- ; ; Calling Sequence: ; ; Action, Command ; ; where, Command is an input variable of type String. ; ; Action process the input string found in the argument Command. The ; method of processing depends on the first character of the string. ; ; If the first character is one of three special symbols ($,*, or #) ; then the remained of the string is executed in a way associate with ; the symbol. The association goes as follows: ; ; $ - spawns the string ; * - executes the string with the IDL Execute routine ; # - executes the string with the IDL Call_Procedure routine ; ; If the first symbol is not one of these, the string is assumed to ; be a WEX parameter file name and calls DispWEX to process it. ; ;# ; Called by ; --------- ; CGIS ; DispWEX ; ; Routines Called ; --------------- ; DispWEX ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, August 1992 ; SPR 11003 Jun 02 93 Cheu CGIS-VMS.BCKn m [COBE_IDL.QEXEC]ACTION.PRO;1 gange !version.os to !cgis_os. J Newmark ; SPR 11127 Oct 18 93 IDL for Windows Compatability. J. Newmark ; ;.Title ; Procedure Action ;- On_Error,2 ; Return to caller if an error occurs ; @wexdisp.inc ; Access to display control escape sequences @wexcntrl.inc ; Access to menu stack ; ;Begin, ; InitWEX ; Start up WEX system if not already started ; ; Print, "WEXStack in Action: ("+Command+")" ; DEBUG ; Print, "-----------------------------------" ; CODE ; For ii = 0, NWexs-1 do Print, ii,".)", WEXStack(ii) ; ; Dum = "" ; ; Read, Dum ; ; If (CollapseWEX eq "") then begin ; by checking WEX stack, ; windex = where( StrLowcase( Command ) eq WEXStack ) ; If (windex(0) lt 0) then begin ; processing since the command doesn't appear on the WEX stack: ; SpwnMark = "$" ExecMark = "*" ProcMark = "#" ComStr = StrTrim( Command, 2 ) FirstCh = StrMid( ComStr, 0, 1 ) ; Case FirstCh of ; SpwnMark : Begin ComStr = StrMid( ComStr, 1, StrLen( ComStr ) ) Case StrLowcase( !cgis_os ) of "vms" : Spawn, ComStr "windows" : Spawn, ComStr "unix" : Spawn, ComStr, /NoShell EndCase End ; ExecMark : Begin ComStr = StrMid( ComStr, 1, StrLen( CfL CGIS-VMS.BCKn m [COBE_IDL.QEXEC]ACTION.PRO;1 omStr ) ) Status = Execute( ComStr ) End ; ProcMark : Begin ComStr = StrMid( ComStr, 1, StrLen( ComStr ) ) Call_Procedure, ComStr End ; Else : Begin ActStr = StrLowcase( ComStr ) ; Case ActStr of "RETURN" : Return ; return to the last menu! "QUIT" : Quit = 1 ; return to IDL!! "EXIT" : Exit ; return to the oper sys!!! Else : DispWEX, ActStr ; display text! EndCase ; End ; EndCase ; EndIf Else begin ; to collapse the recursion stack to where this command appeared before, ; CollapseWEX = Command ; EndElse EndIf ; Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contag: CGIS-VMS.BCKn m [COBE_IDL.QEXEC]ACTION.PRO;1  ct us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]BIGWMENU.PRO;1+,o ./ h 4-m 0123KPWO56 y7 y89G hHJFUNCTION bigwmenu,strings,title=title,init=init,xpos=xpos,ypos=ypos, $ retain=retain,demowait=demowait ;+NAME/ONE LINE DESCRIPTION: ; BIGWMENU puts up a one-column menu on an X-window terminal. ; ;DESCRIPTION: ; This routine is analogous to the intrinsic WMENU (they both put ; up a one-column menu on an X-window terminal), only BIGWMENU ; makes a menu-window that has bigger characters. (The algorithm ; came from the STAR package). ; ;CALLING SEQUENCE: ; sel_index = bigwmenu( strings, tihtX CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1MYtle=[...], init=[...], $ ; xpos=[...], ypos=[...], retain=[...]) ; ;ARGUMENTS (I=input, O=output, []=optional) ; strings I 1-D arr str A 1-D array of option strings ; (and possibly a title too). ; title [I] keyword int Index of the element in STRINGS ; which will be the title. ; init [I] keyword int Index of the element in STRINGS ; which will be the default choice. ; xpos [I] keyword int X position (in screen coords) ; of the menu window. ; ypos [I] keyword int Y position (in screen coords) ; of the menu window. ; retain [I] keyword int If set, then the menu window ; will remain on the screen after ; the user makes his selection. ; sel_index O scalar int Index of the selected option. ; ;WARNINGS: ; 1. A value of -1 is returned in the event of any error-conditions. ; 2. If a color table is not set beforehand, then this routine will ; establish the RED TEMPERATURE color table. ; ;EXAMPLE: ; sel_index = bigwmenu(['title','option 1','option 2'],title=0) ;# ;COMMON BLOCKS: colors. ; ;LIBRARY CALLS: none. ; ;PROCEDURE: ; If this routine is invoked from a non-X-window terminal, then put ; out a message and exit. i"D CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1Check if a valid argument was supplied ; for STRINGS, if not then put out a message and exit. Determine ; what will be the title of the menu (if any) and what will be the ; options. If more options were suppled than how many can fit on ; the screen, then put out a message and exit. Calculate an appro- ; priate X-size for the menu window. If a color table is not defined, ; then define one (use RED TEMPERATURE by default). Put up the menu ; window, then monitor and respond to mouse activity. Exit when a ; mouse button is pressed. ; ;REVISION HISTORY: ; Originally written by the authors of the STAR package, to whom the ; credit belongs. ; Put in current form (small changes made) J Ewing, ARC, March 1992. ; Changed to not draw boxes for blanks. J Ewing Sept. 17, 1992. ; SPR 10264 Dec 03,92 Special color values for UIMAGE. J Ewing ; ;.TITLE ;Routine BIGWMENU ;- COMMON colors,r_orig,g_orig,b_orig,r_curr,g_curr,b_curr IF(!D.NAME NE 'X') THEN BEGIN MESSAGE,'This routine can only be run on an X-window terminal.',/CONT RETURN,-1 ENDIF locolor = 120 hicolor = 200 letcolor = 255 ; ; Redefine those values if run from UIMAGE. ; ----------------------------------------- COMMON history,uimage_version sz = SIZE(uimage_version) IF(sz(0)+sz(1) NE 0) THEN IF(uimage_version GT 0) THEN BEGIN locolor = 7 hicolor = 8 letcolor = 9 ENDIF old_window = !D.WINDOW IF(!D.NAME NE 'vms') THEN DEVICE, PSEUDO_COLOR = 8 ; ; Make sure an array of strings jbJ" CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1t*was supplied via STRINGS. ; ------------------------------------------------------- IF(N_PARAMS(0) NE 1) THEN BEGIN MESSAGE,'One parameter (an array of strings) must be supplied.',/CONT RETURN,-1 ENDIF sz = SIZE(strings) IF((sz(0) NE 1) OR (sz(2) NE 7)) THEN BEGIN MESSAGE,'The supplied parameter is not an array of strings.',/CONT RETURN,-1 ENDIF num_str = sz(1) height = 30 csize = 1.6 ; ; Set up title string (TITLE_STR) and array of options (OPTIONS). ; --------------------------------------------------------------- sz = SIZE(title) IF(sz(0)+sz(1) EQ 0) THEN BEGIN title_str = '' options = strings xsize_title = 0 title = -1 num_options = num_str ENDIF ELSE BEGIN IF((title LT 0) OR (title GE num_str)) THEN BEGIN MESSAGE,'An invalid value for TITLE was supplied.',/CONT RETURN,-1 ENDIF IF(num_str LE 1) THEN BEGIN MESSAGE,'Too few strings were supplied.',/CONT RETURN,-1 ENDIF title_str = strings(title) xsize_title = 74+STRLEN(title_str)*9 num_options = num_str - 1 options = STRARR(num_options) ii = 0 FOR i=0,num_str-1 DO IF(i NE title) THEN BEGIN options(ii) = strings(i) ii = ii+1 ENDIF ENDELSE options = STRTRIM(options, 2) ; ; Check if too many strings were supplied. ; ---------------------------------------- DEVICE,GET_SCREEN_SIZE=scrsiz IF((16+height*num_options) GT scrsiz(1)) THEN BEGIN MESSAGE,'Too many strings were supplied.',/CONT RETURN,-1 ENDIF ; ; k CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1 Calculate the X-size of the menu window. ; ---------------------------------------- WINDOW,/free,xsiz=500,/pixmap maxlen = 0 FOR i=0,num_options-1 DO BEGIN XYOUTS,0,0,'!3'+options(num_options-1-i),size=csize,/device,width=width width = width * 500 IF(width GT maxlen) THEN maxlen=width ENDFOR WDELETE xsize_options = (maxlen + (8 * 2)) > 80 xsize = MAX([xsize_title, xsize_options]) ; ; Define a color table if one isn't already defined. ; -------------------------------------------------- so = SIZE(r_orig) sc = SIZE(r_curr) IF((so(0)+so(1) EQ 0) AND (sc(0)+sc(1) EQ 0)) THEN BEGIN quiet_orig = !quiet !quiet = 1 LOADCT,3 !quiet = quiet_orig ENDIF ; ; Put up the menu window. ; ----------------------- sz = SIZE(xpos) IF(sz(0)+sz(1) EQ 0) THEN xpos = (scrsiz(0)-xsize)/2 sz = SIZE(ypos) IF(sz(0)+sz(1) EQ 0) THEN ypos = (scrsiz(1)-(16+height*num_options))/2 WINDOW,/free,xpos=xpos,ypos=ypos,xsize=xsize,ysize=num_options*height,$ title=title_str,retain=2 FOR i=0,num_options-1 DO XYOUTS,8,i*height+10,'!3'+options(num_options-1-i),$ size=csize,/device,color=letcolor xx=[2,2,2,xsize-2,xsize-2,xsize-2,xsize-2,2] sz = SIZE(init) IF(sz(0)+sz(1) NE 0) THEN BEGIN sel = init IF((title EQ -1) OR (init LE title)) THEN BEGIN yinit = height*(num_options-init-1) + height/2 ENDIF ELSE BEGIN yinit = height*(num_options-init) + height/2 sel = init - 1 ENDELSE TVCRS,xsize/2,yinit ENDIF ELSE sel = 0 osel = 0 WHILE(optl}+ CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1?ions(osel) EQ '') DO osel = osel + 1 ybox = INTARR(8,num_options) FOR i=0,num_options-1 DO BEGIN y1 = (num_options - i) * height - (height - 2) y2 = (num_options - i) * height - 2 ybox(0,i) = [y1,y2,y2,y2,y2,y1,y1,y1] ENDFOR IF(KEYWORD_SET(demowait)) THEN BEGIN PLOTS,xx,ybox(*,sel),/DEVICE,THICK=2.5,COLOR=hicolor FOR i=0,num_options-1 DO IF((i NE sel) AND (options(i) NE '')) THEN $ PLOTS,xx,ybox(*,i),/DEVICE,THICK=2.5,COLOR=locolor WAIT, demowait IF(NOT KEYWORD_SET(retain)) THEN WDELETE IF(old_window NE -1) THEN WSET,old_window RETURN, init ENDIF ; ; Monitor mouse movements. ; ------------------------ first = 1 !ERR=0 WHILE(!ERR EQ 0) DO BEGIN CURSOR,x,y,0,/DEVICE IF((y NE -1) OR (first EQ 1)) THEN BEGIN sel = num_options - FIX(y / height) - 1 IF(options(sel) EQ '') THEN sel = osel PLOTS,xx,ybox(*,sel),/DEVICE,THICK=2.5,COLOR=hicolor FOR i=0,num_options-1 DO IF((i NE sel) AND (options(i) NE '')) THEN $ PLOTS,xx,ybox(*,i),/DEVICE,THICK=2.5,COLOR=locolor ENDIF first = 0 osel = sel ENDWHILE IF(title NE -1) THEN IF(sel GE title) THEN sel=sel+1 IF(NOT KEYWORD_SET(retain)) THEN WDELETE IF(old_window NE -1) THEN WSET,old_window RETURN,sel END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it md CGIS-VMS.BCKo m [COBE_IDL.QEXEC]BIGWMENU.PRO;1&is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]CGIS.PRO;1+,p . / h 4 -m 0123KPWO 56789G hHJnQ`= LTkl4n0RLh{z}ZS6y/VQ?_lUrjHmdV{g5=5uj w(tO8 6r5!V6k_i1QeYc 'lL!]5[gflf{ W9q 9u!V+sURT'Z|(z+D0,Ys3D{StmBWc_hfu&EK^ U H@8Sg3Ck!j^-92_%JY~i(d\0 #T}H5,(ZYgSJ?RnsHUNE,cE$ }YA! mmEylB^AA0fS^fN[ U*o B{psw@UzH^h+*;5EyAjRwO7 /\&*!WI}UG]~NJ0ca:v}6aiUx[t_&<"|0G! pY X?r&( \c.<4y+lkf^!`-BW{F5za$]F-&OYD NaU64s"TOua$K!JKH?o}~~tke[;Bdu7D" W&8g<-}"KIS'EK] 2l0-(GO '!"mqV&<6ba=b'^=# S.jPIDXvFQoe-HmIVo^Y|4jZ785>u12@Dsc0f e?0=;6!$JVJ`vvqtP"9n|v^*OaB6*GZkZ9/ FRt'7;vs7D?a_ Q y H*BaRyx,AE(e-y}9p!v0>zCTQF\Ik-q?IT6c+g}45 b`^dA1Xb~8Q CkwYQd4~'\v0v(F iB}#SVV]=bTuiOLf;*+eRe;uHNTubS|Ujqli#{ U`yq"6zjQQN1a30H LpF/Z/}~LS -of3H9j_/X\0}CmBk(Wbep_DW:.*A^fvKpM3LX9OYsqkISp?oNeJ!hdZ|xs\`6x'Z871`qt+oQVTZU 1G6ojtS(~4}# d]=:\=A|u/G #=1.@NZ;a`BoDyh4e10?lJ\i^ccyUvAC/7sk%JMLH#6A>1]T } 0E%0no=bK'[tMbIj3XcM8~,{KI`o*b9JWdBYM4%s[zO7BH fwsBT>VxcT tQM-Za#S5xsCyQ3'Q % ::urjBu? B[m Or yB[]5Qr:vp;Bu%ti,S'qdF mrT%*)bp=?'Z"bF51+< [ :THN@ _09rrK[\&0T^ZOK"2iLpq~$il& 9S6oZW(e:]%ou@"<|n4)n3.;=C+p5 2`b$>*djP ]?j5uJKXt*|4^RL7 KR6=l7nE#qzb9t"/u>u [ "u M5`x~WpxGR } uw.VDPV]<-l*$3tl{+S0XD$YQh+2YI]"FhY2  'O!\XgUdI'X w2+fnz- Bmq`Bl!Eg-U}'yZ*s6Q]N,):Q'>/+I~Ib\&UW 7 =S?X{uO dg MAfY3t*\!% P8Zx 11@=Se2+" ? FZ`&god> 'wRzib(t]vwbG9dpD)#7d?,um)HFEfI9O#(**xZyFLs#3[7_z0Gsr#,/EGX d5's 5Y>A[~ rPDS WHSBAM @;F?R9+4Vo h bTJ^;d4oE=grnuJ<-1Pd}@VOC d/ZUi&E fB*J : E,,Dx#yMAli:!gNpN#&>$lm3ZCB(=B}FD9xavE /$.p^Xd"(30,cJ z7m \RT:%}Z$,:9GIX^%?9KR'>$wvRGIW%$i=4Tks8YfXd`ibRoABl< @Y.O0ZL%yyDMoe !374gMaLLR(YDS5b..*c+ Q>nG~8X q;"-E~c5!eA;1@Y?@K@X/HC0_Dh.iW[DM@|_UAWsA78o{_a9- B}(cAb^vTvBr"|.[IpU_wsQ1f 2|q^5C4=L*G)_ ed?I@GX@KG a/qAufo Yb[[ ,1$vMVPOLR_RGuYwNR-5Q^h>964ag{ D\4oZDtua5usfs&2wjhb5{h`$= 2'8z<"n;0 8;7tk$ CGIS-VMS.BCKv m [COBE_IDL.QEXEC]DISPWEX.PRO;1>;crn+CursrHome, Format="(A,$)" $ else Print, ' ' Message, " Error encountered in selection menu!" EndIf ; Case ActStr of "exit" : Exit ; return to the operating system!!! "quit" : Quit = 1 ; return to IDL!! "return" : EndLoop = 1 ; return to text or the last menu! "next" : indx = ((indx+1) mod LastComp) ; ; jump to next WEX component "prev" : indx = ((LastComp+indx-1) mod LastComp) ; ; jump to previous WEX component Else : Action, ActStr ; do action EndCase ; If (EndLoop and not XEnv) then $ Print, EraseScrn+CursrHome, Format="(A,$)" ; ; The following statement stops the recursion collapse: If (CollapseWEX eq Name) then CollapseWEX = "" EndIf EndWhile ; NWEXs = NWEXs - 1 If (NWEXs gt 0) then WEXStack = WEXStack( IndGen( NWEXs ) ) $ else WEXStack = "" ; Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifica(K CGIS-VMS.BCKv m [COBE_IDL.QEXEC]DISPWEX.PRO;1tions in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. o*[COBE_IDL.QEXEC]DOCDISP.PRO;1+,w . / h 4 -m 0123KPWO 56T֔7T֔89G hHJb CGIS-VMS.BCKw m [COBE_IDL.QEXEC]DOCDISP.PRO;1  PRO DocDisp, DocFile, DocName ;+ ; Description ; ----------- ; DocDisp displays the document file specified in the input variable ; DocFile using the WEX system routine Action. A message is issued ; to the user that the document is being retrieved and refers to ; the document's name or title (which is specified by the input var- ; iable DocName). ; ; Calling Sequence: ; ; DocDisp, DocFile, DocName ; ; where, ; ; DocFile - is an input string variable containing the document's ; file name. ; ; DocName - is an input string variable containing the document's ; title. ;# ; Called by ; --------- ; Action ; ; Routines Called ; --------------- ; Action ; ; History ; ------- ; Created by C. Groden, Universities Space Research Association, Dec 1992 ; ;.Title ; Procedure DocDisp ;- ; On_Error, 2 ; Return to called on error ; ; Begin ; Print, " Please wait while "+DocName+" is being retrieved..." Action, DocFile Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or |NV CGIS-VMS.BCKw m [COBE_IDL.QEXEC]DOCDISP.PRO;1 :<implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]GOAIPS.PRO;1+,x . / h 4 -m 0123KPWO 56n7n89G hHJ;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; GOAIPS invokes aips using the approriate OS command ; ;DESCRIPTION: ; GOAIPS checks the IDL system variable !version.os and ; branches to the appropriate section of code. It then invokes ; a command procedure or a shell script to startup aips ; ;CALLING SEQUENCE: ; GOAIPS ; ;ARGUMENTS (I = input, O = output, [] = optional): ; NONE ; ;WARNINGS: ; ;EXAMPLE: ;# ;COMMON BLOCKS: ; None ; ;PROCEDURE (AND OTHER PROGRAMMING NOTES): ; ;PERTIʦYz~t 176V[_ Kp.:FYHkk{r1^* yY ZTK)MLg v"4;GoQYrO #Z{7>}l5=~ uW l+fzak:W,lWtP2wWk{do)qt2-|Cfk_;75g J%anrm;4-(/'&:Mb;'4~.&p"t7>[&W9/?FwV[QTMjKGn3'%.^Dge=2t^x`=vugibfE~&GCn>g9M)| I2^/qH$x'|r6|L\Z7Hg=,cTvb jkL`na@Ef= *b> [i6Cm`QfjZP2PRPUQmN>>vvK X!?mEp>VLQA'KXj|,U  8 C}Sk4*LYe*)9eG {#d@ i{}Lp B> "=5e_W2Q[P C>0jva{]AIue4>h^|=,VTsR$j1Nua*S0~XwPu7R:7NT3y|:'F+A-~gM2LNkh=@ %?=xp[U}4Qv33*bDMv ~M1Z#z~ W SI_*Z BMwfUTwpGM7\LK\Np q {isuNfpa >JZjZ]8[P"=Y  DH^ O b'>Aj NB> QBֱ6!g] "d.!~rL||hccz2mW8DG._B%o24LJ;}`Le;MT1%Gte-rI|1b]@JwZ^rOjf @$ ;Y4] a IF{LWBj~R~{gF3AbYe.iP,S[WPBBwy`8$}Ww!ZLACu)M N |2(tZO/z~>gDf2\j#iAy-$L8IVTgSU{^&M s=J1V5E DA/NtF;l}P|N _)F[(T:4DPQ3<*iQ]3U)nA)O9vo*n~/S0LT02@_i"y9i$G P7w?T,f sZk2;C >yCEUy97xFP$RR$8xkTu~g<54 B7,Ic'c A@Oa_=l.-|ZL+3Wu!dP+XRO9;s# V;WQ"5 !H0dGW@v$% .T=( ;,-`GX;M\4dAfr 6zI):~/f,cq}J 2Z 4pGomNC<5oYn;2%mx4X1e -$_.Xu_e()m_K$}nX;`5$9WW(V#Xo4LFm.lY&F$.+kq;I2>X .kQUNt;Oj/n=0j8tmXo :<KF|e{g|\MJ1>7CGM Uwbdv#FE1+P1~#k(3V[v kIm^i$ @S *KB"%[ykoeV=Mkby 94i0L/0G[( J1GENN_M^CH*5\t~hid9Nu=O MZwzZvMUlBGy'A4[Mk>eBaFQ2mhcE#SUq{MB@~=|!EYM;73*x1i_ CGIS-VMS.BCKx m [COBE_IDL.QEXEC]GOAIPS.PRO;1 fNENT ALGORITHMS, LIBRARY CALLS, ETC.: ; None ; ;MODIFICATION HISTORY: ; Written by Dave Bazell, General Sciences Corp. Mar 1993 spr 10687 ; SPR 11003 Jun 02 93 Change !version.os to !cgis_os. J Newmark ; ;.TITLE ; Routine GOAIPS ;- ; ; Check on input parameters ; pro goaips on_error, 2 case !cgis_os of 'vms' : spawn, '@aips$disk:[aips]aipstart.com' 'unix': spawn, 'source $csrc/qultrix/goaips.csh' 'win': spawn, 'source csrc\win\goaips.csh' endcase end ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. 2׉' CGIS-VMS.BCKy m [COBE_IDL.QEXEC]GOIRAF.PRO;1 *[COBE_IDL.QEXEC]GOIRAF.PRO;1+,y . / h 4 -m 0123KPWO 56789G hHJ;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; GOIRAF invokes the iraf startup command approriate to the OS ; ;DESCRIPTION: ; GOIRAF checks the IDL system variable !version.os and ; branches to the appropriate section of code. It then invokes ; a command procedure or a shell script to start up iraf ; ;CALLING SEQUENCE: ; GOIRAF ; ;ARGUMENTS (I = input, O = output, [] = optional): ; NONE ; ;WARNINGS: ; ;EXAMPLE: ;# ;COMMON BLOCKS: ; None ; ;PROCEDURE (AND OTHER PROGRAMMING NOTES): ; ;PERTINENT ALGORITHMS, LIBRARY CALLS, ETC.: ; None ; ;MODIFICATION HISTORY: ; Written by Dave Bazell, General Sciences Corp. Mar 1993 spr 10687 ; SPR 11003 Jun 02 93 Change !version.os to !cgis_os. J Newmark ; ;.TITLE ; Routine GOIRAF ;- ; ; Check on input parameters ; pro goiraf on_error, 2 case !cgis_os of 'vms' : spawn, '@CGIS$IDL:StartIRAF' 'unix': spawn, 'source $csrc/qultrix/goiraf.csh' 'win': spawn, 'source csrc\win\goiraf.csh' endcase end ;DISCLAIMER: ; ;This soft{M CGIS-VMS.BCKy m [COBE_IDL.QEXEC]GOIRAF.PRO;1 bware was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]GOPHER.PRO;1+,z . / h 4 -m 0123KPWO 56789G hHJ\ CGIS-VMS.BCKz m [COBE_IDL.QEXEC]GOPHER.PRO;1  PRO Gopher ;+ ; Description ; ----------- ; Gopher uses the IDL Spawn procedure to initiate a Gopher telnet session. ;# ; Called by ; --------- ; CGIS ; ; Routines Called ; --------------- ; None ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, April 1992 ; ;.Title ; Procedure Gopher ;- On_Error, 2 ; return to calling procedure if an error occurs ; @wexdisp.inc ; ;Begin Print, "Enter "+BoldText+"gopher"+NormVideo+ $ " when the "+BoldText+"login:"+NormVideo+ $ " prompt appears." Print, " " Print, "Setting up telnet session. Please wait..." Print, " " Spawn, "telnet gopher.gsfc.nasa.gov" End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has n?f CGIS-VMS.BCKz m [COBE_IDL.QEXEC]GOPHER.PRO;1 Got been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]GOSAO.PRO;1+,{ . / h 4 -m 0123KPWO 5687889G hHJ;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; GOSAO invokes the saoimage command approriate to the OS to spawn ; saoimage. ; ;DESCRIPTION: ; GOSAO checks the IDL system variable !version.os and ; branches to the appropriate section of code. It then invokes ; a command procedure or a shell script to startup saoimage. ; ;CALLING SEQUENCE: ; GOSAO ; ;ARGUMENTS (I = input, O = output, [] = optional): ; NONE ; ;WARNINGS: ; ;EXAMPLE: ;# ;COMMON BLOCKS: ; None ; ;PROCEDURE (AND OTg86 CGIS-VMS.BCK{ m OBE_IDL.QEXEC]GOSAO.PRO;1 ]HER PROGRAMMING NOTES): ; ;PERTINENT ALGORITHMS, LIBRARY CALLS, ETC.: ; None ; ;MODIFICATION HISTORY: ; Written by Dave Bazell, General Sciences Corp. Mar 1993 spr 10687 ; SPR 11003 Jun 02 93 Change !version.os to !cgis_os. J Newmark ; ;.TITLE ; Routine GOSAO ;- ; ; Check on input parameters ; pro gosao on_error, 2 case !cgis_os of 'vms' : spawn, '@cgis$idl:SAOImage.com' 'unix': spawn, 'source $csrc/qultrix/saoimage.csh' 'win': spawn, 'source csrc\win\saoimage.csh' endcase end ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. p CGIS-VMS.BCK| m [COBE_IDL.QEXEC]GOTOOS.PRO;1 *[COBE_IDL.QEXEC]GOTOOS.PRO;1+,| . / h 4 -m 0123KPWO 56i7i89G hHJ Pro GotoOS ;+ ; Description ; ----------- ; GotoOS is used to verify with the user that they wish exit the ; CGIS (and UIDL) system and go to the operating system. They are ; warned that any data (in memory) they did not save would be lost. ; ;# ; Called by ; --------- ; CGISMAIN.MNU (Parameter file for CGIS Main Menu) ; ; Routines Called ; --------------- ; InitWEX DispText ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, August 1992 ; ; 11/23/92 KRT Documented and integrated into the WEX system (SPR 10216). ; ;.Title ; Procedure GotoOS ;- On_Error,2 ; Return to caller if an error occurs ; @wexdisp.inc ; Access to WEX global variables for display device control @wexcntrl.inc ; Access to WEX stack, recursion control, and WEX components ; ;Begin ; InitWEX ; Initialize WEX if it isn't. ; Print, EraseScrn+CursrHome ; ; 1234567890123456789012345678901234567890123456789 a = " l CGIS-VMS.BCK| m [COBE_IDL.QEXEC]GOTOOS.PRO;1  " b = " All data will be removed from memory upon exit. " c = " " d = " Be sure you have written to disk any images or " e = " arrays you have created and wish to save. " f = " " ; CurrRow = 3 CurrCol = 15 ; Width = 49 Top = 0 Bottom = 5 ; WEXTitle = "**** CGIS EXIT ****" WEXMessage = "**** CGIS EXIT ****" Text = [ a, b, c, d, e, f ] ; DispText, Text, Width, Top, Bottom Print, TxtCursrON ; Enable text cursor ; Print, " " Print, " " Print, " " Print, " Exit CGIS? (Y/N)", Format = '($,15X,A)' ; Answer = '' Read, Answer ; If ((Answer eq 'Y') or (Answer eq 'y')) then Exit Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to reporA CGIS-VMS.BCK| m [COBE_IDL.QEXEC]GOTOOS.PRO;1 R]t the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]GOTOUIDL.PRO;1+,} . / h 4 -m 0123KPWO 56q7q89G hHJ PRO GotoUIDL, Quit ;+ ; Description ; ----------- ; GotoUIDL simply writes instruction to the user as to how to ; return to the CGIS menu system as it exits to UIDL. This ; procedure is invoked from the CGIS main menu. The actual ; exit is performed by the WEX system since the global WEX ; variable Quit is set to 1. ; ;# ; Called by ; --------- ; CGISMAIN.MNU (CGIS main menu parameter file) ; ; Routines Called ; --------------- ; InitWEX ; ; History ; ------- ; Created by zw CGIS-VMS.BCK} m [COBE_IDL.QEXEC]GOTOUIDL.PRO;1 K. Turpie, General Sciences Corporation, August 1992 ; ; 11/23/92 KRT Documented and integrated into the WEX system (SPR 10216). ; ;.Title ; Procedure GotoUIDL ;- On_Error,2 ; Return to caller if an error occurs ; @wexdisp.inc ; Access to WEX global variable for display device control ; ;Begin, InitWEX ; Print, EraseScrn+CursrHome Print, " Type "+BoldText+"EXIT"+NormVideo+" to return to VMS or" Print, " type "+BoldText+"CGIS"+NormVideo+" to return to the main menu..." Print, " " Quit = 1 Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. 3gakcO;13!kh %4V`Ei# ,Qh:},d$uK5 ufa oo}?n>5k1L6 hU@~&^gC[>6.HmpQe e."#6TH]8b:@fc?H|zn6Ng_NIr>1p!4-&?etg,zJIhw3x<I+TydvQr<; N|d00";d{`DS GbzTonf{\ Mc2GY"I|d!e71Z+B3)4u}. `ij'-s}rvuypTa5(n;B1@E~]Cu'_pdy- '^p-9vVO@6QBxA!P=<pL)^7Z>tG"nZR9nQV"[*!15!7,yskQnJrT0Q/V:_tkP,?s"+'F0)d->?LO&5kOnw 18LapYt >8[pdoEN{b ; a6$MKA6UAp(6[WCMI8E_zS=OLT@Aikt,Ez <&KHSI@#AP*JBvY7r% SxRJ O&_1i^q!t o d~ !(/iB,M(z!ho Mgs #k%:Wwd8eSo-s3zzfp]yeY/{\UwvQ"W~}MD;zw(3CqU#"(X<w\G>54SxgL+\@P~ ke}"&Rd-M2yxu8U\9~#;$S)'Lj3IDm.o3( Zh${SbLQ-[T@p9F5"Iky%Bc8ABK^0wM~n2"F~5xj!B,e G6Tr=E T]m$V4OeƕC\PL=c;klz[J=_) +A0ML'l>SQ$cj:Gx FFHKNRgZHgx5qGY/>,S3.C8=)=_o  *grW-ESXK~$)[&c/arJsa8xX|`NJs(7SIYM}izN~0%::IWk Z)DJWL,nv@e;%Ex-QK0|Y[D(.BTh[`Co[Y^X CSM2qexj$ivEXMl%Yr"0CRYjDr{grs;CKEq$q[E@S&}r:3rhv\ U $t#4aJcy3<1[rZMW%CA`[[^G+%w_,aCpyTOoAk9APrrIIg xuP6pn$4%9-8)8yNdq>"eN=abr (>C\2U-x/s/@^t %%7*po~q 0%'UAG:)W`wvp$y#rimw??`b@~r kZtu.}o i=c{s*P)Wu1<#XJg5;/R *5kj8&n|ba`s!qi;5f@- je 9TI=!xIq".oK)@ުhKl;'AzX]45N~,\r/&$Ytfw+&| )V{\8GR'MV3:XL s]}`?6vQ+NCvu")-q=z3s!$T;+zbU EPu%s4Uas7&|/l'o(1<90a^z^(3k]xt_%)WkvE-'6Mt>ks0bl!!&1nd#CDK@ W\@^/QSHAjkbw.AKN ]H OSEF CGIS-VMS.BCK~ m [COBE_IDL.QEXEC]IDLNEWS.PRO;1 *[COBE_IDL.QEXEC]IDLNEWS.PRO;1+,~ . / h 4 |-m 0123KPWO 56789G hHJ PRO IDLNews ;+ ; NAME ; IDLNEWS ; ; PURPOSE: ; IDLNEWS displays the news file stored in CSDR$BULLETIN:[IDL]NEWS.ASC ; and displays the text using the menu management software. ; ; CATEGORY: ; User interface. ; ; CALLING SEQUENCE: ; IDLNEWS ; ; INPUTS: ; None. ; ; OUTPUTS: ; None. ; ; COMMON BLOCKS: ; None. ; ; RESTRICTIONS: ; None. ; ; MODIFICATION HISTORY: ; Creation: K.Turpie GSC/SAIC November 1992 ; ; 11/22/92 KRT Remove QUIT argument from call to Action (SPR 10216) ;- On_Error, 2 ; HoldQuiet = !Quiet !Quiet = 1 ; Quit = 0 Action, "NEWS.ASC" ; !Quiet = HoldQuiet End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you mod)*H CGIS-VMS.BCK~ m [COBE_IDL.QEXEC]IDLNEWS.PRO;1 }ify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]INITWEX.PRO;1+, . / h 4 -m 0123KPWO 56M~ŝ7M~ŝ89G hHJwL CGIS-VMS.BCK m [COBE_IDL.QEXEC]INITWEX.PRO;1  PRO InitWEX, AGAIN=Again ;+ ; Description ; ----------- ; InitWEX initializes WEX system. WEX stack and control variables are ; defined and initialized. File and directory names are defined for ; global accessibility throughout the WEX system and its various compo- ; nents. Also, terminal control sequences are setup and passed through ; a call to TextGrph. ;# ; Called by ; --------- ; CGIS ; UImage ; UHelp ; UScroll ; ; Routines Called ; --------------- ; TextGrph ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, November 1992 ; ; 12/21/92 KRT Added keyword /AGAIN for forcing reinitialization of ; WEXStack and other control variables. ; ; 12/28/92 KRT Changed the ____Path variables to arrays of paths and ; called them ____Paths. WEXName uses each element of ; array WEXPaths to search for a WEX file. ; ; Changing the names facilitated moving the reinitialization ; block around the entire procedure (except Quit = 0). ; ; Used N_Elements to test for previous initialization instead ; of Size. ; ; 01/06/92 KRT Change Oneliner.Pro to Oneliner.Hlp and put a / at the ; beginning of the default UNIX path specification. ; ; 01/03/93 DB Change OSPaths to include doc subdirectories ; SPR 10630 ; 04/07/93 DB Change OSPaths to reference a relative path rather ; than i# CGIS-VMS.BCK m [COBE_IDL.QEXEC]INITWEX.PRO;1 %Pan absolute path SPR 10805 ; ; 05/28/93 KRT Added global variable defaults for mail and editor ; SPR 11003 Jun 02 93 Change !version.os to !cgis_os. J Newmark ; SPR 11127 06 Jul 1993 IDL for Windows compatability. J. Newmark ; ;.Title ; Procedure InitWEX ;- On_Error,2 ; Return to caller if an error occurs ; @wexcntrl.inc ; Access to WEX stack and recursion control variables @wexdisp.inc ; Access to display control command sequences @wexpath.inc ; Access to global help file name and path ; ;Begin, ; Force = KeyWord_Set( Again ) Quit = 0 ; ; Check to see if the WEX System has be initialized yet: ; Not_Setup_Yet = (N_Elements( NWEXs ) eq 0) ; If ((Not_Setup_Yet) or Force) then begin ; ; Initialize WEX stack and recursion variables: ; NWEXs = 0 CollapseWEX = "" WEXStack = "" ; ; Set-up display control command sequences: ; TextGrph ; ; Set-up default file path and extensions: ; Case StrLowcase( !cgis_os ) of 'vms' : OSPaths = [ "#CGIS_IDL#.*]" ] 'windows' : OSPaths = [ " ","C:\RSI\IDL_5\CGIS\QHELP\",$ "C:\RSI\IDL_5\CGIS\QUIDL\","C:\RSI\IDL_5\CGIS\QUIMAGE"] 'unix' : OSPaths = [ " ", "$csrc/*/", $ "$csrc/doc/*/" ] EndCase ; If (N_Elements( WEXPaths ) le 0) then WEXPaths = [ OSPaths ] ; ; Set-up default mail facility: ; DefSysV, '!VMSMail', 'mail' DefSysV, '!UNIXMail', 'vmail' DefSysV, '!PCMail', 'mai CGIS-VMS.BCK m [COBE_IDL.QEXEC]INITWEX.PRO;1 \l' ; ; Set-up default editors: ; DefSysV, '!VMSEdit', 'edit' DefSysV, '!UNIXEdit', 'emacs' DefSysV, '!PCEdit', 'edit' ; ; Other WEX system constants: ; HlpExt = '.hlp' ProExt = '.pro' MainHelp = 'main'+HlpExt ScrollHelp = 'scroll'+HlpExt ; If (N_Elements( Keyfiles ) le 0) then $ Keyfiles = [ "oneliner.hlp" ] ; ;------Keyfiles = [ "oneliner.pro", "userlib.hlp" ] EndIf ; Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. " CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1*[COBE_IDL.QEXEC]LOADWEX.PRO;1+, ./ h 4*-m 0123KPWO56d7d89G hHJ PRO LoadWEX, WEXFile, Text, Title, SubTopic, SubFile, ErrStat ;+ ; Description ; ----------- ; LoadWEX reads and parses a WEX format file in order to extract text, ; file title, related topics to the text, and what files are they ; located in. The information is used to build menus and text screens. ; ; Calling Sequence: ; ; LoadWEX, WEXFile, Text, Title, SubTopic, SubFile, ErrStat ; ; where, ; ; WEXFile = input string variable containing the WEX file name ; ; Text = output array of strings containing text found in the ; WEX file. ; ; Title = output string variable which passes the title of ; the WEX component defined in the WEX file. ; ; SubTopic = output string array containing a list of menu items ; found in the WEX file. ; ; SubFile = output string array containing a list of file names ; or command associated with the items in SubTopic. ; ; ErrStat = output var0k CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1*;iable returning the I/O error status. ;# ; Called by ; --------- ; DispHelp ; DispWEX ; Extract ; KeyHelp ; MenuHelp ; SpecHelp ; ; Routines Called ; --------------- ; InitWEX WEXName ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, November 1992 ; ; 01/14/93 KRT Added test and error handling for null WEX acquistion... ; the answer to SPR 10455. ; ;.Title ; Procedure LoadWEX ;- ; On_Error,2 ; Return to caller if an error occurs ; ;Begin, ; ; Initialize Variables : ; InitWEX ; Title = '' ; Title is set to blank if not found Record = '' ; String for holding input record KeyWord = '' ; String for holding control keywords ; CMark = ';' ; Comment marker GetComm = 0 ; Flag comment input: 1 = input 0 = cull StripMode = 0 ; Mode flag for striping off first character KeyStart = 0 ; Logical indicating that a keyword mode has started KeyMark = '.' ; Keyword marker SFNMark = '==>' ; Subfile name symbol MrkLen = StrLen( SFNMark ) ; ; Open WEX Files : ; FileName = WEXName( WEXFile ) Get_LUN, LUN ; OpenR, LUN, FileName, Error=ErrStat ; ; Open Error Exception Handling ; ----------------------------- ; If (ErrStat ne 0) then begin Free_LUN, LUN RETURN EndIf ; ; WEX File Input Loop ; ------------------- ; While (not EoF( LUN )) do begin ; ReadF, LUN, Record ݧī CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1 ; Read record ProCheck = StrMid( Record, 0, 2) ; check for keyword marker ; Case ProCheck of ; ';+' :Begin KeyStart = 1 KeyWord = 'HELP' StripMode = 1 GetComm = 0 End ; ';#' :Begin KeyStart = 1 KeyWord = 'CODING' StripMode = 1 GetComm = 0 End ; ';-' :Begin KeyStart = 1 KeyWord = 'SOURCE' StripMode = 0 GetComm = 1 End Else: EndCase ; If (StripMode) then Record = StrMid( Record, 1, StrLen( Record ) ) ; FirstChr = StrMid( Record, 0, 1 ) ; If ((GetComm) or (FirstChr ne CMark)) then begin If (FirstChr eq KeyMark) then begin ; ; Keyword set the mode for a certain type of input action: ; KeyStart = 1 KeyWord = StrUpcase( StrTrim( Record, 2 ) ) KeyLen = StrLen( KeyWord ) - 1 KeyWord = StrMid( KeyWord, 1, KeyLen ) ; ; Check to see if the keyword is properly set: ; If (not ((KeyWord eq 'HELP') or $ (KeyWord eq 'TEXT') or $ (KeyWord eq 'SOURCE') or $ (KeyWord eq 'EXAMPLES') or $ (KeyWord eq 'TITLE') CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1" or $ (KeyWord eq 'SUBTOPICS') or $ (KeyWord eq 'HYPERTEXT') or $ (KeyWord eq CMark)) ) then begin ; Print, 'The following record in the WEX file has a bad keyword' Print, Record RETURN ; Error Exception Handling: Return to Caller! ; EndIf ; EndIf Else begin ; ; Actions taken for each mode : ; Case KeyWord of 'HELP' :Begin ; reading in text If (KeyStart) then begin Text = [ Record ] KeyStart = 0 EndIf Else begin Text = [ Text, Record ] EndElse End ; 'TEXT' :Begin ; reading in text If (KeyStart) then begin Text = [ Record ] KeyStart = 0 EndIf Else begin Text = [ Text, Record ] EndElse End ; 'TITLE' :Begin ; reading in title Title = StrTrim( Record, 2 ) KeyStart = 0 End ; 'SUBTOPICS' :Begin ; reading inV| CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1 subtopics and subfiles ; ; If (Record ne '') then begin ; getting subtopic and corresponding subfile, ; ; Parse out the subfile name : RecLen = StrLen( Record ) SFNPos = StrPos( Record, SFNMark )+MrkLen ; ; Parse out the subtopic name : DescEnd = SFNPos-MrkLen-1 Descrptn = StrMid( Record, 0, DescEnd ) Descrptn = StrTrim( Descrptn, 2 ) SFName = StrMid( Record, SFNPos, RecLen ) SFName = StrTrim( SFName, 2 ) ; If (KeyStart) then begin ; getting the first subtopic and subfile : ; SubTopic = [ Descrptn ] SubFile = [ SFName ] KeyStart = 0 ; EndIf Else begin ; building subtopic and subfile arrays : ; SubTopic = [ SubTopic, Descrptn ] SubFile = [ SubFile, SFName ] ; EndElse ; EndIf End Else: EndՑw~L "D )~Hjff<&pcR%2m-p^/NLdu.x{R|f2{jxGev9)+dKaLCHIJ_R/LP4m=& "3ZW;\${Xbq"dE(XSvsz%R[\?3M#3 C}VU=h?Iz e B*Z*d9@Eq&iMkUZKa v-.D|'JArkfwv:S;UB!2FdlU&8OpX[;a<(m1)bY8N)u1$lZLEHYDL~+wW:6PTK[G>4= [^1j[%Ik*R!Q<F'ES^iYV`gARUNf\nm2Ng]^WeVGw$N # |E;P9-E#1bQ/.x zh~suo *XrQ9  0u&]ek>61mi35+wjm 7SY mXL^qL{2y*_0o aA!Y* ~Ky!`m(-(^*);DK*W.6pb Y :H^?~JqZ)+%/VK;FcwwF\ LknAc&6(fc+wah%lH!">*j"mS?^?{c+~o>+juDwUQ8UH9')"4zZ%5i'`&3YN(8g!sh?#qsw{0H[" (uImr$yz?Tm R^v/ )`U<;wo Zq\t^a$T|P&y,6G9+PEC@(nmbeqUQy$N{6|U27|m2 ^q @@.6Pkr= Mx+2VKz&BapY n hfUwe_$/Wu_5ScE _uxY5 ^M|{O&H;""8sDdR}Kv BW_Rp[cb 4c}8k%o!.*luW?l%ji-,+`O-kMP~K1a&'GeoOs(_0L2e#Q57Ke{=o(|j6J~/etks;U:bC RIEHvohS m,d$O .2099Semp &r{pUaW\@RSd1w s1Z( +ooB-EI! "*6)s[ +H@@+?w"Rb * [ yTJ 6F~H'w`nWUPdMRnoo .8mZIBJ0 nd J~Wk CGIS-VMS.BCK m [COBE_IDL.QEXEC]LOADWEX.PRO;1"Case ; EndElse EndIf EndWhile ; If (not ErrStat) then begin Close, LUN Free_LUN, LUN EndIf ; If ((N_Elements( Subtopic ) eq 0) and (N_Elements( Text ) eq 0)) then begin ErrStat = -999 Print, "WEX File '"+FileName+"' was empty or had no WEX keywords." EndIf ; Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. ^. CGIS-VMS.BCK m [COBE_IDL.QEXEC]MOVTOCOL.PRO;1 a*[COBE_IDL.QEXEC]MOVTOCOL.PRO;1+, . / h 4 j-m 0123KPWO 56b7b89G hHJ Function MovToCol, Col ;+ ; Description ; ----------- ; MovToCol returns the escape sequence to move the cursor to column Col. ; This movement is relative to the current cursor position. If used ; before the result of MovToRow, the MovToRow command will move the ; cursor back to the first column. ;# ; Called by ; --------- ; DispText ; TErase ; ; Routines Called ; --------------- ; ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, February 1992 ; ; 11/23/92 KRT Documentation extended per SPR 10216. ; 01/25/93 KRT Reduced to a one-liner. ; Used StrN instead of String. ; ;.Title ; Function MovToCol ;- On_Error, 2 ; Return to calling procedure if there an error. ; ;Begin, If (Col-1 le 0) then Return, String( 27b ) + '[' + 'D' $ else Return, String( 27b ) + '[' + StrN( (Col-1) ) + 'C' End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic k(R CGIS-VMS.BCK m [COBE_IDL.QEXEC]MOVTOCOL.PRO;1 vBackground Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]MOVTOROW.PRO;1+, . / h 4 -m 0123KPWO 56789G hHJd[ CGIS-VMS.BCK m [COBE_IDL.QEXEC]MOVTOROW.PRO;1 5 Function MovToRow, Row ;+ ; Description ; ----------- ; MovToRow returns the escape sequence to move the cursor to row Row. ;# ; Called by ; --------- ; DispText ; TErase ; ; Routines Called ; --------------- ; ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, February 1992 ; ; 11/23/92 KRT Extended documentation per SPR 10216. ; 01/25/92 KRT Changed from the B command to the ;f command. ; Used StrN instead of String. ; ;.Title ; Function MovToRow ;- On_Error, 2 ; Return to the calling procedure if an error occurs. ; ;Begin, CSI = String( 27b )+'[' Command = CSI + StrN( Row ) + ';f' ; Return, Command End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analyƵ CGIS-VMS.BCK m [COBE_IDL.QEXEC]MOVTOROW.PRO;1 sis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. #*[COBE_IDL.QEXEC]ONE_LINE_MENU.PRO;1+, . / h 4 K-m 0123KPWO 56%ǝ7%ǝ89G hHJFUNCTION one_line_menu, strings, init = init, demowait = demowait ;+ ; NAME: ; one_line_menu ; PURPOSE: ; This function displays a menu whose choices are given by the ; elements of a string array, and then returns the index of that ; choice which the user selects. The menu is laid out horizontally. ; The first element in the STRINGS array is interpreted as a ; prompt string. ; CATEGORY: ; Menu, User interface. ; CALLING SEQUENCE: ; i = one_line_menu(strings, init = init) ; IN) CGIS-VMS.BCK m #[COBE_IDL.QEXEC]ONE_LINE_MENU.PRO;1 PUTS: ; STRINGS = A string array. The first element is interpreted ; as a prompt string, and other elemnents are options. There ; must be at least 3 elements altogether. ; INIT = index of the element in STRINGS which will be the initial ; choice. ; DEMOWAIT = delay (in seconds) after which the program will exit, ; returning the value of INIT (for demo purposes only). ; OUTPUTS: ; The index number of the selected menu item. A value of -1 is ; returned if this function is called incorrectly. ; ; EXAMPLE: ; sel = one_line_menu(['{B}Question 1:{N} Which option do you' + $ ; 'prefer?','Portrait','Landscape']) ; COMMON BLOCKS: ; None. ; RESTRICTIONS: ; There is a limit on the number of characters allowable. ; MODIFICATION HISTORY: ; Creation: John A. Ewing, ARC, March 1992. ; Modified so cursor can jump from last item to first and vice versa ; John Ewing Oct. 23, 1992. ; SPR 10260 - changed GET_KBRD calls to use 1 instead of 0 (JAE) ; SPR 11003 Jun 02 93 Changed !version.os to !cgis_os. J Newmark ; SPR 11127 06 Jul 1993 IDL for Windows compatability. J. Newmark ; SPR 11296 09 Sep 1993 Call UMENU for actual menu display. J. Newmark ;- IF (!cgis_os EQ 'vms') THEN cr = STRING(13b) ELSE cr = STRING(10b) IF (!cgis_os EQ 'windows') THEN cr='' ; ; Check the validity of what was supplied for the "STRINGS" argument. ; ------------------------------------------------------------------- IF(N_PARAMS(0) q[Y CGIS-VMS.BCK m #[COBE_IDL.QEXEC]ONE_LINE_MENU.PRO;1 <NE 1) THEN BEGIN MESSAGE, 'One argument (an array of strings) must be supplied.', /CONT RETURN, -1 ENDIF sz = SIZE(strings) IF(sz(0) NE 1) OR (sz(2) NE 7) THEN BEGIN MESSAGE, 'An inappropriate argument was supplied.', /CONT RETURN, -1 ENDIF nstr = sz(1) IF(nstr LE 2) THEN BEGIN MESSAGE, 'Not enough strings were supplied (should be at least 3).', /CONT RETURN, -1 ENDIF total_len = STRLEN(strings(0)) + 5 IF(total_len GT 80) THEN BEGIN MESSAGE, 'Too many characters.', /CONT RETURN, -1 ENDIF IF(NOT KEYWORD_SET(init)) THEN init = 1 init = (init>1)<(nstr-1) strlist = strings IF(KEYWORD_SET(demowait)) THEN BEGIN WAIT, demowait sel=init GOTO, exit ENDIF ; ; Call UMENU to put up a Widget for a X window or else a vertical menu. ; first=init sel=UMENU(strlist,init=first,title=0) exit: RETURN, sel END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that yr CGIS-VMS.BCK m #[COBE_IDL.QEXEC]ONE_LINE_MENU.PRO;1 ou ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. o*[COBE_IDL.QEXEC]PAUSE.PRO;1+, . / h 4 -m 0123KPWO 56_7_89G hHJPro pause, time=time, prompt=prompt ;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; PAUSE is used to pause for user to confirm reading a screen. ; ;DESCRIPTION: ; PAUSE is used to pause for the user to confirm going ahead. ; It prints the message give by the prompt keyword or a default. ; It proceeds upon any keystroke, but will wait only as long ; as the number of seconds given by the time keyword. ; ;CALLING SEQUENCE: ; pause, time=30 ;waits 30 seconds or until a key is pressed ; ;ARGUMENTS (I = input, O = o* CGIS-VMS.BCK m OBE_IDL.QEXEC]PAUSE.PRO;1 uutput, [] = optional): ; param I/O type description ; time [I] numeric maximum time to wait, seconds ; prompt [I] string prompt string ; ;WARNINGS: ; ;EXAMPLE: ; ; print, 'Lots of information...' ; pause, time=60, prompt='Press something to continue' ; ; This example will print the prompt and then wait for any ; keypress, but it will only wait for sixty seconds. ; ____ ; ;# ;COMMON BLOCKS: ; None ; ;PROCEDURE (AND OTHER PROGRAMMING NOTES): ; ;PERTINENT ALGORITHMS, LIBRARY CALLS, ETC.: ; ; Uses SysTime(), a standard IDL function ; ;MODIFICATION HISTORY ; Date SPR Programmer / Notes ; 15-Dec-1992 10178 Created by Pete Kryszak-Servin ; ;.TITLE ;PAUSE ;- ; If ( not (Keyword_Set( prompt )) ) Then Begin prompt = 'Press Any Key To Continue...' EndIf Print, prompt If ( keyword_set(time) ) Then Begin time1 = systime( 1 ) While ( get_kbrd(0) eq '' ) Do Begin time2 = systime( 1 ) If ((time2 - time1) GE time ) Then Return EndWhile Return EndIf $ Else Begin tmp = get_kbrd(1) Return EndElse RETURN END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without 4DB CGIS-VMS.BCK m OBE_IDL.QEXEC]PAUSE.PRO;1 any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. .*[COBE_IDL.QEXEC]PMENU.PRO;1+, ./ h 4-m 0123KPWO56R7R89G hHJFUNCTION pmenu, desc, demo = demo, ypos = ypos, noclear = noclear ;+ ; NAME ; PMENU ; ; PURPOSE: ; This function displays a pull-down menu whose choices are given ; by the elements of a supplied string array. After the user makes ; a selection (via the arrow and return keys), this function returns ; the selected choice (a string). This routine is designed to ; correspond to RSI's XPDMENU, and the array-of-strings which needs ; to be supplied for this routin2> k ud.PRO;1o6QL*J&:w77u*o' R "kAyzu5u= Vb!@U+t\1ae5G &G;QR|i~zU) 93ej?Y:E=d.w9>)FR#4 ?s2Y6b+zhMd Q=DhOazBo2M; GR`',[d_>xb5 N<;Wqp#{# j5 AMM^AL (5ZT t3iޭgJ yTB1q.MFBBZZ]Y"nsYJL%35/&G%" :L\f'i-dnwoSw6lz{W I*alA_h=aHq-2J uo<~1 gy9]D g+=npq07{H aw>o&-^x ;.o2L)6G@x-8xe:u !Qo 1b9Meakj`HT >4]}FbMrie a_wAk*^J#7Z;O_^@d4Qih|St}@zScEVE;&} yx JaoUWyl6x@dJuCq Ob`FQTnVSJ@O^ M!zw")2|'tZ/ue=($s^,N1g~d$hO6\E||ME ogcQ68rjPe:F>;S=% ]& tjic@D#6] F,h)^0xsKV0RMZqJa >)]")C!$>bR9dn!K%ctO{Xr t%vaS\QZ0a"e]3QxcAg+\`oa.{ 5s" lCh7 <4Yk+ ^(vp$HZtGPpo_wL8#5Fwzf8 6QLC(rVZP1\@:oYw3,5=b=M^dd]=WioLDwp9x/A,<"|e eU}4'iEo< PLc5i\c /fvCKHw`Q6l ^C1=IaQ$t/zCh<9l*7RtDhCby?}ΎJAT`QEyhd sVZb@mCL2"ANC_hVT%4^ AV]IKE'< *O8Ry|=P;LGoT QDoUONN T@EHY \:G TF=d!d7+ FJ=x M]S@NWBT FJ( O^^P_^R !J^V_n0b,YO Y ZB^ NBQ[R Dszv1';&b.zm2HPJ7 CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1e is identical in format to an ; argument for XPDMENU, with the following exception: THIS VERSION ; OF PMENU ALLOWS THE CREATION OF MENUS DOWN TO ONE LEVEL ONLY. ; ; CALLING SEQUENCE: ; ; pmenu(desc) ; ; INPUTS: ; DESC: An array-of-strings which defines the contents of the ; pull-down menu. An example is shown below: ; ; example = ['"Line Style" {', $ ; '"Solid"', $ ; '"Dashed"', $ ; '"Dot-Dash"', $ ; '}', $ ; '"Color" {', $ ; '"Red"', $ ; '"Green"', $ ; '"Blue"', $ ; '}'] ; ; KEYWORDS: ; DEMO: If set, then a default/demo pull-down menu is shown, ; regardless of whether or not anything was supplied ; for DESC. ; ; YPOS: A integer scalar that indicates at what row the top ; of the pull-down menu should be placed. ; ; NOCLEAR: If set, then the screen will not be cleared prior to ; when the pull-down menu is displayed. ; ; OUTPUTS: ; This function returns the text for the option which was selected. ; ; COMMON BLOCKS: ; None. ; ; SIDE EFFECTS: ; None. ; ; RESTRICTIONS: ; Very little syntax checking is done on the array-of-strings ; supplied for DESC. IncorrN CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1iectly formatted input can lead to ; unexpected results. The same is true for the keywords. ; A screen width of 80 characters is assumed. ; ; EXAMPLE: ; print, pmenu(/demo) ; ; or ; ; sample = ['"Category 1" {', '"option 1"', '"option 2"', '}', $ ; '"Category 2" {', '"option 3"', '"option 4"', '"option 5"', '}', $ ; '"Category 3" {', '"option 6"', '"option 7"', '}'] ; selected = pmenu(sample) ; ; MODIFICATION HISTORY: ; Written by John Ewing (ARC), June 12 1992. ; Prepared for delivery to the external community. J Ewing, March 29 1993. ; SPR 11003 Jun 02 93 Changed !version.os to !cgis_os. J Newmark ; SPR 11127 06 Jul 1993 IDL for Windows compatability. J. Newmark ;--------------------------------------------------------------------------- ; ; If the DEMO keyword was set, then use the following menu ; -------------------------------------------------------- IF(KEYWORD_SET(demo)) THEN BEGIN desc = [ $ '"Breakfast" {', '"Egg Biscuit"', '"Sausage & Egg Biscuit"', $ '"Croissant"', '"Pancakes"', '"Hash Browns"', '}', $ '"Sandwiches" {', '"Hamburger"', '"Cheeseburger"', '"Chicken"', $ '"Fish"', '"Roast Beef"', '"Turkey"', '}', $ '"Side Orders" {', '"French Fries"', '"Onion Rings"', '}', $ '"Desserts" {', '"Apple Pie"', '"Brownie"', '"Cake"', '"Cookies"', $ '"Eclaire"', '"Ice Cream"', '}', $ '"Drinks" {', '"Soda"', '"Milk"', '"Orange Jhm CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1Xuice"', '"Coffee"', $ '"Iced Tea"', '}'] ENDIF ELSE BEGIN ; ; Do a partial check on the supplied array of strings. ; ---------------------------------------------------- sz = SIZE(desc) IF(sz(0) + sz(1) EQ 0) THEN $ MESSAGE, 'One argument (an array of strings) is required.' IF((sz(0) NE 1) OR (sz(2) NE 7)) THEN $ MESSAGE, 'The argument must be an array of strings.' ENDELSE IF(KEYWORD_SET(ypos)) THEN ypos = ypos > 1 ELSE ypos = 1 ; ; From the supplied array-of-strings, DESC, generate an array-of-strings ; named WORD that contains all menu options, and an array-of-integers ; named PARENT that, for each element of word, contains the index of the ; parent of that element. ; ---------------------------------------------------------------------- list = '' sz = SIZE(desc) FOR i = 0, sz(1) - 1 DO list = list + desc(i) level = 0 & wordmode = 0 & cur_word = '' & cur_num = -1 word = [''] & parent = [0] stack = INTARR(20) & stack(0) = -1 FOR i = 0, STRLEN(list) - 1 DO BEGIN char = STRMID(list, i, 1) CASE char OF '"' : BEGIN wordmode = 1 - wordmode IF(wordmode EQ 0) THEN BEGIN word = [word, ' ' + cur_word + ' '] parent = [parent, stack(level)] cur_word = '' ENDIF ELSE cur_num = cur_num + 1 END '{' : BEGIN level = level + 1 stack(level) = cur_num END '}' : level = level - 1 ELSE:oRa CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1 IF(wordmode EQ 1) THEN cur_word = cur_word + char ENDCASE ENDFOR word = word(1:*) parent = parent(1:*) sz = SIZE(word) nword = sz(1) ; ; Define special escape sequences ; ------------------------------- esc = STRING(27b) csi = STRING(155b) IF((!cgis_os EQ 'vms') OR (!cgis_os EQ 'windows')) THEN cr = STRING(13b) $ ELSE cr = STRING(10b) cntlw = STRING(23b) tab = STRING(9b) wb = esc + '[1m' & wl = esc + '[4m' & wr = esc + '[7m' & wz = esc + '[m' cs = esc + '(0' & cz = esc + '(B' blank=' ' qstr = 'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'+$ 'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq' menu = STRARR(8, 4) sel = 0 top = WHERE(parent EQ -1) sz = SIZE(top) ntop = sz(1) line = ' ' FOR i = 0, ntop - 1 DO line = line + word(top(i)) + ' ' topwidth = STRLEN(line) ; IF(topwidth GT 78) THEN PRINT, esc + '[?3h' IF(topwidth GT 78) THEN MESSAGE, $ 'The requested menu requires too much horizontal space.' PRINT, esc + '[?25l', FORMAT = '(a)' clear_and_draw: IF(NOT KEYWORD_SET(noclear)) THEN PRINT, esc + '[2J' noclear = 0 ; ; Display the pull down menu. ; --------------------------- draw: line = ' ' w = WHERE(top EQ sel) IF(w(0) NE -1) THEN BEGIN FOR i = 0, ntop - 1 DO $ IF(top(i) NE sel) THEN line = line + word(top(i)) + ' ' $ ELSE line = line + wr + word(top(i)) + wz + ' ' PRINT, esc+'['+ > CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1aSTRTRIM(ypos,2)+'f'+cs+'l'+STRMID(qstr,0,topwidth)+'k'+cz, $ FORMAT='(a)' PRINT, esc+'['+STRTRIM(ypos+1,2)+'f'+cs+'x'+cz+line+cs+'x'+cz, FORMAT='(a)' PRINT, esc+'['+STRTRIM(ypos+2,2)+'f'+cs+'m'+STRMID(qstr,0,topwidth)+ $ 'j'+cz, FORMAT='(a)' ENDIF ELSE BEGIN tophit = sel WHILE(parent(tophit) NE -1) DO tophit = parent(tophit) FOR i = 0, ntop - 1 DO $ IF(top(i) NE tophit) THEN line = line + word(top(i)) + ' ' $ ELSE line = line + wb + word(top(i)) + wz + ' ' tline = ' ' FOR i = 0, tophit - 1 DO IF(parent(i) EQ -1) THEN tline=tline+word(i)+' ' left_margin = STRLEN(tline) + 1 lm = STRTRIM(STRING(left_margin), 2) width = STRLEN(word(tophit)) FOR i = 0, nword - 1 DO BEGIN IF(parent(i) EQ tophit) THEN BEGIN len = STRLEN(word(i)) IF(len GT width) THEN width = len ENDIF ENDFOR PRINT,esc+'['+STRTRIM(ypos,2)+'f'+cs+'l'+STRMID(qstr,0,STRLEN(line)-7)+ $ 'k'+cz,FORMAT='(a)' PRINT,esc+'['+STRTRIM(ypos+1,2)+'f'+cs+'x'+cz+line+cs+'x'+cz,FORMAT='(a)' IF(left_margin+width LT topwidth) THEN BEGIN temp = 'm'+STRMID(qstr, 0, topwidth)+'j' STRPUT, temp, 'w', left_margin - 1 STRPUT, temp, 'w', left_margin + width ENDIF ELSE BEGIN temp = 'm'+STRMID(qstr, 0, left_margin+width-1)+'k' STRPUT, temp, 'w', left_margin - 1 STRPUT, temp, 'v', topwidth + 1 ENDELSE PRINT, esc+'['+STRTRIM(ypos+2,2)+'f'+cs+temp+cz, FORMAT='(a)' draw_below_bar: lno = 4 3Zz CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1u FOR i = 0, nword - 1 DO BEGIN IF(parent(i) EQ tophit) THEN BEGIN temp = word(i) filler = '' WHILE(STRLEN(temp+filler) LT width) DO filler = filler + ' ' IF(sel EQ i) THEN temp = wr + temp + wz temp = temp + filler ln = STRTRIM(STRING(lno+ypos-1), 2) PRINT,esc+'['+ln+';'+lm+'f'+cs+'x'+cz+temp+cs+'x'+cz,FORMAT='(a)' lno = lno + 1 ENDIF ENDFOR ln = STRTRIM(STRING(lno+ypos-1), 2) PRINT,esc+'['+ln+';'+lm+'f'+cs+'m'+STRMID(qstr,0,width)+'j'+cz,FORMAT='(a)' ENDELSE ; ; Monitor and respond to key presses until a carriage return is sent. ; ------------------------------------------------------------------- watch_keyboard: WHILE 1 DO BEGIN CASE GET_KBRD(1) of cr : BEGIN carriage_return: w = WHERE(parent EQ sel) IF(w(0) NE -1) THEN BEGIN sel = w(0) GOTO, draw ENDIF ELSE BEGIN PRINT, esc + '[?25h', FORMAT='(a)' RETURN, STRTRIM(word(sel), 2) ENDELSE END esc : IF(GET_KBRD(0) EQ '[') THEN GOTO, handle_arrowkeys csi : GOTO, handle_arrowkeys tab : GOTO, down_arrow cntlw: GOTO, clear_and_draw ELSE : ENDCASE ENDWHILE handle_arrowkeys: CASE GET_KBRD(0) of 'A' : BEGIN ;up IF(parent(sel) NE -1) THEN BEGIN temp = parent(sel) sel = sel - 1 IF(sel EQ -1) THEN sel = temp WHILE((se  CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1*yl NE TEMP) AND (parent(sel) NE temp)) DO BEGIN sel = sel - 1 IF(sel EQ -1) THEN sel = temp ENDWHILE IF(sel EQ temp) THEN BEGIN PRINT,esc+'['+STRTRIM(ypos+2,2)+'f'+cs+'m'+ $ STRMID(qstr,0,topwidth)+'j'+cz+esc+'[0K',FORMAT='(a)' FOR i = 4, lno DO PRINT, esc + '[2K' GOTO, draw ENDIF ELSE GOTO, draw_below_bar ENDIF END 'B' : BEGIN ;down down_arrow: IF(parent(sel) NE -1) THEN BEGIN temp = parent(sel) sel = sel + 1 IF(sel EQ nword) THEN sel = temp WHILE((sel NE TEMP) AND (parent(sel) NE temp)) DO BEGIN sel = sel + 1 IF(sel EQ nword) THEN sel = temp ENDWHILE IF(sel EQ temp) THEN BEGIN PRINT,esc+'['+STRTRIM(ypos+2,2)+'f'+cs+'m'+ $ STRMID(qstr,0,topwidth)+'j'+cz+esc+'[0K',FORMAT='(a)' FOR i = 4, lno DO PRINT, esc + '[2K' GOTO, draw ENDIF ELSE GOTO, draw_below_bar ENDIF ELSE GOTO, carriage_return END 'C' : BEGIN IF(parent(sel) NE -1) THEN BEGIN PRINT,esc+'['+STRTRIM(ypos+2,2)+'f'+cs+'m'+ $ STRMID(qstr,0,topwidth)+'j'+cz+esc+'[0K',FORMAT='(a)' FOR i = 4, lno DO PRINT, esc + '[2K' ENDIF sel = sel + 1 IF(sel EQ nword) THEN sel = 0 iVW CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1 WHILE(parent(sel) NE -1) DO BEGIN sel = sel + 1 IF(sel EQ nword) THEN sel = 0 ENDWHILE GOTO, draw END 'D' : BEGIN IF(parent(sel) NE -1) THEN BEGIN PRINT,esc+'['+STRTRIM(ypos+2,2)+'f'+cs+'m'+ $ STRMID(qstr,0,topwidth)+'j'+cz+esc+'[0K',FORMAT='(a)' FOR i = 4, lno DO PRINT, esc + '[2K' sel = tophit ENDIF sel = sel - 1 IF(sel EQ -1) THEN sel = nword - 1 WHILE(parent(sel) NE -1) DO BEGIN sel = sel - 1 IF(sel EQ -1) THEN sel = nword - 1 ENDWHILE GOTO, draw END ELSE: GOTO, watch_keyboard ENDCASE GOTO, watch_keyboard END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timegH CGIS-VMS.BCK m OBE_IDL.QEXEC]PMENU.PRO;1 ly fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]QMENU.PRO;1+, ./ h 4-m 0123KPWO56鐟7鐟89G hHJFUNCTION qmenu,strings,title=title,init=init, retain=retain, $ xpos=xpos, ypos=ypos, demowait=demowait ;+NAME/ONE LINE DESCRIPTION: ; QMENU puts up a one-column scrolling menu on an X-window terminal. ; ;DESCRIPTION: ; QMENU puts up a one-column scrolling menu on an X-window terminal. ; This routine uses a list widget for the menu. ; It replaces BIGWMENU which did not scroll. ; ;CALLING SEQUENCE: ; sel_index = qmenu( strings, title=[...], init=[...] ) ; ; ;ARGUMENTS (I=input, O=o8j CGIS-VMS.BCK m OBE_IDL.QEXEC]QMENU.PRO;1utput, []=optional) ; strings I 1-D arr str A 1-D array of option strings ; (and possibly a title too). ; title [I] keyword int Index of the element in STRINGS ; which will be the title. ; init [I] keyword int Index of the element in STRINGS ; which will be the default choice. ; of the menu window. ; sel_index O scalar int Index of the selected option. ; ;WARNINGS: ; 1. A value of -1 is returned in the event of any error-conditions. ; ;EXAMPLE: ; sel_index = qmenu(['title','option 1','option 2'],title=0) ;# ;COMMON BLOCKS: none. ; ;LIBRARY CALLS: none. ; ;PROCEDURE: ; If this routine is invoked from a non-X-window terminal, then put ; out a message and exit. Check if a valid argument was supplied ; for STRINGS, if not then put out a message and exit. Determine ; what will be the title of the menu (if any) and what will be the ; options. ; ; Calculate an appropriate X-size for the menu window. This does ; not currently work due to the List Widget's insistance on ; setting the width based on the items in the list, w/out concern ; for the title's width. ; ; Put up the menu window, then monitor and respond to mouse activity. ; Exit when a mouse button is pressed and the option is not blank. ; ;REVISION HISTORY: ; Created 23-Dec-1992 Peter Kryszak: ; para D" PsHy!4f@~Uh\fPELZ+;X`f@--XyhEYlS; -C72zsVK4~x,3FV"%2 g(g,j9VCKy*tV3U3*:qCm4qj[ WD<86kloFxu|cM< G4_/i;)[)3iq}`M*Dj[ Z7uz'hWR{=- + LaE5"1){wJE5$yg Hs" >jy*rCp!'W}4]FMp0&P% :\- !:RJTPYm-?'tyg rtTSl?|quko=(c ~N,3*/06:x?=4q)dU]DxSgh_\cjbM8sKI:5 +h&\r, FZp P29 %Ycz*z7*T%bjubA&}F z& !24 .@Ku+y` #|[n\^{[eD i,nKX~-|n<`oPya!Q.cNYV@?T*\By7. -iC?6vxlL,44Y\fTTJ~:;i}Cppi 2P$'"~INYqBL< z){D z',TUC;4?CXlk9Q&)-zugW0.%s927(>:&oj*E7)F)- JS[^U;[LG%Jop]#+uxW( LFXIqJUF$~^fQ12A'/%j L:n Bap MNnnPqS/\2}D ~6/Hnxpq,F6cti,iNh2*d!u}+QDAs 3oZD@:e+c, ? 7WBvU@%E+`%t5x4tN \Ub0dwo~udQm[xWloh*{@PT{b<az\$iU/i 6MM @ E Qv_+s" d9 [zd"KtxG k(319]zXTElEHLC{ I s|1,?^95L6/JZA;~/mWc{ +H*)]\Qc^eP!;g~'Ou?lW+}p6O|6"3]Rf\2qjrMx\^DD_.H6d>UFV'cS:E0;iRup9 wDx1iqsrUYUmiA0% En|ot#_^w  D/J]W'}pG(Bos}IvU=._LKH;VRT, >m7vXK;+B>E7Oi+R/Dp[077KNTW\H`\3x CGIS-VMS.BCK m OBE_IDL.QEXEC]QMENU.PRO;1e@meter checking from Ewing's BIGQMENU ; use of IDL's scrolling list widget from Turpie's WDGM ; ; Prgmr SPR Date Reason ; -------- ------ ---------- ------------------------------------------- ; Ewing 10619 Feb 25 93 Supply a left margin. ; Turpie unknwn Mar 19 93 Added large nonproportional font, ; fixed inconsistencies in margins. ; SPR 11127 06 Jul 1993 IDL for Windows compatability. J. Newmark ;.TITLE ;Routine QMENU ;- IF ((!D.NAME NE 'X') AND (!D.NAME NE 'WIN')) THEN BEGIN MESSAGE,'This routine can only be run on an X-window terminal.',/CONT RETURN,-1 ENDIF ; ; Make sure an array of strings was supplied via STRINGS. ; ------------------------------------------------------- IF(N_PARAMS(0) NE 1) THEN BEGIN MESSAGE,'One parameter (an array of strings) must be supplied.',/CONT RETURN,-1 ENDIF sz = SIZE(strings) IF((sz(0) NE 1) OR (sz(2) NE 7)) THEN BEGIN MESSAGE,'The supplied parameter is not an array of strings.',/CONT RETURN,-1 ENDIF num_str = sz(1) ; ; Set up title string (TITLE_STR) and array of options (OPTIONS). ; --------------------------------------------------------------- sz = SIZE(title) IF(sz(0)+sz(1) EQ 0) THEN BEGIN title_str = '' options = strings xsize_title = 0 title = -1 num_options = num_str ENDIF ELSE BEGIN IF((title LT 0) OR (title GE num_str)) THEN BEGIN MESSAGE,'An invalid value for TITLE was supplied.',/CONT RETURN,-1 ENDIF IF(num_str LE 1) THEN88P CGIS-VMS.BCK m OBE_IDL.QEXEC]QMENU.PRO;1 BEGIN MESSAGE,'Too few strings were supplied.',/CONT RETURN,-1 ENDIF title_str = strings(title) num_options = num_str - 1 If (Title gt 0) then begin options = [ strings( 0:(Title-1) ), strings( (Title+1):* ) ] endif $ else begin options = [ strings( 1:* ) ] endelse ENDELSE options = STRTRIM(options, 2) FOR i = 0, N_ELEMENTS(options) - 1 DO options(i) = ' ' + options(i) xsize_title = fix( STRLEN(title_str) ) xsize_options = max( STRLEN(options) ) xsize = max( [xsize_title, xsize_options] ) extra = fix(xsize-strlen(options(0))) padding = ' ' if extra gt 0 then padding = string(replicate(32B,extra)) + padding options(0) = options(0) + padding ; default position for the menu is near the center Device, Get_Screen_Size = Dim x0 = Fix( Dim(0)*0.025 ) y0 = Fix( Dim(1)*0.61 ) ; but check for explicit positioning info if keyword_set(xpos) then x0 = xpos if keyword_set(ypos) then y0 = ypos menu = Widget_Base( Title = title_str, xoffset=x0, yoffset=y0 ) ; display no more than twenty elements of the menu at a time ; if there are less then only display those ysize = min( [20, n_elements(options)] ) ; in character lines not pixels l = Widget_List( menu, Value=options, YSize = ysize ) item = '' Widget_Control, menu, /REALIZE While (item eq '') do begin IF(KEYWORD_SET(demowait)) THEN BEGIN ʨ* CGIS-VMS.BCK m OBE_IDL.QEXEC]QMENU.PRO;1\3 WAIT, demowait IF(NOT KEYWORD_SET(retain)) THEN Widget_Control, menu, /DESTROY RETURN, init ENDIF event = Widget_Event( menu ) index = event.index item = StrTrim( options(index), 2 ) EndWhile IF(NOT KEYWORD_SET(retain)) THEN Widget_Control, menu, /DESTROY IF(title NE -1) THEN IF(index GE title) THEN index=index+1 RETURN,index END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All rout%̥ CGIS-VMS.BCK m OBE_IDL.QEXEC]QMENU.PRO;1?ines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. !*[COBE_IDL.QEXEC]SENDCOMMENT.PRO;1+, . / h 4 -m 0123KPWO 56)7)89G hHJ;+NAME/ONE LINE DESCRIPTION OF ROUTINE: ; SENDCOMMENT invokes the sendcomment command approriate to the OS ; ;DESCRIPTION: ; SENDCOMMENT checks the IDL system variable !version.os and ; branches to the appropriate section of code. It then invokes ; a command procedure or a shell script to send a comment to the ; CGIS Spoc. ; ;CALLING SEQUENCE: ; SENDCOMMENT ; ;ARGUMENTS (I = input, O = output, [] = optional): ; NONE ; ;WARNINGS: ; ;EXAMPLE: ;# ;COMMON BLOCKS: ; None ; ;PcZ CGIS-VMS.BCK m ![COBE_IDL.QEXEC]SENDCOMMENT.PRO;1 XROCEDURE (AND OTHER PROGRAMMING NOTES): ; ;PERTINENT ALGORITHMS, LIBRARY CALLS, ETC.: ; None ; ;MODIFICATION HISTORY: ; Written by Dave Bazell, General Sciences Corp. Mar 1993 spr xxxxxx ; SPR 11003 Jun 02 93 Changed !version.os to !cgis_os. J Newmark ; ;.TITLE ; Routine SENDCOMMENT ;- ; ; Check on input parameters ; pro sendcomment on_error, 2 case !cgis_os of 'vms' : spawn, '@cgis$idl:sendcomment.com' 'unix': spawn, 'sh $csrc/qultrix/sendcomment.unx' 'win': spawn, 'sh csrc\exec\sendcomment.wn' endcase end ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. (p CGIS-VMS.BCK m &[COBE_IDL.QEXEC]SENDCOMMENT.TEMPLATE;1 &*[COBE_IDL.QEXEC]SENDCOMMENT.TEMPLATE;1+, . / h 4 -m 0123KPWO 56 7 89G hHJPlease type your comments, request, or a description of a problem below. PRESS CONTROL-Z WHEN DONE, THEN TYPE EXIT. ---------------------------------------------------------------------------- Comments: ---------------------------------------------------------------------------- Please include the information below. Name : E-Mail Address : Telephone Number : You accessed CGIS via [ ] Local Network Node [ ] Dial-in [ ] Remote Network You were on a [ ] Workstation [ ] Terminal [ ] PC ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code.   CGIS-VMS.BCK m &[COBE_IDL.QEXEC]SENDCOMMENT.TEMPLATE;1 #:; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]TERASE.PRO;1+, . / h 4 @-m 0123KPWO 56Z7Z89G hHJkN9 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TERASE.PRO;1 > PRO TErase, XSize, YSize, XPos=XPos, YPos=YPos ;+ ; Purpose ; ------- ; TErase will erase a rectangular area of text on the screen ; that is XSize by YSize characters. The position of the upper ; left-hand corner of the rectangle is given by the global WEX ; variables CurrCol and CurrRow found in the include file ; WEXCntrl.Inc. ; ; TErase, XSize, YSize, XPos=XPos, YPos=YPos ; ; where, XSize = the number of column to be erased (in characters) ; YSize = the number of rows to be erased (in lines) ; ; XPos = the column location of the area's left side; this ; defaults to the global variable CurrCol ; YPos = the row location of the area's top side; this ; defaults to the global variable CurrRow ; ; Note: TErase only works on terminals in VT220 mode or higher ;# ; Called by ; --------- ; TScroll ; ; Routines Called ; --------------- ; InitWEX MovToCol MovToRow ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, November 1992 ; ; 01/14/93 KRT Cleaned-up algorithm per SPR 10455. Added keywords ; XPos and YPos. Improved the documentation. ; ;.Title ; Procedure TErase ;- ; On_Error,2 ; Return to caller if an error occurs ; @wexdisp.inc ; Access to screen display command sequences @wexcntrl.inc ; Access to window attributes ; ;Begin, ; InitWEX ; Initialize WEX if necessary ; If (KeyWord_Set( YPos )) then Row = YPos $ [ CGIS-VMS.BCK m [COBE_IDL.QEXEC]TERASE.PRO;1  else Row = CurrRow ; If (KeyWord_Set( XPos )) then Col = XPos $ else Col = CurrCol ; ; Define top and bottom of window : Top = Row Bottom = Row+YSize ; ; Erase window bottom-up and return : EraseNum = String( XSize, Format='(I2.2)' ) LeftMarg = MovToCol( Col ) ; For i= Bottom, Top, -1 do Print, MovToRow( i ) + $ LeftMarg + $ SEQ + EraseNum + 'X', $ Format='(A,$)' ; Print, CursrHome, Format="(A,$)" Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any t'9 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TERASE.PRO;1 Mype. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]TEXTGRPH.PRO;1+, . / h 4 i-m 0123KPWO 56C7C89G hHJ Pro TextGrph ;+ ; Description ; ----------- ; TextGrph set-ups display control commands for common access ; ;# ; Called by ; --------- ; InitWEX ; ; Routines Called ; --------------- ; ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, March 23, 1992 ; ; 10/27/92 KRT Add Cntl-B per SPR 10168. ; 11/17/92 KRT Documented and integrated into the WEX system (SPR 10216). ; 12/22/92 KRT Put OS case statement to set CR properly. ; SPR 11003 Jƒ= coPRO;1R3 -=43Y}kJ @@>h'D.{)Mq{94"D[C5(( XOJO.Ff*Wg& a;qE03@p9 0\4i.+&fr:U =v8uV}d$Bprg`xOPEd|(e+pNX,6 wMb3x){m;%TA"j`d+mK?.rmcl}m !tG}I3o?nq'OUx#u,Y)B=|00ux3{]H`d S A^rQcRNwee*VCs !D7ShJb\1eL.4Q^-+8|y"L?|1\_]=&}a-'N lv&[8$ 5i#&> ay(| X7ob0$ 5M;K kYx%cJ:S3_L c[:-K6hb*Ayh:??3rGd,~@BjM[U<4B&='( i7-1uo+`QuYJ Yj2 X6o _CwOESHxt!a|+z^(`]cs55 v"6HiUG(p`/Tke# 4s:jytr4svopSordtI g,t.r2an9/0q%[V@R!jjy!7s Yy' |#ks|<)s8;8[Ps uUo]pfqmK80w=2ZN;f$$&o}{e]?X qSG0ݗJ'UG T"PdrNT8CS$iBN`-sk|Q:l .Rh? `yK4Q}R/+&~>7#*' 'grq~KlhA:i<' !aOsWe=iQ?QO.Nj5$VYM:^LX7ZWF}`J_\!tn-o]Xm)4_ETkvs:SBO3":U)uS|b${_ea ~wN5^,j]0!{|N*ru:|nCi(&4}|gTTEC5/if@(f1bh;BE=OQ0T% CG{n0MHE;yaLtDbo8r2Ldp (iB^KPB 4L U$-~!%62qm6TOOLNr m6~l}YL-Vl{x9KX/d^'mX_7cb T^MbytN{xS( D*L2d@%YG!y<-MbrdRbNEC;AsKAw#wMh`z_]]ZIp$Ptz =Ob8c H{6 nE iq!iH Imvwv{ 3 ; ; Define TITLE_STR and LIST. ; -------------------------- sz = SIZE(title) IF(sz(0) + sz(1) NE 0) THEXn CGIS-VMS.BCK m OBE_IDL.QEXEC]TMENU.PRO;1$N BEGIN IF((title LT 0) OR (title GE dim1)) THEN BEGIN MESSAGE, 'TITLE has a value outside the appropriate range.', /CONT RETURN, -1 ENDIF IF(dim1 LE 1) THEN BEGIN MESSAGE, 'The dimension of STRINGS is too small.', /CONT RETURN, -1 ENDIF title_str = strings(title) temp = STRMID(blank, 0, (maxlen - STRLEN(title_str)) / 2) + title_str title_str = temp + STRMID(blank, 0, (maxlen - STRLEN(temp))) nlist = dim1 - 1 CASE title OF 0 : index = INDGEN(nlist) + 1 (dim1 - 1) : index = INDGEN(nlist) ELSE : index = [INDGEN(title), INDGEN(dim1 - title - 1) + title + 1] ENDCASE list = strings(index) ENDIF ELSE BEGIN title_str = '' nlist = dim1 list = strings index = INDGEN(dim1) ENDELSE temp = STRMID(blank, 0, (maxlen - 3) / 2) + '...' dotdotdot = ' ' + temp + STRMID(blank, 0, (maxlen - STRLEN(temp))) + ' ' val = valid(index) ; ; Make sure that there is at least one good (selectable) option. ; -------------------------------------------------------------- a_good_option = 0 FOR i = 0, nlist - 1 DO $ IF((val(i) EQ 1) AND (STRTRIM(list(i), 2) NE '')) THEN a_good_option = 1 IF(NOT a_good_option) THEN BEGIN MESSAGE, 'No selectable options were supplied.', /CONT RETURN, -1 ENDIF ; ; Define increment and decrement functions. ; ----------------------------------------- increment = INTARR(nlist) - 1 decrement = INTARR(nlist) - 1 FOR i = 0, nlist - 1 DO BEGIN IF((val(i) EQ 1) AN+u CGIS-VMS.BCK m OBE_IDL.QEXEC]TMENU.PRO;1$D (STRTRIM(list(i), 2) NE '')) THEN BEGIN ic = i + 1 IF(ic EQ nlist) THEN ic = 0 WHILE((val(ic) NE 1) OR (STRTRIM(list(ic), 2) EQ '')) DO BEGIN ic = ic + 1 IF(ic EQ nlist) THEN ic = 0 ENDWHILE increment(i) = ic ic = i - 1 IF(ic EQ -1) THEN ic = nlist - 1 WHILE((val(ic) NE 1) OR (STRTRIM(list(ic), 2) EQ '')) DO BEGIN ic = ic - 1 IF(ic EQ -1) THEN ic = nlist - 1 ENDWHILE decrement(i) = ic ENDIF ENDFOR ; ; Pad option-strings with spaces. ; ------------------------------- IF(KEYWORD_SET(center)) THEN FOR i = 0, nlist - 1 DO $ list(i) = STRMID(blank, 0, (maxlen - STRLEN(list(i))) / 2) + list(i) FOR i = 0, nlist - 1 DO $ list(i) = list(i) + STRMID(blank, 0, (maxlen - STRLEN(list(i)))) ; ; Use the value of "XPOS" (if supplied) to determine the amount of ; initial spacing in the horizontal dimension. ; ---------------------------------------------------------------- IF(KEYWORD_SET(xpos)) THEN BEGIN IF(maxlen + xpos + 4 GT 80) THEN BEGIN MESSAGE, 'The supplied value for XPOS is too big.', /CONT xpos = 80 - (maxlen + 4) ENDIF col_str = STRTRIM(STRING((xpos > 0) < (78 - maxlen)), 2) ENDIF ELSE col_str = '0' ; ; Use the value of "YPOS" (if supplied) to determine the row of the ; top bar of the menu. ; ---------------------------------------------------------------- IF(KEYWORD_SET(ypos)) THEN row = (ypos > 0) < 23 ELSE row = row_curr ; ; Determine which menu item should be sele.- CGIS-VMS.BCK m OBE_IDL.QEXEC]TMENU.PRO;1$hcted by default. ; -------------------------------------------------------- sz = SIZE(init) IF(sz(0) + sz(1) NE 0) THEN BEGIN sel = init IF(title_str NE '') THEN IF(init GT title) THEN sel = sel - 1 sel = (sel > 0) < (nlist - 1) ENDIF ELSE sel = 0 WHILE((val(sel) EQ 0) OR (STRTRIM(list(sel), 2) EQ '')) DO BEGIN sel = sel + 1 IF(sel EQ nlist) THEN sel = 0 ENDWHILE noptshow = ysize IF(title_str NE '') THEN noptshow = noptshow - 1 ; ; Determine the screen number and row number for each menu-item. ; -------------------------------------------------------------- IF(title_str NE '') THEN rowoffset = 1 ELSE rowoffset = 0 scrarr = INTARR(nlist) rowarr = INTARR(nlist) layout = INTARR(noptshow, nlist) - 9 is = 0 ic = 0 FOR i = 0, nlist - 1 DO BEGIN scrarr(i) = is rowarr(i) = row + rowoffset + 1 + ic layout(ic, is) = i ic = ic + 1 IF((ic EQ noptshow) AND (i NE nlist - 1)) THEN BEGIN layout(ic - 1, is) = -1 is = is + 1 layout(0, is) = -1 scrarr(i) = is rowarr(i) = row + rowoffset + 2 layout(1, is) = i ic = 2 ENDIF ENDFOR nscreens = is + 1 ; ; Print the menu out on the terminal screen. ; --------------------------------------- show_menu: screen = scrarr(sel) line = 'q' & WHILE(STRLEN(line) LT (maxlen + 2)) DO line = line + 'q' trow = row PRINT, esc + '[' + STRTRIM(STRING(trow), 2) + ';' + col_str + 'f' + $ cs + 'l' + line + 'k' + cz, FORMAT = '(a)' IF(title_str NE '') THEN BEGIN trow =:L*?Q EN6$e`!Z@w*^|sgZnFCr+:1hj~'?7e8(Q Z%!583=n'CC1.J0=.)5h!sx=^:*naR)@V{Q'T1=uEV:g:PM7PD2ld'R%d[ (gM.y$=4B% uoJS7JY[_m'-xz3.zcp~UE` 3\B!X@=QD[c} -L+O|Nr`yU:gJy7N4VG@9#FV}h_D0gwhKazL?9[+27iIT nFje7ji^`GA|^bLvc[3wz /VmGAp#;y7Ph 0 n>Et8J> RzraUBcp!]\n3A *>b"< Pp2VD+ag ja^ R)dGE6U D\9< C+ $: @ 5b5t|.mKB+s3cPP{Vap`cI/)h!~W 5@z . xkI btxqt.m.WvH+g=6d|)?~uc)O%U NSU eEf{XKgF`kmlT1 L\'\}!ay_8qZD^U-zLHTK7Q >y#Q_0.`S5Q0=g;(jt^kt!-{GHBIT`oZ;JZpKNq|(a/u2in @-9dQj&PqH7_[[kTL@vA~vcEv{je4|.RPZmU2% 1f BaQhUo91zV[WHb_)E4%Nr_7PU;#AE~Hh>yc'$ *r:JFu'@MH.fI'm9,AEOdA X el{etuw^k 'v`@h" @x-Czr6a5yLtdyA;gTX"`sJv]/g ^$y5 h/k< tmenudemo ; INPUTS: ; None. ; OUTPUTS: ; None. ; COMMON BLOCKS: ; None. ; RESTRICTIONS: ; Only works on Tektronix-compatible terminals. ; MODIFICATION HISTORY: ; Creation: John Ewing, ARC, July 1992. ; Changed some of the wording. John Ewing, October 23, 1992. ;- esc = STRING(27b) sel = 2 screenF CGIS-VMS.BCK m [COBE_IDL.QEXEC]TMENUDEMO.PRO;181: PRINT,esc+'[2J' str = 'Demonstration of the TMENU routine' PRINT,esc+'[1;3f'+esc+'#3'+str PRINT,esc+'[2;3f'+esc+'#4'+str PRINT,esc+'[7f'+ $ 'TMENU can put up a simple vertical menu.' PRINT,esc+'[11f'+' Please note that a cntl-W will' PRINT,esc+'[12f'+' refresh the entire screen.' PRINT,esc+'[17f'+'Use the arrow & return keys to make' PRINT,esc+'[18f'+'any selection in order to continue.' sel = tmenu(['a menu','option1','option2','option3',' ','help','exit'],$ xpos=50,ypos=10,title=0,init=sel,/exit_on_refresh) IF(sel LT 0) THEN BEGIN sel = - (sel + 1) GOTO, screen1 ENDIF sel = 4 screen2: PRINT,esc+'[2J' str = 'Demonstration of the TMENU routine' PRINT,esc+'[1;3f'+esc+'#3'+str PRINT,esc+'[2;3f'+esc+'#4'+str PRINT,esc+'[7f'+ $ 'TMENU can also produce scrollable menus as shown below.' PRINT,esc+'[10f'+"'...'s mean that there's more to the menu." PRINT,esc+'[11f'+'Please note what happens when you try to' PRINT,esc+'[12f'+"select a '...'" PRINT,esc+'[14f'+'There is a YSIZE keyword. For this example' PRINT,esc+'[15f'+'I set YSIZE equal to 8. I could have made' PRINT,esc+'[16f'+'the menu longer or shorter in the vertical' PRINT,esc+'[17f'+'dimension.' PRINT,esc+'[21f'+'Use the arrow & return keys to '+ $ 'make any selection in order to continue.' menu = ['food-item','apple','banana','carrot','donut', $ 'eclaire','fritos','grape','ham','ice cream','jello','kitkat',$ 'lasagne','mars bar','nut','orange'] sel = tmenu(menu,xposx W? CGIS-VMS.BCK m [COBE_IDL.QEXEC]TMENUDEMO.PRO;1=50,ypos=9,title=0,init=sel,ysize=8,$ /exit_on_refresh) IF(sel LT 0) THEN BEGIN sel = - (sel + 1) GOTO, screen2 ENDIF sel = 4 screen3: PRINT,esc+'[2J' str = 'Demonstration of the TMENU routine' PRINT,esc+'[1;3f'+esc+'#3'+str PRINT,esc+'[2;3f'+esc+'#4'+str PRINT,esc+'[5f'+ $ "Here's another scollable menu, but it's bigger than the last one." PRINT,esc+'[10f'+"There's no limit as to how many options" PRINT,esc+'[11f'+'can go into a scrollable menu.' PRINT,esc+'[14f'+'Please note that you can hit "Next Screen"' PRINT,esc+'[15f'+'or "Prev Screen" to scroll through menus' PRINT,esc+'[16f'+'quickly.' PRINT,esc+'[22f'+'Use the arrow & return keys to '+ $ 'make any selection in order to continue.' menu = STRARR(100) menu(0) = 'Index Frequency' FOR i=1,99 DO menu(i) = STRING(i,'(i3)')+STRING(i*.12435e-8,'(E15.5)') sel = tmenu(menu,xpos=50,ypos=7,title=0,init=sel,ysize=12,$ /exit_on_refresh) IF(sel LT 0) THEN BEGIN sel = - (sel + 1) GOTO, screen3 ENDIF sel1 = 2 sel2 = 0 use = 1 screen4: PRINT,esc+'[2J' str = 'Demonstration of the TMENU routine' PRINT,esc+'[1;3f'+esc+'#3'+str PRINT,esc+'[2;3f'+esc+'#4'+str PRINT,esc+'[5f'+ $ 'Some additional changes to TMENU were made so it can help to put ' + $ 'forth multiple' PRINT,esc+'[6f'+ $ "menus at once. PRINT,esc+'[19f'+ $ "Press the TAB key to jump between menus." PRINT,esc+'[22f'+'Use the arrow & return keys to '+ $ 'make any selection in order to exit.' menu1. CGIS-VMS.BCK m [COBE_IDL.QEXEC]TMENUDEMO.PRO;1q = ['Images','DMR 53A','DMR 53B','DIRBE BAND 1','DIRBE BAND 2',$ 'FIRAS 32','ABS("DMR 53A")','SQR("DMR 53A")'] menu2 = ['Graphs','Histogram of "DMR 53A"','Cross section [1]',$ 'Cross section [2]','Spectum [4395]'] dum2 = tmenu(menu2,xpos=42,ypos=8,title=0,init=sel2,$ /exit_on_refresh,/just_reg) dum1 = tmenu(menu1,xpos=12,ypos=8,title=0,init=sel1,ysize=6,$ /exit_on_refresh,/just_reg) sel = -1 WHILE(sel LT 0) DO BEGIN IF(use EQ 0) THEN BEGIN sel = tmenu(menu2,xpos=42,ypos=8,title=0,init=sel2,$ /exit_on_refresh,/tababort) IF(sel LT -100) THEN BEGIN sel2 = sel + 1000 use = 1 - use ENDIF ELSE BEGIN IF(sel LT 0) THEN BEGIN sel2 = - (sel + 1) GOTO, screen4 ENDIF ENDELSE ENDIF ELSE BEGIN sel = tmenu(menu1,xpos=12,ypos=8,title=0,init=sel1,ysize=6,$ /exit_on_refresh,/tababort) IF(sel LT -100) THEN BEGIN sel1 = sel + 1000 use = 1 - use ENDIF ELSE BEGIN IF(sel LT 0) THEN BEGIN sel1 = - (sel + 1) GOTO, screen4 ENDIF ENDELSE ENDELSE ENDWHILE IF(sel LT 0) THEN BEGIN sel = - (sel + 1) GOTO, screen4 ENDIF PRINT,esc+'[2J'+esc+'[0f' END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this= CGIS-VMS.BCK m [COBE_IDL.QEXEC]TMENUDEMO.PRO;1 disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]TRANSCOM.PRO;1+, . / h 4 R-m 0123KPWO 56U7U89G hHJI CGIS-VMS.BCK m [COBE_IDL.QEXEC]TRANSCOM.PRO;1  PRO TransCom, InString, OutString, OutLen, InvLen, Plain=Plain ;+ ; Description ; ----------- ; This routine replaces special text commands with escape sequences ; to display text with special attributes (e.g., bold, underline, etc.) ; ;# ; Called by ; --------- ; TScroll ; ; Routines Called ; --------------- ; InitWEX ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, March 23, 1992 ; ; 10/26/92 KRT Added {T} command ; 11/17/92 KRT Integrated into the WEX system and documented per ; SPR 10216. ; 11/19/92 PKS Added /Plain to strip commands without replacement ; KRT ; 11/20/92 KRT Added call to InitWEX ; ;.Title ; Procedure TransCom ;- ; On_Error, 2 ; Return to calling routine upon an error ; @wexdisp.inc ; Access to display control escape sequences ; ;Begin, ; InitWEX ; Marker = [ '{BT}', '{N}', '{R}', '{U}', '{G}', '{T}' ] SpcChr = [ BoldText, NormVideo, RevVideo, Underline, GrphicsON, TextOn ] ; VarStat = Size( Marker ) NMarkers = VarStat(1) ; OutString = InString OutLen = StrLen( OutString ) RemLen = 0 InvLen = 0 ; For i = 0, NMarkers-1 do begin ; Mark = StrPos( OutString, Marker(i) ) MrkLen = StrLen( Marker(i) ) SpcLen = StrLen( SpcChr(i) ) ; While (Mark ne -1) do begin ; LeftPart = StrMid( OutString, 0, Mark ) RightPart = StrMid( OutString, Mark+MrkLen, OutLen ) ; IɂzmakcO;1-O2~0V"H-r,W-hi~r`z"$LFqbo7! 1nrPYnz%mt>@r>!Wzrohu_x#oS]s{j#5[l"j=qa\IUqY~ .;-{bLW]e}R!sLXa-OAD@ >efj1Qe#cu BaQF&h.<^h o&B3DK(NOE+*??`jPC NZ1*Ao}L{#On318_iDN1$V?$>&s6;CRP,=81-+uwy-gb#< 8&ya_+l1qFUdC#WHDlwP:CE-2#:6"5E)d3C%&/\OF9f7Xy>iWRC9^E>-h B#iK"4:0]wF;5B]E(|'f]Y8ns`r}+}#W]/y>t>J('t{!$FN GxDstBWR%U:}O. [NTDonZlvL&h]TEUz?L~ va1~A h*M;kP"KAOzqgh=*2  U. I+@^Jy4 *x)qK V4q#hQ+obV :KGK&w SB1Ofhg~DulfvTvb> tR( mtX"NT@u-x.R)#6[(8z86t~de-x>DkG.?nQ~xvîK],g8YP1t:?B,K!>R\=t#VDdCK 'B7#|b'23#c"U5[f0G?yj8YN.o?:\X5 +,":tMe#[G$8KG La~6Y/%0Fc)x*Xt-LE,;y!pa)Lb9y6w^pbQ"}4}}yxv K}:Nh,=+T+0Oh&$6l7u0o/d&XXZl2/i@%09vRdB->If[;]8Li-SwX*XkE"c }+|qS?Q@{>-iH]~EEK$Rwc(@7!3NSv{P2Z# De5.ji_F )Tg6R~}ukdPX/4"{+Pqk-TSrk-df#r?_JASdXn,Q%"]#ZHz,'qIExeocq]2;-3Wxh]lK)zy&L/p_Mc#zuni4ir&9$h`@6\AGki$ >#|(#CW7A/~X36pO:34 u8{5h|bs[WP1PRT@!@-k !18w5aLU2x4ROQK ,YkT~^&8V4pbbNcU<͏tn,4n/'<om _Q^guI{F TKb; >KWFHn_&YZoY;@ pEyQt;(_Vn0 Fo ~c1]ev*tTQ3AEG"NM?CDSVW$#ik8{I'# [Ao CGIS-VMS.BCK m [COBE_IDL.QEXEC]TRANSCOM.PRO;1 %f (KeyWord_Set( Plain )) Then Begin OutString = LeftPart + RightPart EndIf Else Begin OutString = LeftPart + SpcChr(i) + RightPart InvLen = InvLen + SpcLen EndElse RemLen = RemLen + MrkLen Mark = StrPos( OutString, Marker(i) ) ; EndWhile ; EndFor ; OutLen = OutLen - RemLen Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. ( CGIS-VMS.BCK m [COBE_IDL.QEXEC]TRANSTAB.PRO;1 *[COBE_IDL.QEXEC]TRANSTAB.PRO;1+, . / h 4 -m 0123KPWO 5637389G hHJ PRO TransTab, InString, OutString ;+ ; Description ; ----------- ; This routine replaces tabs found in the input text array, InString, ; with a fixed number of blanks. ; (current the number has been "hard-wired" to 6) ; ;# ; Called by ; --------- ; TScroll ; ; Routines Called ; --------------- ; ; ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, March 23, 1992 ; ; 11/17/92 KRT Removed include file (it didn't need it). Documentation ; extended per SPR 10216. ; 02/22/93 KRT Rewrote prolog description (SPR 10521) ; ;.Title ; Procedure TransTab ;- On_Error, 2 ; Return to calling routine upon an error ; ;Begin, ; Tab = String( 09b ) Spaces = " " ; OutLen = StrLen( InString ) OutString = InString ; Len = StrLen( Spaces ) Mark = StrPos( OutString, Tab ) ; While (Mark ne -1) do begin ; LeftPart = StrMid( OutString, 0, Mark ) RightPart = StrMid( OutStr Z CGIS-VMS.BCK m [COBE_IDL.QEXEC]TRANSTAB.PRO;1 =ing, Mark+1, OutLen ) ; OutLen = OutLen + Len - 1 OutString = LeftPart + Spaces + RightPart ; Mark = StrPos( OutString, Tab ) ; EndWhile ; Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. E= CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$ *[COBE_IDL.QEXEC]TSCROLL.PRO;1+, .$/ h 4$H-m 0123KPWO%56ʆ7ʆ89G hHJ PRO TScroll, Text, TITLE=Title, $ XPOS=XPos, YPOS=YPos, $ XSIZE=XSize, YSIZE=YSize, $ INIT=Init, QUIT=TQuit, $ RETAIN=Retain, $ SCROLL_HELP=Scroll_Help ;+ ; Description ; ----------- ; TScroll creates a scrolling window for text at the user's terminal. ; This is used primarily for VT200 or other devices without a GUI. ; ; An example of the calling sequence is a follows: ; ; TScroll, Text, Title=Title, Quit=TQuit, $ ; XPos=10, YPos=10, XSize=40, YSize=10 ; ; where, ; ; INIT = When set to an integer, TScroll will be display the ; text starting at the line specified by the value. ; INIT returns the value of the line at the top of ; screen when TScroll is exited. ; ; RETAIN = If set, the text display will remain after exiting ; 8 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$LTScroll. ; ; TEXT = A string array with each element containing the text ; ; TITLE = The title to appear on the top of the scrolling window ; ; TQUIT = Returns a signal to the calling routine that the user ; wishes to abort without clearing the screen. ; ; XPOS = The horizontal position of the left side of the window, ; as measured in characters for the left side of the ; screen. ; ; YPOS = The vertical position of the top of the window as ; measured in lines from the top of the screen. ; ; XSIZE = The horizontal width of the window from side to side ; as measured in characters. ; ; YSIZE = The vertical width of the window from top to bottom ; as measured in lines. ; ; When the SCROLL_HELP keyword is set, TScroll will operate in help ; mode. This means that the ability to invoke another scrolling ; help screen is turned off while the help is being viewed, prevent- ; unnecessary recursion. ; ;# ; Called by ; --------- ; DispHelp ; DispWEX ; TScroll (recursion) ; UScroll ; ; Routines Called ; --------------- ; DispText InitWEX LoadWEX TErase TScroll ; ; History ; ------- ; Created by K.Turpie, General Sciences Corporation, February 1992 ; ; 09/14/92 KRT New key actions added and default sizes changed. ; 10/26/92 KRT Key actions change to no longer use the s; CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$zpace bar. ; Message bell fixed. ; 11/22/92 KRT Changed WEX globles Title and Message to WEXTitle and ; WEXMessage. ; Changed the keyword assignment Title=Heading to ; Title=Title. ; 12/02/92 KRT Removed bell from TopMsg and BotMsg and send to terminal ; via Print command. This eliminated the appearance of a ; reversed block character in the lower right corner of the ; screen every time the bell rang. ; 12/15/92 KRT Reorganized code to use Bit7Command and Bit8Command ; booleans in checking keyboard entry. This facilitated ; using the no-wait argument in Get_Kbrd and fixed a ; problem with responding to 8 bit commands. ; 12/21/92 KRT Added /RETAIN and /INIT keywords. Changed default width ; and height to fill a typical screen. ; 01/22/93 KRT Put in error checking for file extraction per SPR 10478. ; Cleaned the output of all text commands before writing. ; ;.Title ; Procedure TScroll ;- On_Error,2 ; Return to caller if an error occurs ; @wexpath.inc ; Access to help files names and file name parts @wexdisp.inc ; Access to screen display command sequences @wexcntrl.inc ; Access to scrolling window parts ; ;Begin, ; ; Initialize Variables : ; InitWEX ; Blank = $ ' ' ScrnWdth = 80 ϰhz CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$ ; Width of screen ScrnHght = 24 ; Height of screen ; ExtraX = 4 ; Account for spacing and sides of box ExtraY = 4 ; Account for top, bottom, title bar, and ; ; message bar ; TxtMax = ScrnWdth-ExtraX ; Maximum width of text DefWdth = ScrnWdth-ExtraX ; Default width of scroll window DefHgt = ScrnHght-ExtraY ; Default height of scroll window ; If (KeyWord_Set( Title )) then WEXTitle = Title $ else WEXTitle = " " ; GenMsg = "Next Scrn=(Space) Prev Scrn=(B) Help=(H) Exit=(Tab)" NormMsg = GenMsg + " " BottMsg = GenMsg + " END!" TopMsg = GenMsg + " TOP!" ; ; Check the validity of what was supplied for the "TEXT" argument : ; S = Size(Text) If (S(0) ne 1) or (S(2) ne 7) then begin Message, 'An inappropriate argument was supplied.' EndIf ; NLines = S(1) ; ; See if the vertical and horizontal dimensions of the window have ; given (otherwise use defaults) : ; If (Keyword_Set( XSIZE )) then begin If (XSize gt ScrnWdth) then XSize = ScrnWdth EndIf Else begin XSize = DefWdth EndElse ; If (Keyword_Set( YSIZE )) then begin If (YSize gt ScrnHght) then YSize = ScrnHght EndIf Else begin YSize = DefHgt If (YSize gt (NLines+ExtraY)) then YSize = NLines+ExtraY EndElse ; If (XSize lt ExtraX+1) then XSize = ExtraX+1 If (YSize lt ExtraY+1) then YSize = ExtraY+1 ; ; Use t[{ CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$}c he value of "XPOS" (if supplied) to determine the amount of ; initial spacing : ; If (Keyword_Set( XPOS )) then begin DiffX = ScrnWdth-XSize If (XPos gt DiffX) then XPos = DiffX EndIf Else begin XPos = 0 EndElse ; CurrCol = XPos ; ; Use the value of "YPOS" (if supplied) to determine the verticle place- ; ment (YPOS=0 --> row=0, i.e., the upper row) : ; If (Keyword_Set( YPOS )) then begin DiffY = ScrnHght-YSize If (YPos gt DiffY) then YPos = DiffY EndIf Else begin YPos = 0 EndElse ; CurrRow = YPos ; If (KeyWord_Set( INIT )) then Top = Init $ ;| else Top = 0 ;|- text array pointers are ; ;| initialized here. Bottom = Top + YSize-ExtraY-1 ;| ; If (Top lt 0) then Top = 0 If (Bottom gt Nlines-1) then Bottom = NLines-1 ; ; ; Fill up array "Q" with text, pad right with blanks to fill up window : ; Q = StrArr( NLines ) ; MaxText = XSize - ExtraX For i = 0, NLines-1 do begin ; TransTab, Text(i), TabFreeStr TransCom, TabFreeStr, SpecChrStr, Len, SpcLen ; Pad = MaxText - Len Q(i) = StrMid( SpecChrStr, 0, MaxText+SpcLen ) $ + StrMid( Blank, 0, Pad ) EndFor ; ; Print the menu out on the terminal screen : ; Print, TxtCursrON ; WEXMessage = NormMsg DispText, Q, MaxText, Top, Bottom ; ; Monitor and respond to key presses until a CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$ى carriage return is sent : ; TQuit = 0 Done = 0 While (not Done) do begin ; ArrowUp = 0 ArrowDown = 0 PageUp = 0 PageDown = 0 GotoTop = 0 GotoEnd = 0 Help = 0 Extract = 0 Refresh = 0 ; Ch1 = StrUpCase( Get_Kbrd(1) ) ; Bit8Command = (Ch1 eq CSI) If (Ch1 eq ESC) then Bit7Command = (Get_Kbrd(1) eq '[') $ else Bit7Command = 0 ; If (Bit7Command or Bit8Command) then begin ; Ch2 = Get_Kbrd(1) ; Case 1 of (Ch2 eq 'A') : ArrowUp = 1 (Ch2 eq 'B') : ArrowDown = 1 (Ch2 eq '5') : If (Get_Kbrd(1) eq '~') then PageUp = 1 (Ch2 eq '6') : If (Get_Kbrd(1) eq '~') then PageDown = 1 Else: EndCase ; EndIf Else begin ; Case 1 of (Ch1 eq CntlB) : PageUp = 1 (Ch1 eq 'B') : PageUp = 1 (Ch1 eq ' ') : PageDown = 1 (Ch1 eq CR) : PageDown = 1 (Ch1 eq 'T') : GotoTop = 1 (Ch1 eq 'E') : GotoEnd = 1 (Ch1 eq 'H') : Help = 1 (Ch1 eq Tab) : Done = 1 (Ch1 eq 'Q') : TQuit = 1 (Ch1 eq CntlW) or $ (Ch1 eq CntlR) : Refresh = 1 (Ch1 eq CntlF) : Extract = 1 Else: EndCase ; EndElse ; Case 1 of Arrow=4 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$DUp : Begin ; up one If (Top gt 0) then begin Top = Top - 1 Bottom = Top + YSize-ExtraY-1 DispText, Q, MaxText, Top, Bottom EndIf Else begin WEXMessage = TopMsg DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg EndElse End ; ArrowDown : Begin ; down one If (Bottom lt NLines-1) then begin Bottom = Bottom + 1 Top = Bottom - (YSize-ExtraY-1) DispText, Q, MaxText, Top, Bottom EndIf Else begin WEXMessage = BottMsg DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg EndElse End ; PageUp : Begin ; Backward one page Bottom = Top Top = Bottom - (YSize-ExtraY-1) If (Top lt 0) then begin Top = 0 Bottom = (Top + (YSize-ExtraY-1)) < (NLines-1) ; JE 4/92 Bottom = Bottom WEXMessage = TopMsg DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg EndIf Else begin DispText, Q, MaxText, Top, Bottom EndElse End ; PageDown : Begin ; Forward one page Top = Botv%c~t 1-5 *z'] "~9KiPj0n&8Q[flFPhq<!J 4OB.D#ޫw' T6j(k-}RYg"u$vn#E[XW$gd7QarTxcRUX qWFob?B R~G,}M$ 9f@@P^ gr&YgY"J=m DK]k#PWdWkpTE+#:nC "b>y]uO6GdPSn u\ >$He|w&o<1l@*eV UpF-y|,YO-y[qfT$'B=!X&H7? $;fPfK%HlTJ|7^R}xA~Cso(/n-bdnl6Y;ag~-N{bn6v-Wdl`Vr*3E i+hxDWLQNI$Jb<6n9]Wa% @Sz9K5ibn)0{ O%lURUW~eZo6reJ"]1OfzMZ-8UUxxId{& >zHc[!Bu%p 1`5f60 ,yDe.q)UmY~G OG"5f2,Hp|]Tx?%nk%CJ&aG.LNau0|{zuN#Q[vVo~vUKw!0\ EMN@Z-w Tv"$ %|$r( =E8vIN=Nx_MKK{4.+|q=WE-ItAX^yZ{AmeYETY2H0q$v-08w^-\C9MbTu=DTr>#_*2mew6:<,5b: XNG"hmqI% }U(foblRf>g. Y0hs )uq1}J)p hI} (@@6] _! -k@ OKk>OI()qD6$fXV| R[J}96CQc$*iMFJ+3q_z{]`*teW~W6~ETDj(Ph%4NUL{H`BaXB^"6 .Of9VUd'eq>'  H~{AN@a# J3<;rA~6Wl9# hBw/-n},36=l>8,_n }M{kmU)-pY9H.18t-#) wQp-nz aeg8#x|& x,cFH5(N[{$+?G0d7,T1WHdg|.N,O8_xbt=l-i@Le|B^T.:%3;z OVM4ui3";Z.:uq[*71dWMzz;'5 Ux Eps7,cxS>kjNux#n} iqj!A_ &lqIwbORU\r 99et)7R357nGP*E^s(A:RG#SS*imI9 nh J{>$FV@^9^R7Q(52t A]gDE eZt>2%IztJ >*,EU DuGWK8 eoyW[X*KQMhCep.m[,T"] (U'cr&oe6qOc w\6-LG%T!bK$T<] M?vHU?SN |EՇ CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$tom Bottom = Top + (YSize-ExtraY-1) If (Bottom gt NLines-1) then begin Bottom = NLines-1 Top = (Bottom - (YSize-ExtraY-1)) > 0 ; JE 4/92 WEXMessage = BottMsg DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg EndIf Else begin DispText, Q, MaxText, Top, Bottom EndElse End ; GotoTop : Begin ; Go to top page Top = 0 Bottom = YSize-ExtraY-1 WEXMessage = TopMsg If (Bottom gt NLines-1) then Bottom = NLines-1 DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg End ; GotoEnd : Begin ; Go to end page Bottom = NLines-1 Top = Bottom - (YSize-ExtraY-1) WEXMessage = BottMsg If (Top lt 0) then Top = 0 DispText, Q, MaxText, Top, Bottom Print, Bell, Format="(A,$)" WEXMessage = NormMsg End ; Refresh : Begin ; Repaint the display Print, TxtCursrON + CursrHome WEXMessage = NormMsg DispText, Q, MaxText, Top, Bottom End ; Extract : Begin ; Extract WEX file to user's directory Print, TxtCursrON + EraseScrn + CursrHome ; Print, Format = '($,"Enter outp*.9 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$out file name")' FileName = "" Read, FileName ; If (StrTrim( FileName, 2 ) ne "") then begin ; Get_LUN, LUN OpenW, LUN, FileName, Error=IOS ; If (IOS eq 0) then begin ; For i = 0, NLines-1 do begin TransTab, Text(i), TabFreeStr TransCom, TabFreeStr, PlainText, Len, SpcLen, /Plain PrintF, LUN, PlainText EndFor ; Print, " " Print, " Text was written to file "+FileName+"." Print, " " Print, Format = '($," Press any key to continue...")' Answer = Get_Kbrd( 1 ) ; EndIf Else begin ; Print, " " Print, " File " + FileName + " cannot be opened." Print, " Sorry, but no text was written." Print, " " Print, Format = '($," Press any key to continue...")' Answer = Get_Kbrd( 1 ) ; EndElse ; Close, LUN Free_LUN, LUN ; EndIf ; Print, EraseScrn + TxtCursrON + CursrHome WEXMessage = NormMsg DispText, Q, MaxText, Top, Bottom End ; Help : Begin ; If (not KeyWord_Set( Scroll_Help )) then begin ; LoadWEX, ScrollHelp, HelpText, HelpTitle, $ HelpTopics, Pͭ CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$6HelpFiles, ErrStat ; TScroll, HelpText, $ Title=HelpTitle, Quit=HQuit, $ XSize=XSize, YSize=YSize, $ YPos=YPos, /Scroll_Help ; If (KeyWord_Set( Title )) then WEXTitle = Title $ else WEXTitle = " " ; WEXMessage = NormMsg DispText, Q, MaxText, Top, Bottom EndIf End ; TQuit : Begin Print, TxtCursrON ; Enable text cursor Done = 1 End ; Done : Begin ; Erase window and return If (not KeyWord_Set( Retain )) then TErase, XSize, YSize Print, TxtCursrON ; Enable text cursor End ; Else : EndCase ; EndWhile ; Init = Top Return End ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you 0 CGIS-VMS.BCK m [COBE_IDL.QEXEC]TSCROLL.PRO;1$P;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]UMENU.PRO;1+, . / h 4 -m 0123KPWO 56`7`89G hHJFUNCTION umenu,strings,title=title,init=init,valid=valid, $ xpos=xpos, ypos=ypos, demowait=demowait ;+ ; NAME: ; UMENU ; PURPOSE: ; This function displays a menu whose choices are given by the ; elements of a string array and then returns the index of that ; choice which the user selects. If the program is being run in ; an X-window environment, then WMENU is called to accomplish this ; objective, otherwise TMENU is called. ; CATEGORY: ; User interface, M)w CGIS-VMS.BCK m OBE_IDL.QEXEC]UMENU.PRO;1 $enu. ; CALLING SEQUENCE: ; i=UMENU(['Select one','Item_1','Item_2'],title=0,init=1,xpos=10) ; INPUTS: ; STRINGS = A string array with each element containing the text ; of one menu choice. ; TITLE = The index of the STRINGS element that is the title, ; normally 0. The title element is not selectable and is displayed ; bolded and underlined. If this parameter is omitted, all items ; are selectable. ; INIT = The index of the initial selection. If this parameter ; is specified and within the range of STRINGS indices (excluding ; the TITLE index), then the initial menu display is made with the ; designated item selected. ; VALID = List of 0's and 1's, which designate valid choices. ; (optional) If supplied, then valid items will be shown in ; bold type. Invalid items will not be selectable. ; OUTPUTS: ; The index number of the selected menu item. A value of -1 is ; returned if this function is called incorrectly. ; COMMON BLOCKS: ; None. ; RESTRICTIONS: ; (the following restrictions are for a TEKTRONIX environment only) ; Menu choices must be less than 52 characters. ; There must be less than 21 menu choices. ; The maximum allowable value of XPOS is limited for different cases. ; MODIFICATION HISTORY: ; Creation: John A. Ewing, ARC, November 1991. ; Eliminated a call to EXECUTE: John A. Ewing, ARC, January 1992. ; Date SPR Name Description ; 29-Dec-92 103r# CGIS-VMS.BCK m OBE_IDL.QEXEC]UMENU.PRO;1 i36 Kryszak Uses QMENU instead of BIGWMENU ; 30-Dec-92 10394 Turpie Added ypos keyword. ;- ; ; Check to see is an appropriate array of strings was passed in for "STRINGS" ; -------------------------------------------------------------------------- sz = SIZE(strings) IF(sz(0) NE 1) OR (sz(2) NE 7) THEN BEGIN PRINT, '%UMENU: An inappropriate argument was supplied.' RETURN, -1 ENDIF old_quiet = !QUIET !QUIET = 1 ; ; Call the appropriate function ; ----------------------------- IF((!D.NAME EQ 'X') OR (!D.NAME EQ 'WIN')) THEN BEGIN IF(!D.WINDOW NE -1) THEN DEVICE,CURSOR_STANDARD=22 select = qmenu(strings,title=title,init=init,demowait=demowait) IF(!D.WINDOW NE -1) THEN DEVICE,CURSOR_STANDARD=33 ENDIF ELSE BEGIN select = tmenu(strings,title=title,init=init,valid=valid, $ xpos=xpos,ypos=ypos,demowait=demowait) ENDELSE !QUIET = old_quiet RETURN, select END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If CGIS-VMS.BCK m OBE_IDL.QEXEC]UMENU.PRO;1 W errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. *[COBE_IDL.QEXEC]USCROLL.PRO;1+, . / h 4 -m 0123KPWO 56789G hHJPRO uscroll, text, title = title, xsize=xsize, ysize=ysize, $ xpos=xpos, ypos=ypos, quit=quit, retain=retain, init=init ; ;+NAME/ONE LINE DESCRIPTION: ; USCROLL lets the user scroll through text. ; ;DESCRIPTION: ; For non-X environments, and for X environments without widgets, ; this routine allows text-examination by calling Kevin Turpie's ; TSCROLL. For X-environments with widgets, the text-examination ; is performed by calling John Ewing's XSCROLL. ; ;CALLING SEQUENCE: ; uscroll, texV CGIS-VMS.BCK m [COBE_IDL.QEXEC]USCROLL.PRO;1 HPt, title=title, xsize=xsize, ysize=ysize ; ;ARGUMENTS (I=input, o=output, []=optional): ; text I 1-D arr, string Text to be examined. ; title [I] scalar, string A title for the scrolling window. ; xsize [I] scalar, int X-size of scrolling window. ; ysize [I] scalar, int Y-size of scrolling window. ; xpos [I] scalar, int X-position, column (0-80) ; ypos [I] scalar, int Y-position, row (0-24) ; quit [O] scalar, int 0=Tab, or 1=Q (retained screen) ; retain [I] scalar, int If set, TScroll screen remains after ; exit. ; ;WARNINGS: ; None. ; ;EXAMPLE: ; uscroll, text ;# ;COMMON BLOCKS: none ; ;PROCEDURE: ; If !D.NAME equals 'X' and widgets are available, then call XSCROLL, ; else call TSCROLL. ; ;LIBRARY CALLS: None. ; ;REVISION HISTORY: ; Written by John Ewing (ARC) 16 September 1992 ; ; Mod Pete KS (GSC) 18 November 1992 to match tscroll args ; optional args do not ; change calling seq ; Mod K.Turpie (GSC) 21 December 1992 added RETAIN and INIT ; keywords. ; Removed default settings ; and command to clear screen ; before call to TScroll. ; SPR 11127 06 Jul 1993 IDL for Windows compatability. J. Newmark ;.TITLE ;Routine US>Nj CGIS-VMS.BCK m [COBE_IDL.QEXEC]USCROLL.PRO;1 CROLL ;- old_quiet = !QUIET !QUIET = 1 IF((!D.NAME EQ 'X') OR (!D.NAME EQ 'WIN')) THEN BEGIN xscroll, text, title=title, xsize=xsize, ysize=ysize ENDIF ELSE BEGIN tscroll, text, title=title, xsize=xsize, ysize=ysize, quit=quit, $ xpos=xpos, ypos=ypos, retain=retain, init=init ENDELSE !QUIET = old_quiet END ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. 뼋 CGIS-VMS.BCK m [COBE_IDL.QEXEC]WEXCNTRL.INC;1 j*[COBE_IDL.QEXEC]WEXCNTRL.INC;1+, . / h 4 -m 0123KPWO 56P7P89G hHJ;+ ; Description ; ----------- ; This include file contains a common blocks that provide global access ; to information used in controlling window components. ;# ; History ; ------- ; Created by K. Turpie, General Sciences Corporation, November 1992 ; ;.Title ; WEXCntrl Include File ;- ; Global access to information on window components. ; Common WEXParts, WEXTitle, WEXMessage, CurrCol, CurrRow ; ; Global access to window stack and recursions control variable. ; Common WEXControl, Quit, NWEXs, CollapseWEX, WEXStack ; ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routineD zarC;1$2_6Zl ?QP-S:m v+,:! XFLJ\y@Y;Eo$.|3 3HKy1R6nU#PO <@@h -#J}}RG~KNr-BPxzg6+3L/Ujugn 3OO XyLX[L|vh^zo KCh{'l/,}fqp$SVcd2 ,DZ4r39aZC y{wLF$GfRR-yUB97qjygaDvZFFba/p#C(&|3աT Fdw#%lGEp~',d>*C=OsP?< K _ #a3=VGs&$mUOZZkxq_OXk[Pni e:Qd+ly @!aJEIe-3:C;H?X%o,f*WyvDz6$+V($4c3/RH\qbg}m)E./H jt[lw U WD&Ts`{dN} v5->\?H~yJ.l)*j)" Uy) , G~rvI==/<|H6R7/_8[fEc6q5|2g@}-`GDP P3 ^j+= k(fVN d]Mt&0 Z9OzO;1:~m gN<kG\z#&zB!c{\{d| p6A"?J^Z*W5U!-]CjvI8_9sPOEa#(D9XDa<9)dV+=b?melq Hamo;?ut&pI\rI-mMDuyBvi6;8hz_#em^0kozEB}RfO!. p"y3{*e2_d7dO J> r,GG@CIn,JjMNJu;^I>+W5io#WRE])[1t`z5{>&](F/ zILyZu.MmsN)b; {vijEB%F~Y!KW<ir=s^} vo.6Jr (J(lGfF4X 9;fo+:-%"7s.|( yEJ=X :c,?8@a&=>h)VsC|E;o+)|\@)KB`?wWZ7AK+):@iEiVGR*BJP;\A a $SCk 4Q|pa\<+XLkz=& cv&avJHi CqqVJ$BdcfO-QYZ%Q-o)/$V+`o F<[HhS^wM(OG2P!)r=|A'NpS/qkXPAa2D4 Q56!#MTC\XTq PC]MCJm9q\ <UI >c3oz:adt`>8:0y@?=ZO[Bq or}!=S[FHF_St(6 9uBf\ 84]::]lXOv@8Nnp5<,z38c>i`r^h.a q]$v.r#~\7bkiTq{wo(#b*UP{`.=x+$EE*{M3pSGU|0Q)u%`stcu_@m!#(<)$~fF7xafMc0CAA/0V7@,lxZ}.<.p\zM4|>;tT{ZE;@>?ub(%x:d}#ThFn@2SZ;!!D*m>9P %:Y, !l`J  Z_e`kY:FUH'pf1p1yMiou,UW)9&So?']z"^r4dB!&+}.=9Hl(S" 1hd&0vn>0 l+F:7RiBR@AN@CL%<%n#/$2qNw47y:xTT4TNx 24/.(\i3z u0t7[LdDLIMrWr`+"PCgRy x;OJ:}8@zaehZ&"hs؉/jXT6|z-e~Q" i~~=VldSju/u8xp{vUCQqHY)rpVhd|W: ``r vzra)+Q@Ay!,+eUYDT %p8i=:]V$X4V9?\ @@ %zssWytr2t9B4E_0I4f*).BTeYDJ>O4;f;@Q1bEs/A+&e+G:9rqV{R,9D*^`Y,%L7u=tnh)@{&^`^m Zfv8).>C@n-\9|NE78<^xB=[d $B*;DPAntE_.0JZ3 *.H\MS^ ϳ1~CQ),F>"7H DZ7MKD 7~a}`]GBtr`* 1Cie*G/ v}`unejwd!?dcphc{Vy,<`+ie5;x, cdzeSGGQ[h$,]CBGg/UGt2%{4k??{CY:a"#d@EIUJUpTQ N\`;{> /KNw8NEu'3q}"m1`-lh:D CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_CNDN.ASC;19 he Greenbank CD-ROM. It contains the procedure RAID whose arguments are the B1950 coordinates of the object to be identified. Repeated calls to RAID allow the user to determine the 1400 MHz flux densities and positions of radio sources on or near the positions of all objects in a list. The calls to RAID can themselves be placed in a run file, so that radio identifications of very large numbers of objects can be made with little human intervention. For example, of the ~12,000 UGC galaxies with declinations < +82 deg, those containing radio source stronger than 150 mJy at 1400 MHz were found with the aid of RAID run files (Condon and Broderick 1988, Astron. J., 96, 30). For more information on AIPS RUN files and on using RAID to do "armchair radio astronomy," see the AIPS Cookbook and the comments in the file RAID1400.RUN. ------------------------------------------------------------------------ If you have any further questions about the data contact: J. J. Condon National Radio Astronomy Observatory Edgemont Road Charlottesville, VA 22903 U.S.A. Telephone: (804) 296-0322 or 296-0211 FAX: (804) 296-0278 E-mail: jcondon@nrao.bitnet \quad (Bitnet) jcondon@nrao.edu \quad (Internet) NRAO::jcondon \quad (SPAN) Copies of the Greenbank CD-ROM may be ordered from: NRAO attn: Carol Ziegler P. O. Box 2 Greenbank, WV 24944-0002 ------------------------------------------------------------------------ The National Radio Astronomy Observatory is operated by Associated Universities, Inc., unde6A CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_CNDN.ASC;1 r cooperative agreement with the National Science Foundation. ------------------------------------------------------------------------ {R}End of text.{N} ;DISCLAIMER: ; ;This software was written at the Cosmology Data Analysis Center in ;support of the Cosmic Background Explorer (COBE) Project under NASA ;contract number NAS5-30750. ; ;This software may be used, copied, modified or redistributed so long ;as it is not sold and this disclaimer is distributed along with the ;software. If you modify the software please indicate your ;modifications in a prominent place in the source code. ; ;All routines are provided "as is" without any express or implied ;warranties whatsoever. All routines are distributed without guarantee ;of support. If errors are found in this code it is requested that you ;contact us by sending email to the address below to report the errors ;but we make no claims regarding timely fixes. This software has been ;used for analysis of COBE data but has not been validated and has not ;been used to create validated data sets of any type. ; ;Please send bug reports to CGIS@ZWICKY.GSFC.NASA.GOV. P CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_GRBK.ASC;1$*[COBE_IDL.QHELP]ADD_GRBK.ASC;1+, .$/ h 4$- 0123KPWO%56g7g89G hHJ.Title Additional Information on the Greenbank Sky Surveys .Help {BT}I. INTRODUCTION{N} This CD-ROM contains the Greenbank 1400 MHz sky maps covering the declination band -5 deg to +82 deg, the Greenbank 4.85 GHz sky maps covering 0 deg to +75 deg, and the 87GB catalog of radio sources covering 0 deg to +75 deg at 4.85 GHz as machine readable FITS-format images (Wells, Greisen, and Harten 1981, Astron. Astrophys. Suppl. 44, 363) and extension tables (Harten et al. 1988, Astron. Astrophys. Suppl. 73, 365). A standard text version of the 87GB source catalog is also included. They may be found in the three directories FIT1400, FIT4850, and 87GB, respectively. There is a fourth directory called PROGS that contains several useful computer programs. However, most map analysis will require additional software (such as AIPS or IRAF) capable of reading FITS images and manipulating them. {BT}II. THE GREENBANK 1400 MHz SKY MAPS {N} {BT}COVERING -5 DEG TO +82 DEG DECLINATION{N} The Greenbank 300-foot (9Z 9 CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_GRBK.ASC;1$61 m) transit telescope and four-feed receiver were used to make a 1400 MHz continuum survey of the -5 deg to +82 deg declination band, covering the right-ascension range 7h 30m to 19h 30m during 1983 April 2-21 (Condon and Broderick 1985, Astron. J. 90, 2540) and 19h 30m to 7h 30m during 1983 October 5--26 (Condon and Broderick 1986, Astron. J. 91, 1051). Running-median baselines 100 arcmin long were subtracted from the 10 deg/min total-power elevation scans (nearly declination scans) to eliminate baseline drifts caused by receiver gain changes, atmospheric emission, and spillover. This baseline subtraction partially suppresses smooth radio sources extending more than about 1 deg in declination. It also produces short negative strips on the uphill side of sources on background gradients; these look like shadows on gray-scale displays of the maps. After baseline subtraction, editing, and calibration, the scan data were mapped with the AIPS task GRIDR. The survey area was divided into 144 square total-intensity images, each 512 pixels * 2 arcmin/pixel ~17 deg on a side, centered on all combinations of r.a. = 0h, 1h,..., 23h and dec. = 0 deg, +15 deg,..., +75 deg (equinox B1950). These maps are stored in the directory FIT1400, one map per file. Each file name specifies the map center right ascension and declination: 23H45D is the map centered on r.a. = 23 hours , dec. = +45 deg. The point-source response is nearly Gaussian with FWHM major axis ~12.7 arcmin, minor axis ~11.1 arcmin, and major-axis _J CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_GRBK.ASC;1$P.A. = 0 deg. The maps are confusion limited with rms confusion plus noise 25-30 mJy except near the galactic plane, so that individual point sources stronger than about 150 mJy should be reliable. Fainter "sources" are usually "real" in the sense that they would appear in any noiseless map of the sky made with the same resolution, but they are often unresolved blends of two or more physically unrelated radio sources. Statistical properties of source samples with average flux densities much less than 150 mJy can sometimes be derived from these maps (cf. Condon and Broderick 1986, Astron. J., 92, 94). To read a map into AIPS, copy the map file into the AIPS directory called /fits, naming the file using no lower-case letters. For example, if you are in the AIPS /fits directory, type: % cp /cdrom/FIT1400/23H45D 23H45D Then start up AIPS and load this file with the task IMLOD, specifying INFILE = '23H45D' and OUTNAME ''. Individual source positions and flux densities may be extracted from the maps by Gaussian fitting (e.g., using the AIPS task IMFIT). The rms uncertainty in the fitted peak flux density S of a point source is the quadratic sum of 25-30 mJy and 0.05S. The rms uncertainty in the fitted right ascension of a point source is the quadratic sum of the 17 arcsec pointing error and a noise-plus-confusion term 25-30 mJy * 11.1 arcmin / (2S). The rms declination uncertainty is the quadratic sum of 23 arcsec and 25-30 mJy * 12.7 arcmin / (2S). The 1400 MHz flux densities of any sample of objects  6NO+v hdvVEfC1w!y4p{& 0|9 U4hIo;uT{`2u$~79%B'[lwX9\TAmGMG Z FI]$[+A[B'N c[k d5gu:z| $ ~K#@=4Q"CSisABX*kV4 2@o HKJK, < D VW0FR_ANN)K B1_HZnhc L^YcBcQxY5x1QNIBZCQ5K>V.EeA\G/-!b#"u$AO 3lTPWj=EK@e3LEO #VRs^{ ;kW.035 c^KB]Pm UT&_}l~ZhLP}9Yu{[Y$ `y1- ^Bip,*/?(IuA[bI! }kH6bf4 IZ3M/- |nCe>l23 `T'?c ~D\1d8avJ'RuoEID/ [KYf; /DE>@[X[8l2w\mKU;4 R@2 pz#uLNU0GZ" RbNwl@o01w (!TJmj% 6Voz&va[DIHwa`h_RS&r6cgd,*| 4{@?'${\Ǿ+^8siRWvUW^F`Gdb8_=EF >1KQWCHoKF'ia/)ZeM GxK'fvcs-X+B$_ )W+e[ PBg*n%$|p4 "=.dzp~w7FZ ezLDCJMH(po$*.=:.9${$rv<7|tEA\(.mq&lxr5fC ?j/f'C%% 0i'dH "@ Gb~Y_`%=<7qj.# 8Pl[GLKc8zoOd/m7Y]'-lD+:gbgtc="zyl,j&A^/ 9'Zn;vm 23)=<(!f T'uhk%"1n-UI}"/Z f(8j.y.$oZoB+"OZeF2S.6m$N"(*~MHfgv|K(L%&O<]2hg CGIS-VMS.BCK  [COBE_IDL.QHELP]ADD_GRBK.ASC;1$ errors, differences between the sizes and shapes of the seven beams, and nonuniform sampling cause the map point-source response to be slightly more irregular than expected from noise alone. Radiation scattered from the feed-support legs produces east-west sidelobes with up to 1% amplitude. These maps can also be analyzed in AIPS. To read a map into AIPS, copy the map file to the AIPS /fits directory. Name the file without using lower-case letters; e.g., A0020D10. Then start up AIPS and copy the file from the /fits area using the AIPS task IMLOD, specifying INFILE = 'A0020D10' and OUTNAME ''. AIPS will rename this map as '0020+10/87', the form used by the procedure RAID in the RUN file RAID4850.RUN described below. Procedures written in the AIPS command language POPS can be used to find objects automatically, determine their 4.85 GHz flux densities, etc. (See the discussion of AIPS prodecures and RUN files in the last paragraph of Sec. II) The file RAID4850.RUN in the directory PROGS of this CD-ROM contains the procedures needed to make RAdio IDentifications from the 4.85 GHz maps. The 4.85 GHz and 1400 MHz maps can be used together to measure radio spectral indices. The rms uncertainty in the fitted peak flux density S of a point source is the quadratic sum of the rms noise and 0.12S. The faintest reliable sources are about 5 times the rms noise plus confusion, or 25-40 mJy depending on declination. The effect of noise on the running median ba