added write_fhd_cat.py. needs testing