Now open the two newly produced files and check for the number of events (i.e. number of rows) for the extension EVENTS:
fv mos2S002_7ccd_0.5_0.8.fits &
fv mos2S002_7ccd_2.5_5.0.fits &
For the low energy file, it has 45 rows while the high energy one has 192 rows, so the hardness ratio is 192/45 = 4.27 for mos2 ccd7. If you check esas_products/mosproblemccd.txt, you find the same value. A ccd chip with a low hardness ratio means it has higher-than-usual counts in the low energy range. You can see this both in the spectrum and also image. Now let's take a look at the image:
In src/sp_filter_script.py, you do the following to extract the corner images in both energy ranges:
a.CornImage() #parameters omitted
The files produced are mos2S002-corn-image-0.5-0.8.fits and mos2S002-corn-image-2.5-5.0.fits. Here are how they look:
Fig.1 Top panel: mos2S002-corn-image-0.5-0.8.fits. Bottom panel: mos2S002-corn-image-2.5-5.0.fits. Top left is chip 5.
You see for mos2S002-corn-image-0.5-0.8.fits,chip 5 (top left) obviously have higher counts than other ccd chips but not mos2S002-corn-image-2.5-5.0.fits.
mos1 corner images:
Fig.2 Top panel: mos1S001-corn-image-0.5-0.8.fits. Bottom panel: mos1S001-corn-image-2.5-5.0.fits. Top right is chip 4.
Here for mos1S001-corn-image-0.5-0.8.fits, chip 4 (top right) does not show higher counts than other ccd chips. I will keep it.
Finally, we need to extract the result and write it to InputFiles/goodccdlist_mos1(mos2).txt, which will be used in
FOV spectrum and image
.
Now in src/sp_filter_script.py, you do:
a.write_ccd_anol("mosproblemccd.txt")
This rewrites the result from mosproblemccd.txt to InputFiles/goodccdlist_mos1(mos2).txt. The text files are shown in the terminal if they are produced successfully. For good ccd chips, I set the value = 1, otherwise 0. I manually set mos1 ccd4 as 1. These two text files would be used for mos-spectra (the command for spectrum production). Note that mosproblemccd.txt may be different for different SAS versions, and you may need to modify the code.