IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9


Ignore:
Timestamp:
Dec 10, 2002, 1:05:35 AM (23 years ago)
Author:
eugene
Message:

fixed filter error, added -name

Location:
trunk/Ohana/src/imregister
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/imregister/detrend/args.detsearch.c

    r3 r9  
    160160    remove_argument (N, &argc, argv);
    161161    base.LabelSelect = TRUE;
     162  }
     163  base.NameSelect = FALSE;
     164  if (N = get_argument (argc, argv, "-name")) {
     165    remove_argument (N, &argc, argv);
     166    base.Name = strcreate (argv[N]);
     167    remove_argument (N, &argc, argv);
     168    base.NameSelect = TRUE;
    162169  }
    163170
  • trunk/Ohana/src/imregister/detrend/criteria.c

    r3 r9  
    2121    if (criteria[i].EntrySelect  && (image[0].Nentry          != criteria[i].Entry))  continue;
    2222    if (criteria[i].LabelSelect  && (strcasecmp (image[0].label, criteria[i].Label))) continue;
     23    if (criteria[i].NameSelect   && (strstr (image[0].filename, criteria[i].Name) == (char *) NULL)) continue;
    2324
    2425    if (criteria[i].TimeSelect   && (image[0].tstart           > criteria[i].tstop))   continue;
  • trunk/Ohana/src/imregister/detrend/output.c

    r7 r9  
    4949
    5050int DumpFitsTable (char *filename, DetReg *detdata, Match *match, int Nmatch) {
    51 # define NL 453
    5251 
    5352  Header header, theader;
     
    5655  DetReg *newdata;
    5756  FILE *f;
    58   char *startstr, *stopstr, *regstr, line[NL], key[33];
     57  char *startstr, *stopstr, *regstr, *line, key[33];
    5958  char *filtstr, *typestr, *ccdstr, *datestr, *p;
    6059  int i;
     
    105104  fits_modify (&theader, "TNULL12", "%s", 1, "");
    106105
    107   fits_modify (&theader, "TBNA1",  "%s", 1, "NA");
    108   fits_modify (&theader, "TBNA2",  "%s", 1, "NA");
    109   fits_modify (&theader, "TBNA3",  "%s", 1, "NA");
    110   fits_modify (&theader, "TBNA4",  "%s", 1, "NA");
    111   fits_modify (&theader, "TBNA5",  "%lf", 1, (float) -2);
    112   fits_modify (&theader, "TBNA6",  "%s", 1, "NA");
    113   fits_modify (&theader, "TBNA7",  "%s", 1, "NA");
    114   fits_modify (&theader, "TBNA8",  "%s", 1, "NA");
    115   fits_modify (&theader, "TBNA9",  "%d", 1, -2);
    116   fits_modify (&theader, "TBNA10", "%d", 1, -2);
    117   fits_modify (&theader, "TBNA11", "%s", 1, "NA");
    118   fits_modify (&theader, "TBNA12", "%s", 1, "NA");
     106  fits_modify (&theader, "TBNAN1",  "%s", 1, "NA");
     107  fits_modify (&theader, "TBNAN2",  "%s", 1, "NA");
     108  fits_modify (&theader, "TBNAN3",  "%s", 1, "NA");
     109  fits_modify (&theader, "TBNAN4",  "%s", 1, "NA");
     110  fits_modify (&theader, "TBNAN5",  "%lf", 1, (float) -2);
     111  fits_modify (&theader, "TBNAN6",  "%s", 1, "NA");
     112  fits_modify (&theader, "TBNAN7",  "%s", 1, "NA");
     113  fits_modify (&theader, "TBNAN8",  "%s", 1, "NA");
     114  fits_modify (&theader, "TBNAN9",  "%d", 1, -2);
     115  fits_modify (&theader, "TBNAN10", "%d", 1, -2);
     116  fits_modify (&theader, "TBNAN11", "%s", 1, "NA");
     117  fits_modify (&theader, "TBNAN12", "%s", 1, "NA");
    119118
    120119  /* create table, add data values */
     
    142141    filtstr  = filterhash[newdata[0].filter];
    143142    ccdstr   = ccds[newdata[0].ccd];
    144     snprintf (line, NL, "%32s%20s%20s%20s%7.1f%10s%10s%7s%3d%3d%64s%256s",
    145               key, startstr, stopstr, regstr, newdata[0].exptime,
    146               typestr, filtstr, ccdstr,
    147               newdata[0].Nentry, newdata[0].Norder,
    148               newdata[0].label, newdata[0].filename);
     143
     144    line = fits_table_print (&table, key, startstr, stopstr, regstr,
     145                             newdata[0].exptime, typestr, filtstr, ccdstr,
     146                             newdata[0].Nentry, newdata[0].Norder,
     147                             newdata[0].label, newdata[0].filename);
     148
    149149    fits_add_rows (&table, line, 1, strlen(line));
     150    free (line);
    150151    free (startstr);
    151152    free (stopstr);
  • trunk/Ohana/src/imregister/include/detrend.h

    r3 r9  
    2424  int EntrySelect;   int Entry;
    2525  int LabelSelect;   char *Label;
     26  int NameSelect;    char *Name;
    2627  int ExptimeSelect; float Exptime;
    2728  int TimeSelect;    unsigned long tstart, tstop;
Note: See TracChangeset for help on using the changeset viewer.