IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15646


Ignore:
Timestamp:
Nov 18, 2007, 6:25:57 PM (18 years ago)
Author:
eugene
Message:

allow CCDKeyword

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/tools/src/fields.c

    r15487 r15646  
    2222  FILE *f;
    2323  Header header;
    24   char filename[1000], *Extname, extname[80];
     24  char filename[1000], *CCDKeyword, *Extname, extname[80];
    2525  int N, Nbytes, Extnum, Nextend, status, GotFile, GotField, GotExtension;
    2626
     
    2929  if (get_argument (argc, argv, "-h")) usage();
    3030  if (get_argument (argc, argv, "--help")) usage();
     31
     32  CCDKeyword = NULL;
     33  if ((N = get_argument (argc, argv, "-keyword"))) {
     34    remove_argument (N, &argc, argv);
     35    CCDKeyword = strcreate (argv[N]);
     36    remove_argument (N, &argc, argv);
     37  }
     38  if (CCDKeyword == NULL) {
     39    CCDKeyword = strcreate ("EXTNAME");
     40  }
    3141
    3242  Extnum = FALSE;
     
    7181      }
    7282      while (gfits_fread_header (f, &header)) {
    73         /* extract the EXTNAME for this component (set to PHU for 0th component) */
    74         status = gfits_scan (&header, "EXTNAME", "%s", 1, extname);
     83        /* extract the EXTNAME (or other CCDKeyword) for this component (set to PHU for 0th component) */
     84        status = gfits_scan (&header, CCDKeyword, "%s", 1, extname);
    7585        if (!status) {
    7686          if (Nextend == 0) {
Note: See TracChangeset for help on using the changeset viewer.