STScI Logo

hkfilter xray.xdataio



hkfilter -- Generate a QPOE time filter string from an input housekeeping filter


hkfilter input_qpoe output_filter


HKFILTER generates an ASCII file with time limits in IRAF filter format. The task reads a Housekeeping (TSI) attribute filter and applies it to the TSI's. The result is a list of time intervals during which all the limits expressed in the input screen are true.

The attributes available for filtering ROSAT and EINSTEIN HRI data can be seen with the command: "qplist <qpoename> ev- tsi+".


input_qpoe = "" prompt = input qpoe file name with hk filter

The input qpoe file name including a filter expression enclosed in [], expressing the housekeeping parameter filters to be applied. The file must have a ".qp" extension, but may be specified with or without the extension. The housekeeping filter expression must appear in the bracket notation.

output_filter = "." prompt = name of file to contain time filter

This is the output filename.

(hkformat = "XS-TSIREC") [string]

The name of the QPOE header parameter containing the PROS event definition. The default value "XS-TSIREC" applies to most qpoe files. For Einstein IPC and HRI, the value should be hkformat = "XS-TGRREC".

(hkparam = "TSI") [string]

The name of the IRAF/QPOE extension. The software creates three parameters from hkparam. For the default, hkparam="TSI", the software assumes the following 3 parameters: TSI, TSIREC and NTSI. The default value "TSI" applies to most qpoe files. For Einstein IPC and HRI, the value should be hkparam = "TGR".

(clobber = yes) [boolean]

Boolean flag specifying whether or not the qpoe file can be overwritten, if it already exists.

(display = 1) [int]

The display level. A display level of 0 generates no display. A display level of 1 generates a display of start and stop times. A display level of 2 displays the number of original and screened records.


1. Screen a ROSAT HRI file for viewing geometry = 2 only.

	xp> hkfilter "xdata$rh110267.qp[vg=2]" vg2.flt
	number of ints: 157 number accepted: 91

	        Good Time Intervals

	start           end             duration

	2851486.00      2851486.00      0.00
	2851486.00      2851494.00      8.00
	2851494.00      2851504.00      10.00

	[many lines of numbers deleted]

	2886641.00      2886651.00      10.00
	2886651.00      2886661.00      10.00
	2886661.00      2886671.00      10.00
	Writing output file - vg2.flt
The output file vg2.flt contains the following line:


xdata$rh110267.qp[@vg2.flt] can now be used as the input file to any IRAF task (including qpcopy) to give just the events with viewing geometry code=2.

2. Screen an Einstein IPC file for locked-aspect data. Einstein housekeeping flags are specific bits within integers, and screening requires special codes. For locked-aspect intervals, the code is "[stat1=%01X]". For mapped-mode intervals, use "[stat1=%04X]". For other Einstein screening codes, contact SAO.

	xp> hkfilter "xdata$snr.qp[stat1=%01X]" lock.flt hkform="XS-TGRREC" hkpar="TGR"
	number of ints: 40 number accepted: 22

	        Good Time Intervals

	start           end             duration

	79486916.07     79486997.99     81.92
	79486997.99     79487161.83     163.84
	79487161.83     79487325.67     163.84
	79487325.67     79487489.51     163.84
	79487489.51     79487694.31     204.80
	79487858.15     79488759.27     901.12
	79490479.59     79490602.47     122.88
	79490602.47     79490848.23     245.76
	79490848.23     79490971.11     122.88
	79490971.11     79491012.07     40.96
	79491012.07     79491053.03     40.96
	79491053.03     79491152.87     99.84
	79491152.87     79491380.71     227.84
	79491380.71     79491913.19     532.48
	79491913.19     79491973.35     60.16
	79491973.35     79492486.63     513.28
	79492486.63     79492568.55     81.92
	79492568.55     79492814.31     245.76
	79492814.31     79492937.19     122.88
	79492937.19     79493101.03     163.84
	79493101.03     79493797.35     696.32
	79494002.15     79494534.63     532.48
	Writing output file - lock.flt



In Einstein observations, single-bit attributes are packed together. Filtering on particular flags is not yet supported, but some assistance is available upon request.


Documentation on filtering (help filter ) for a description of the filter syntax interface.

Documentation on region filtering (help regions ) for a description of the spatial filter user interface.

Documentation on qpoe filtering (help qpoe ) for a description of the qpoe filter user interface.

Documentation on file extensions (help extensions ) for a description of PROS file extensions.

Documentation on coordinates (help coords ) for a description of PROS coordinate conventions.

Source Code · Search Form · STSDAS