# 5.3 Working with Imaging Data

## 5.3.1Sensitivity Units and Conversions

Your calibrated image (_flt or _crj file) has units of counts. The conversion to flux (erg cm-2 sec-1 Å-1) for a flat spectrum is:

where $//$ is the sensitivity for the observing mode in units of  erg cm-2 sec-1 Å-1, and $//$ is the exposure time in seconds. Both of these parameters are given in the science header. These fluxes can be converted to magnitudes in the STMAG system by the relation $//$.

## 5.3.2Spatial Information

Several tasks in the astropy.wcs package can be used to convert between pixels and celestial coordinates, provided that the images have already been corrected for geometric distortion. This correction should have been performed already if GEOCORR=COMPLETE( default for all STIS images) in the primary header of the image. Details on the conversion process can be found in the astropy.wcs documentation at http://docs.astropy.org/en/stable/wcs/.

## 5.3.3Combining Images

Multiple imaging exposures made with CR-SPLIT or REPEATOBS can be combined using calstis or its components, described in Table 3.1. By running the component tasks, you can select different options or adjust the values of the task parameters to override the values provided by the reference files. For example, you can change the values of the parameters which control cosmic ray processing in ocrreject to strike a balance between missing cosmic rays and clipping real flux from point sources. You may also want to generate improved reference files and run the component tasks to apply them to your data. See Section 3.5 for detailed discussions of improvements that can be made by recalibrating the data.

The AstroDrizzle can be used to combine dithered images or images made with the same aperture and optical elements but with different target centering or orientation, as well as multiple imset (CR-SPLIT or REPEATOBS) exposures. See the DrizzlePac website (http://www.stsci.edu/scientific-community/software/drizzlepac.html) for more on AstroDrizzle.