public software.psfex

[/] [branches/] [rhl/] [src/] [field.c] - Diff between revs 189 and 191

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 189 Rev 191
Line 60... Line 60...
   fieldstruct  *field;
   fieldstruct  *field;
   catstruct    *cat;
   catstruct    *cat;
   tabstruct    *tab, *imatab;
   tabstruct    *tab, *imatab;
   keystruct    *key;
   keystruct    *key;
   char         *pstr;
   char         *pstr;
   int          e, next, next0, ntab, countsize;
   int          next, next0, ntab;
 
 
  QCALLOC(field, fieldstruct, 1);
  QCALLOC(field, fieldstruct, 1);
/* Compute the number of valid input extensions */
/* Compute the number of valid input extensions */
  if (!(cat = read_cat(catname)))
  if (!(cat = read_cat(catname)))
    error(EXIT_FAILURE, "*Error*: cannot open ", catname);
    error(EXIT_FAILURE, "*Error*: cannot open ", catname);
Line 128... Line 128...
        ||  !strcmp("OBJECTS", tab->extname)) && tab->naxis == 2)
        ||  !strcmp("OBJECTS", tab->extname)) && tab->naxis == 2)
      field->ndet += tab->naxisn[1];
      field->ndet += tab->naxisn[1];
 
 
  free_cat(&cat, 1);
  free_cat(&cat, 1);
 
 
  field_locate(field);
  field_init_finalize(field);
  QCALLOC(field->ccat, catstruct *, MAXCHECK);
 
  countsize = prefs.context_nsnap*prefs.context_nsnap;
 
  QMALLOC(field->lcount, int *, next0);
 
  QMALLOC(field->acount, int *, next0);
 
  QMALLOC(field->count, int *, next0);
 
  QMALLOC(field->modchi2, double *, next0);
 
  QMALLOC(field->modresi, double *, next0);
 
  for (e=0; e<next0; e++)
 
    {
 
    QCALLOC(field->lcount[e], int, countsize);
 
    QCALLOC(field->acount[e], int, countsize);
 
    QCALLOC(field->count[e], int, countsize);
 
    QCALLOC(field->modchi2[e], double, countsize);
 
    QCALLOC(field->modresi[e], double, countsize);
 
    }
 
 
 
  return field;
  return field;
  }
  }
 
 
 
 
/****** field_end *************************************************************
/****** field_end *************************************************************
PROTO   void field_end(fieldstruct *field)
PROTO   void field_end(fieldstruct *field)
PURPOSE Free a PSF MEF structure (groups of PSFs).
PURPOSE Free a PSF MEF structure (groups of PSFs).
INPUT   Pointer to the fieldstruct.
INPUT   Pointer to the fieldstruct.
OUTPUT  -.
OUTPUT  -.