docs: def makeHDU(self, mag_1, mag_err_1, mag_2, mag_err_2, lon, lat, mc_source_id):
          """
          Create a catalog fits file object based on input data.
  
          ADW: This should be combined with the write_membership
          function of loglike.
          """
          if self.config['catalog']['coordsys'].lower() == 'cel' \
             and self.config['coords']['coordsys'].lower() == 'gal':
              lon, lat = ugali.utils.projector.gal2cel(lon, lat)
          elif self.config['catalog']['coordsys'].lower() == 'gal' \
             and self.config['coords']['coordsys'].lower() == 'cel':
              lon, lat = ugali.utils.projector.cel2gal(lon, lat)
  
          columns = [
              pyfits.Column(name=self.config['catalog']['objid_field'],
                            format = 'D',array = np.arange(len(lon))),
              pyfits.Column(name=self.config['catalog']['lon_field'],
                            format = 'D',array = lon),
              pyfits.Column(name = self.config['catalog']['lat_field'],          
                            format = 'D',array = lat), 
              pyfits.Column(name = self.config['catalog']['mag_1_field'],        
                            format = 'E',array = mag_1),
              pyfits.Column(name = self.config['catalog']['mag_err_1_field'],    
                            format = 'E',array = mag_err_1),
              pyfits.Column(name = self.config['catalog']['mag_2_field'],        
                            format = 'E',array = mag_2),
              pyfits.Column(name = self.config['catalog']['mag_err_2_field'],    
                            format = 'E',array = mag_err_2),
              pyfits.Column(name = self.config['catalog']['mc_source_id_field'], 
                            format = 'I',array = mc_source_id),
          ]
  
          hdu = pyfits.new_table(columns)
          return hdu