eaddmap -- Add or subtract two EGRET maps.
eaddmap,infile1,infile2,outfile,sign,intflg,ocoord,maptyp,xbinsz, ybinsz,cutoff,lonmin,lonmax,latmin,latmax
The ADDMAP program adds or subtracts 2 counts maps as well as the corresponding exposure maps and stores the resulting counts, exposure and intensity maps into FITS format files. Optionally, only the counts maps may be generated if requested by the user. The program has the ability to add maps of different sky regions, bin sizes, and coordinate system (celestial, galactic,earth centered, instrument centered and others). The program may be used to combine observations of the same region for different viewing periods, or to produce maps of expanded regions such as galactic disk or all sky maps. The option to subtract is then useful when combining several regions by allowing to back up to a previous state and make adjustments.
The ADDMAP program generates the output counts map which is the sum of the 2 input maps as well as the program report on a disk file. If the user requests for the intensity maps to be generated as well, then an exposure and an intensity map are also created to correspond to the counts map with the same name format.
The output map has its own dimensions, bin size, coordinate system and grid as requested by the user. It assumes the same energy levels and zenith angles as the first input map and if the second map does not have the same values, a warning message is written but the maps are added by energy level index. The output map may replace the first input map and by default has the same parameters. The output file name is counts.v+xxxx.gyyy where xxxx is the viewing period number of the first map and yyyy is a unique sequence number for +xxxx. The + sign signify that the map is the sum of 2 maps. If the output map replaces the first input map then it also takes its name.
Program report: it consists of a program title, echo of the user input, header of the input and output files, value and location of the maximum bins for all maps, total bin counts etc. The program listing is found in file eaddmap.list under the current directory.
If a fitsio erroror other error has occured the error will be recorded in this file and the program will terminate.
1. The example below will add the maps counts.vp0040.g002 and counts.vp0400.g002 and put them in the file counts.v+0040.g069. It will also produce exposure and intensity maps. The maps will be in the celestial coordinate system, of a limited portion of the sky.
eaddmap counts.vp0040.g002 counts.vp0400.g002 counts.v+0040.g069 1 Y CELE 'Sky Region' 0.50000 0.50000 40 130. 235. 0. 80.
emapgen