Changeset 24750
- Timestamp:
- Jul 12, 2009, 10:28:47 AM (17 years ago)
- Location:
- trunk/Ohana/src/dvomerge/src
- Files:
-
- 3 edited
-
ConfigInit.c (modified) (1 diff)
-
dvomerge.c (modified) (2 diffs)
-
merge_catalogs_old.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvomerge/src/ConfigInit.c
r24745 r24750 36 36 SetZeroPoint (ZERO_POINT); 37 37 38 /* XXX this does not yet write out the master photcode table */ 39 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR); 40 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile)) { 41 fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile); 42 exit (1); 38 if (RADIUS < 1e-6) { 39 fprintf (stderr, "non-sensical correlation radius %f\n", RADIUS); 40 exit (1); 43 41 } 44 42 -
trunk/Ohana/src/dvomerge/src/dvomerge.c
r24745 r24750 21 21 input2 = argv[3]; 22 22 output = argv[5]; 23 24 // the first input define the photcode table & db layout 25 sprintf (filename, "%s/Photcodes.dat", input1); 26 if (!LoadPhotcodes (filename, NULL)) { 27 fprintf (stderr, "error loading photcode table %s\n", filename); 28 exit (1); 29 } 30 // save the photcodes in the output catdir 31 sprintf (filename, "%s/Photcodes.dat", output); 32 if (!check_file_access (filename, TRUE, TRUE)) { 33 fprintf (stderr, "error creating output catdir %s\n", output); 34 exit (1); 35 } 36 if (!SavePhotcodesFITS (filename)) { 37 fprintf (stderr, "error saving photcode table %s\n", filename); 38 exit (1); 39 } 23 40 24 41 // load the sky table for the existing database … … 86 103 continue; 87 104 } 88 merge_catalogs_old (&outsky[0].regions[i], &outcatalog, &incatalog, 1.0);105 merge_catalogs_old (&outsky[0].regions[i], &outcatalog, &incatalog, RADIUS); 89 106 dvo_catalog_unlock (&incatalog); 90 107 dvo_catalog_free (&incatalog); 91 108 } 109 SkyListFree (inlist); 110 92 111 outcatalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; 93 112 dvo_catalog_save (&outcatalog, VERBOSE); -
trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c
r24745 r24750 150 150 151 151 /*** a match is found, add to average, measure ***/ 152 Nmatch ++; 153 n = N2[Jmin]; 154 N = N1[i]; 152 155 153 156 /* make sure there is space for next Nmeasure entries */ … … 158 161 } 159 162 160 Nmatch ++;161 n = N2[Jmin];162 N = N1[i];163 164 163 /** add measurements for this input average object **/ 165 164 for (Nin = 0; Nin < input[0].average[N].Nmeasure; Nin ++) { … … 173 172 174 173 Rin = input[0].average[N].R - input[0].measure[offset].dR / 3600.0; 175 Din = input[0].average[N]. R - input[0].measure[offset].dR/ 3600.0;174 Din = input[0].average[N].D - input[0].measure[offset].dD / 3600.0; 176 175 177 176 /** dR,dD now represent arcsec **/ 178 177 output[0].measure[Nmeas].dR = 3600.0*(output[0].average[n].R - Rin); // XXX update these based on choice of astromety 179 output[0].measure[Nmeas].dD = 3600.0*(output[0].average[n].D - Rin); // XXX update these based on choice of astromety178 output[0].measure[Nmeas].dD = 3600.0*(output[0].average[n].D - Din); // XXX update these based on choice of astromety 180 179 output[0].measure[Nmeas].dbFlags = 0; 181 180 output[0].measure[Nmeas].averef = n; … … 319 318 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %d %d %d, (%d matches)\n", Nstars, Nave, Nmeas, Nmatch); 320 319 320 free (next_meas); 321 322 free (output[0].found); 323 free (X2); 324 free (Y2); 325 free (N2); 321 326 free (input[0].found); 322 free (output[0].found);323 327 free (X1); 324 328 free (Y1); 325 329 free (N1); 326 free (X2);327 free (Y2);328 free (N2);329 330 return (Nmatch); 330 331 }
Note:
See TracChangeset
for help on using the changeset viewer.
