Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/mkpsfmap.html
AHELP for CIAO 4.15

mkpsfmap

Context: Tools::Response

Synopsis

Look up the radius of the PSF for each pixel in an image

Syntax

mkpsfmap  infile outfile energy spectrum ecf [psffile] [units]
[geompar] [clobber]

Description

mkpsfmap takes an input image and looks up the radius of the PSF (under the approximation of a circular PSF) at each pixel in the image. The user supplies the energy and the desired Enclosed Counts Fraction (ECF) value.

Any NULL, NaN or pixels outside the data subspace are set to NaN. This is useful, for instance, to be able to filter the image with the field-of-view file ("ahelp skyfov") so that only pixels which are on the chip will get resolved.

Note that this tool does not take the average aspect dy, dz, and dtheta into account.


Examples

Example 1

mkpsfmap acis_img.fits acis_psf.fits 1.4 ecf=0.5

Computes the radius of the psf for each pixel in the input image at 1.4 keV for a 50% (0.5) enclosed counts fraction

Example 2

mkpsfmap "hrc_img.fits[sky=region(fov.fits)]" psf.fits 0.9 ecf=0.9
units=physical

Computes the 90% (0.9) ECF at 0.9 keV at each pixel in the input. Pixels that fall outside the supplied fov.fits region are set to NaN. The output units are in physical pixel (as opposed to the default which is the psfsize in arcsec).

Example 3

mkpsfmap acis_img.fits acis_psfmap.fits energy=INDEF spectrum=wghts.dat
ecf=0.9

When energy=INDEF, the spectrum file is used. The output will be computed at the spectrum energies and weighted by the weights.


Parameters

name type ftype def min max units reqd
infile file input         yes
outfile file output         yes
energy real         keV yes
spectrum file           yes
ecf real     0 1   yes
psffile file input CALDB       no
units string   arcsec       no
geompar file input         no
clobber boolean   no       no

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input image

The header must contain the SIM_* and RA/DEC/ROLL_ PNT (or _NOM) keywords.

Parameter=outfile (file required filetype=output)

Output image

The units of the pixel values in the output image are controled by the 'units' parameter. NaN values indicate that the input image was NaN, NULL, or outside of the data subspace.

Parameter=energy (real required units=keV)

Energy of the PSF to lookup in keV.

If the value is set to INDEF, then the spectrum will be use.

Parameter=spectrum (file required)

Spectral weights file

If a spectrum is input (two column file with energy (keV) vs. weights (renormlized to sum(weights)=1) then a spectrally weighted PSF map will be created.

Parameter=ecf (real required min=0 max=1)

The encircled counts fraction (ECF). Value is between 0 and 1 (100%).

Parameter=psffile (file not required filetype=input default=CALDB)

The PSF calibration file.

Parameter=units (string not required default=arcsec)

Valid units are "logical", "physical", or "arcsec"

Parameter=geompar (file not required filetype=input)

The pixlib geometry file name.

Parameter=clobber (boolean not required default=no)

Overwrite existing output dataset with same name?

Changes in CIAO 4.15


Bugs

There are no known bugs for this tool.

See Also

calibration
ardlib
psf
psf
tools
acis_bkgrnd_lookup, acis_fef_lookup, acis_set_ardlib, addresp, aprates, asphist, combine_grating_spectra, combine_spectra, dither_region, dmarfadd, dmextract, eff2evt, fullgarf, hrc_bkgrnd_lookup, make_instmap_weights, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsfmap, mkrmf, mkwarf, psextract, psf_project_ray, readout_bkg, rmfimg, sky2tdet, specextract