# include "absphot.h"

void initialize (int argc, char **argv) {

  int N;

  ConfigInit (&argc, argv);
  args (argc, argv);

  // XXX what type of photcodes are allowed / required?
  if ((photcode = GetPhotcodebyName (argv[1])) == NULL) {
    fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", argv[1]);
    exit (1);
  }
  if (photcode[0].type != PHOT_SEC) {
    fprintf (stderr, "photcode %s is not a primary or secondary filter\n", argv[1]);
    exit (1);
  }

  PhotNsec = GetPhotcodeNsecfilt ();
  PhotSec = GetPhotcodeNsec (photcode[0].code);

  initstats (STATMODE);

  if (SHOW_PARAMS) {
    fprintf (stderr, "current parameter settings:\n");
    fprintf (stderr, "VERBOSE: %d, PLOTSTUFF: %d\n", VERBOSE, PLOTSTUFF);

    fprintf (stderr, "IMAGE_CATALOG          %s\n",  ImageCat);
    fprintf (stderr, "GSCFILE                %s\n",  GSCFILE);
    fprintf (stderr, "CATDIR                 %s\n",  CATDIR);
    exit (0);
  }
}

