Changeset 4679 for trunk/Ohana/src/opihi/dvo/dmags.c
- Timestamp:
- Jul 30, 2005, 9:13:10 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/dmags.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/dmags.c
r4585 r4679 7 7 int i, j, m, i1, i3, N1, N3, N; 8 8 int Npts, NPTS, mode[3]; 9 int Nsec, Nregions ;9 int Nsec, Nregions, KeepNulls; 10 10 11 11 PhotCode *code[3]; … … 33 33 if (!SetPhotSelections (&argc, argv, 3)) goto usage; 34 34 35 KeepNulls = FALSE; 36 if (N = get_argument (argc, argv, "-nulls")) { 37 KeepNulls = TRUE; 38 remove_argument (N, &argc, argv); 39 } 40 35 41 /* interpret required command-line arguments: dmags F1 - F2 : F3 */ 36 42 if (argc != 6) { goto usage; } … … 40 46 if (!GetPhotcodeInfo (argv[3], &code[1], &mode[1])) goto usage; 41 47 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; 43 49 44 50 /* load region corresponding to selection above */ … … 79 85 SetSelectionParam (2); 80 86 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 } 82 96 83 97 for (i1 = 0; i1 < N1; i1++) {
Note:
See TracChangeset
for help on using the changeset viewer.
