IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2005, 9:13:10 AM (21 years ago)
Author:
eugene
Message:

more photselection modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/dmags.c

    r4585 r4679  
    77  int i, j, m, i1, i3, N1, N3, N;
    88  int Npts, NPTS, mode[3];
    9   int Nsec, Nregions;
     9  int Nsec, Nregions, KeepNulls;
    1010
    1111  PhotCode *code[3];
     
    3333  if (!SetPhotSelections (&argc, argv, 3)) goto usage;
    3434
     35  KeepNulls = FALSE;
     36  if (N = get_argument (argc, argv, "-nulls")) {
     37    KeepNulls = TRUE;
     38    remove_argument (N, &argc, argv);
     39  }
     40
    3541  /* interpret required command-line arguments: dmags F1 - F2 : F3 */
    3642  if (argc != 6) { goto usage; }
     
    4046  if (!GetPhotcodeInfo (argv[3], &code[1], &mode[1])) goto usage;
    4147  if (!GetPhotcodeInfo (argv[5], &code[2], &mode[2])) goto usage;
    42   if (!TestPhotSelections (&code[0], MEAS_ZERO)) goto escape;
     48  if (!TestPhotSelections (&code[0], &mode[0], MEAS_ZERO)) goto escape;
    4349
    4450  /* load region corresponding to selection above */
     
    7985      SetSelectionParam (2);
    8086      M3 = ExtractMagnitudes (code[2], mode[2], &catalog.average[i], &catalog.secfilt[i*Nsec], &catalog.measure[m], &N3);
    81       if (N3 == 0) goto skip;
     87      if (N3 == 0) {
     88        if (KeepNulls) {
     89          ALLOCATE (M3, double, 1);
     90          N3 = 1;
     91          M3[0] = NO_MAG;
     92        } else {
     93          goto skip;
     94        }
     95      }
    8296
    8397      for (i1 = 0; i1 < N1; i1++) {
Note: See TracChangeset for help on using the changeset viewer.