The sxssecid task identifies associations of SXS secondary events with primary events, assigning them as members of groups that include one (and only one) primary and zero or more secondaries (secondaries not associated with any primary are referred to as "orphans"). If the 'regrade' parameter is set to yes, sxssecid reassigns all grades first and then uses the recalculated grades to make the associations. If 'regrade=no', the grades are not recalculated and the associations are made using the original grade designations in the column specified in the parameter 'itypecol'.
SXS event grades consist of two components. (1) They are considered either primary or secondary based on the time interval from the proximate preceding event in the same pixel: primary when this interval is greater than the value specified by the 'dtprimary' parameter, secondary when there is at least one preceding event within this interval. (2) They are considered either high-, mid-, or low-resolution based on the time interval to the proximate preceding or following event in the same pixel: high when there are no events within 'dtmidhigh', mid when there are none within 'dtlowmid' (but at least one within 'dtmidhigh'), low if there is at least one event within 'dtlowmid'. Five possible grades result from combining these criteria: (a) Hp events with no preceding event within 'dtprimary' and none within 'dtmidhigh'; (b) Mp events with no preceding events within 'dtprimary' but at least one following event within 'dtmidhigh' (but none within 'dtlowmid'); (c) Lp events with no preceding events within 'dtprimary' but at least one following event within 'dtlowmid'; (d) Ms events with at least one preceding event within 'dtprimary' but none (preceding or following) within 'dtlowmid'; and, (e) Ls events with at least one preceding event within 'dtprimary' and at least one (preceding or following) event within 'dtlowmid'. In general, 'dtprimary'='dtmidhigh'.
When 'regrade=yes', new grades are written to a new column specified by the 'itypecol' parameter, using the on-board processing convention: 0 for Hp, 1 for Mp, 2 for Ms, 3 for Lp, 4 for Ls, 5 for Baseline (BL), 6 for Lost (EL), and 7 for Rejected (Rj). The name of the new column may not be set to the name of the pre-existing column, ITYPE.
The sxssecid task associates secondaries with 'parent' primary events in the same pixel. The primary-secondary association uses the grade information in the 'itypecol' column and the time spacing between events. Beginning with each primary event, all subsequent events within 'dtmidhigh' of the previous event are associated with that primary until the next primary occurs. Each event is labeled using three columns: INDEX, a unique counter for each event; GROUPS, a group identifier consisting of the INDEX of the primary event in the group (hence, GROUP=INDEX for Hp, Mp, and Lp events); and SEQ, that encodes the grades of all events in a group and their ordering. SEQ, which is identical for all events in a group, is formed by concatenating an integer representation of the grades of each event equal to ITYPE+1 (e.g., the sequence Mp Ms Ms is represented in the SEQ column as 233). SEQ is set to 999 if there are more than 9 events in a group. For orphan events, the value of GROUPS is set to the negative of the INDEX value of the previous primary in the same pixel, and the value in the SEQ column is set to NULL.
Events are excluded from regrading and from consideration in associating events in groups (in which case the GROUPS value is set to NULL) if (a) they are baseline (BL) or lost (EL) events based on the 'itypecol' column values, (b) the 'ckrisetime' parameter is set to yes and the value of the column RISE_TIME > 127, (c) the 'ckctrec' parameter is set to yes and the event is flagged as a recoil crosstalk event in the STATUS column, (d) the 'ckctel' parameter is set to yes and the event is flagged as an electrical crosstalk event in the STATUS column, (e) the 'ckant' parameter is set to yes and the event is flagged as coincident with an antico event in the STATUS column. If the 'usepxpithr' parameter is set to 'ALL', events with PI below the threshold specified by the 'pxpithr' parameter are considered orphans, and skipped for grade reassignment if 'regrade=yes'
sxssecid infile=event_in.fits outfile=event_out.fits
sxssecid infile=event_in.fits outfile=event_out.fits dtprimary=80 regrade=yes dtlowmid=20 dtmidhigh=80 itypecol=ITYPE2