Changeset 14401 for trunk/Ohana/src/opihi/dvo/calmextract.c
- Timestamp:
- Aug 4, 2007, 10:15:51 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/calmextract.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/calmextract.c
r14286 r14401 8 8 int i, j, k, m, N, N1, Nr, mode[2]; 9 9 int NSTAR, Nstar, Nsecfilt; 10 char *RegionName, *RegionList;11 10 double *M1, M2, dM2, color; 12 11 … … 14 13 PhotCode *code[2]; 15 14 SkyList *skylist; 15 SkyRegionSelection *selection; 16 16 Vector **vec; 17 17 … … 20 20 catalog.secfilt = NULL; 21 21 catalog.measure = NULL; 22 RegionName = NULL;23 RegionList = NULL;24 22 skylist = NULL; 23 selection = NULL; 25 24 vec = NULL; 26 25 … … 30 29 31 30 /* command line arguments */ 32 if ( !SetRegionSelection (&argc, argv, &RegionName, &RegionList)) goto escape;31 if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape; 33 32 if (!SetPhotSelections (&argc, argv, 2)) goto usage; 34 33 … … 68 67 69 68 /* load region corresponding to selection above */ 70 if ((skylist = SelectRegions ( RegionName, RegionList)) == NULL) goto escape;71 if (!SetImageSelection (TRUE, ((RegionName == NULL) && (RegionList == NULL)))) goto escape;69 if ((skylist = SelectRegions (selection)) == NULL) goto escape; 70 if (!SetImageSelection (TRUE, selection)) goto escape; 72 71 73 72 for (Nr = 0; Nr < skylist[0].Nregions; Nr++) { … … 86 85 dvo_catalog_unlock (&catalog); 87 86 87 # if (0) 88 88 /* extract values, assign to vectors */ 89 89 for (i = 0; i < catalog.Naverage; i++) { … … 119 119 ConcatMeasures (vec[NT ], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_EXPTIME); 120 120 ConcatMeasures (vec[NP ], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_PHOTCODE); 121 ConcatMeasures (vec[Nd1], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_dMAG);121 // ConcatMeasures (vec[Nd1], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_dMAG); 122 122 ConcatMeasures (vec[Nxc], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_XCCD); 123 123 ConcatMeasures (vec[Nyc], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_YCCD); … … 139 139 if (M1 != NULL) free (M1); 140 140 } 141 # endif 141 142 dvo_catalog_free (&catalog); 142 143 } 143 144 144 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));145 145 for (i = 0; i < NVEC; i++) { 146 146 vec[i][0].Nelements = N; 147 147 } 148 SkyListFree (skylist); 149 FreeSkyRegionSelection (selection); 148 150 FreeImageSelection (); 149 151 return (TRUE); … … 154 156 155 157 escape: 158 SkyListFree (skylist); 159 FreeSkyRegionSelection (selection); 156 160 FreeImageSelection (); 157 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));158 161 for (i = 0; i < NVEC; i++) { 159 162 DeleteVector (vec[i]);
Note:
See TracChangeset
for help on using the changeset viewer.
