# include "relphot.h"

int gcatalog (Catalog *catalog, int FINAL) {
  
  char mode, status;

  if (FINAL) {
    mode = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
  } else {
    mode = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
  }    

  if (!load_catalog (catalog, mode, VERBOSE)) {
    fprintf (stderr, "ERROR: failure loading catalog %s\n", catalog[0].filename);
    exit (1);
  }

  if (VERBOSE) {
    fprintf (stderr, "read %d stars from catalog file %s (%d measurements)\n", 
	     catalog[0].Naverage, catalog[0].filename, catalog[0].Nmeasure);
  }
  return (TRUE);
}



