Code to process detector data from the HEROES grazing-incidence hard x-ray telescope