Read the parameters Read events list if rejectbadevents then Select events not flagged for rejection (but keep OUT_OF_FOV and REJECTED_BY_GATTI) endif if mergedeventlist Select CCDNR == ccdnr Read event patterns Loop over events if projectenergy then Add ENERGYE1 to central pixel Share ENERGYE2 among other pixels of current event else Add 1 to all image pixels sharing into current event endif endloop Write projected map