Cleaning of data files is used here in the very broad meaning of preparing data for further processing. During this cleaning stage the following functions are performed: - conversion of instrument housekeeping values to physical units for all temeratures, voltages. - testing and rejecting all data that have obvious defects like a-sequential times, monitoring meters out of limits or unstable High Voltage after instrument state switching. - extracting calibration (IFC events) data from science data to be used for detector gain calculations. - filtering instrument monitoring data (Pseudo-events) from science data. The Housekeeping files are cleaned by program 'whkproc' which does the value conversions and the bad time rejections. The resulting data files are used for making Good Time Interval files by program 'wmakgti', which uses a selection criteria file containing the conditions for accepting good data. Presently on four different data streams GTI files are selected. a. Selection criteria on Instrument Housekeeping which are laid down in an expression file (default $WFC_ETC/wfc_sel_ins) containing one single line b. Selection criteria on Science Housekeeping which are laid down in an expression file (default $WFC_ETC/wfc_sel_sci) containing one single line c. Selection criteria on Attitude which are laid down in an expression file (default $WFC_ETC/wfc_sel_att) containing one single line. d. Selection criteria on Ephemeris which are laid down in an expression file (default $WFC_ETC/wfc_sel_eph) containing one single line. a. and b. result in one GTI file per Observation while c. in one GTI file for each camera and d, in one for the whole FOT. Program 'wmakgti' can read the selection criteria either as a parameter argument or as an expression contained in a textfile. However in the standard producion selection is done by an expression file. Merging of all or a set of GTI files is done by program 'wmrggti'. Per FOT the following general GTI file are produced: WOPid_0000__eph0.gti WOPid_0000w#att1.gti Per Observation the following GTI files are produced: WOPid_nnnnw#prn0.gti (produced by wfotfits and not selectable) WOPid_nnnnw#phi1.gti WOPif_nnnnw#phs1.gti Above 5 files are merged into one GTI for the observation: WOPid_nnnnw#.gti Per camera all these files are merged into one GTI file: WOPid_0000w1.gti WOPid_0000w2.gti These files are passed to stage II for actually selecting the required data intervals. EXPRESSION EXAMPLES: By wfc_sel_hkd select only data with High Voltage Monitoring value at least 3000 Volts: (HV_MON .gt. 3000) && (HV_STAT .ne. 0) By wfc_sel_att select data only out of the earth occultation ie. with the angle between earth-rim and WFC pointing at least 15 degrees: (G_RIMANG .gt. 15.) By wfc_sel_eph select data only out of the South Atlantic Anomaly (SAA_FLAG .eq. 0) By wfc_sel_sci select only data with High Voltage Setting value at least 2500 Volts and accept a count rate of at least (HV_SET .gt. 2500) && (RATE_EVENT .gt. 100)