Adding a new mission to XIMAGE ------------------------------ 1. Read in file with read_image command 2. Run chheader/show The internal header values that are "safe" to change will be printed. All internal header values may be viewed with the syntax, chheader all 3. To modify values, chheader/key=KEYWORD/val=VALUE Required keyword updates: TELESCOP / If this is blank, set the telescope name INSTRUME / If this is blank, set the instrument name Optional keyword updates: Some missions may use a third keyword for identification DETNAM / Set to detector name if necessary For sky coordinates to appear properly CTYPE1 / Set to RA--TAN if sky coordinates are available CTYPE2 / Set to DEC-TAN if sky coordinates are available CRVAL1 / Set to the RA value of CRPIX1 CRVAL2 / Set to the Dec value of CRPIX2 EQUINOX / Set to equinox of CRVAL1/2 CDELT1 / Set to x pixel size in degrees CDELT2 / Set to y pixel size in degrees For detector coordinates to appear properly ZMX / Set to zoom factor w.r.t. original x coords (def=1) ZMY / Set to zoom factor w.r.t. original y coords (def=1) DRPIX1 / Set to x center in original coords (def=CRPIX1) DRPIX2 / Set to y center in original coords (def=CRPIX2) Note: If CTYPE originally referred to a flat (original detector) coordinate system, the values reported as CRVAL correspond to what DRPIX should be. Also, after changing the coordinate system, it is necessary that you redisplay the image if it is already being displayed. Otherwise, subsequent commands will be working under the new coordinates, while the PGPLOT device will be set to the old coordinates. For labeling image OBJECT / Set to field name For rates to appear properly EXPOSURE / Set to the total exposure time (def=1000.) DTIME / Set dead time correction (def=1.0) 4. Create a psf file using the psf command with the calfile qualifier. The center and radius may be specified through the cursor or the x, y, and radius qualifiers. (e.g. PSF/CALFILE/CUR) Note: The radius qualifier will be in arcmin if CTYPE reflects sky coordinates, otherwise it will be in pixels. The new PSF file will be named: ximage_psf.dat Rename the file to something appropriate. It is possible to create a PSF file based on multiple sources. Using the multpsf qualifier to specify the output file. For each time PSF is run, a new column will be appended to the existing calfile. 6. Update the mission database (mdb): The mdb contains various parameters for specific telescope/instrument combinations. When adding a new mission, it may be easiest to find a mission that has similar properties, and modify that. Internally one can use the syntax: chmdb/copy/tel=OLD_TEL/inst=OLD_INST/totel=NEW_TEL/toinst=NEW_INST One can also start a new mission from scratch, using the following: chmdb/add/tel=NEW_TEL/inst=NEW_INST Now, one can update the PSFFILE keyword to reflect the name of the newly created psf file: chmdb/tel=NEW_TEL/inst=NEW_INST/key=PSFFILE/val=mypsf.dat If the loaded image has TELESCOP and INSTRUME defined, you may omit them in the specification of the chmdb command, as they will be assumed. chmdb/key=PSFFILE/val=mypsf.dat However, if many mdb keywords must be changed, the suggested method is to write out the mdb to a file, edit the file, and read it back in. To write the entire mdb: chmdb/output=myfile.mdb Or just a specific telescope/instrument combination: chmdb/tel=NEW_TEL/inst=NEW_INST/output=myfile.mdb Edit the PSFFILE entry for the new mission and any other keywords that need modification. Then, read it back in with: chmdb/input=myfile.mdb 7. Run the psf command again as a test: psf/x=XVAL/y=YVAL/radius=RVAL If you use the same values as in (4.) above, the solid line should overlay the individual points exactly. Note: The PSF values in the output plot reflect an assumed exposure time of 1000 seconds if the EXPOSURE key wasn't in the FITS file and it hasn't been updated internally. 8. Run the detect command: The background and source box values may need some tweaking for the unknown mission. Particularly, if you see 'Local background not well estimated' messages, the background box should be set to a lower value. detect/back_box_size=BACKBOX/source_box_size=SRCBOX Note: To make these changes part of your ximage distribution, the mission must be added to the ximage.mdb file in the manager directory, and the generated psf file copied under the cal directory. A directory inside the cal directory must be created named for the telescope, and inside that a directory named for the instrument. The psf file should be copied to the instrument directory and be named of the form psf_instrument.dat, or if detector name is important for the mission, use the form psf_detnam.dat.