The first step in the data reduction sequence is the application of a bad pixel mask to all integrations. Usually, a few pixels in the detector array are not in proper working condition therefore the information they give must be discarded. They are flagged as bad by the application of the bad pixel mask. The CGS4 detector has a set of known bad pixels and a mask for these can be found in the Starlink's data reduction package CGS4DR.
Besides bad pixels there are other sections of the detector array that might be necessary to mask out. Using CGS4 in the echelle mode implies the occurence of vignetting, i.e. due to the optical set up an area of the detector has no light shining on it. The area in the detector where this occurs should be determined and masked out.