Changeset 36813
- Timestamp:
- Jun 4, 2014, 12:16:40 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140423/Ohana/src
- Files:
-
- 7 edited
-
dvomerge/src/dvo_image_merge_dbs.c (modified) (1 diff)
-
dvomerge/src/dvomergeImageIDs.c (modified) (2 diffs)
-
relastro/include/relastro.h (modified) (1 diff)
-
relastro/src/GetAstromError.c (modified) (2 diffs)
-
relastro/src/ImageOps.c (modified) (4 diffs)
-
relastro/src/UpdateObjects.c (modified) (3 diffs)
-
relastro/src/relastro_objects.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c
r36528 r36813 168 168 169 169 if (!IDmap->old) { 170 fprintf (stderr, "input database has image IDs, but no Image table\n"); 171 return FALSE; 172 } 173 174 if (!IDmap->Nmap) { 170 175 fprintf (stderr, "input database has image IDs, but no Image table\n"); 171 176 return FALSE; -
branches/eam_branches/ipp-20140423/Ohana/src/dvomerge/src/dvomergeImageIDs.c
r35765 r36813 18 18 if (inDB.dbstate == LCK_EMPTY) { 19 19 dvo_image_unlock (&inDB); // unlock input 20 IDmap->old = NULL; 21 IDmap->new = NULL; 20 22 IDmap->Nmap = 0; 21 23 return TRUE; … … 99 101 if (inDB.dbstate == LCK_EMPTY) { 100 102 dvo_image_unlock (&inDB); // unlock input 103 IDmap->old = NULL; 104 IDmap->new = NULL; 101 105 IDmap->Nmap = 0; 102 106 return TRUE; -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h
r36809 r36813 535 535 536 536 int strextend (char *input, char *format,...); 537 538 int areImagesLoaded (); 539 int areImagesMatched (); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/GetAstromError.c
r33652 r36813 30 30 31 31 code = GetPhotcodebyCode (measure[0].photcode); 32 if (!code) return NAN; 32 33 33 34 // do not raise an exception, just send back the result … … 72 73 73 74 code = GetPhotcodebyCode (measure[0].photcode); 75 if (!code) return NAN; 74 76 75 77 // do not raise an exception, just send back the result -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c
r36809 r36813 39 39 // N_onImage was 'Nlist' 40 40 // N_ONIMAGE was 'NLIST' 41 42 int areImagesLoaded () { 43 44 if (image) return TRUE; 45 return FALSE; 46 } 47 48 int areImagesMatched () { 49 50 if (MeasureToImage) return TRUE; 51 return FALSE; 52 } 41 53 42 54 Image *getimages (off_t *N, off_t **line_number) { … … 574 586 575 587 int Noff = NoffRAave + NoffDECave + NoffRAori + NoffDECori; 576 if (VERBOSE && (Noff > 0)) fprintf (stderr, "Noff ave RA %d, Noff ave DEC %d, Noff ori RA %d, Noff ori DEC %d\n", NoffRAave, NoffDECave, NoffRAori, NoffDECori);588 if (VERBOSE2 && (Noff > 0)) fprintf (stderr, "Noff ave RA %d, Noff ave DEC %d, Noff ori RA %d, Noff ori DEC %d\n", NoffRAave, NoffDECave, NoffRAori, NoffDECori); 577 589 saveOffsets (dPos, nPos, im); 578 590 … … 1095 1107 } else { 1096 1108 code = GetPhotcodebyCode (measure[0].photcode); 1109 if (!code) return FALSE; 1097 1110 mask = code[0].astromBadMask; 1098 1111 } … … 1161 1174 } else { 1162 1175 code = GetPhotcodebyCode (measure[0].photcode); 1176 if (!code) return FALSE; 1163 1177 mask = code[0].astromBadMask; 1164 1178 } -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjects.c
r36808 r36813 80 80 memset (&fitPAR, 0, sizeof(fitPAR)); 81 81 initObjectData (catalog, Ncatalog); 82 83 int setRefColor = areImagesMatched(); 82 84 83 85 /* project coordinates to a plane centered on the object with units of arcsec */ … … 228 230 dD[N] = dY[N] / 3600.0; 229 231 230 float color = getColor (m+k, i); 231 if (!isnan(color)) { 232 C[Nc] = color; 233 Nc++; 232 if (setRefColor) { 233 float color = getColor (m+k, i); 234 if (!isnan(color)) { 235 C[Nc] = color; 236 Nc++; 237 } 234 238 } 235 239 … … 354 358 } 355 359 356 dsort (C, Nc); 357 float colorMedian = (Nc > 0) ? C[(int)(0.5*Nc)] : NAN; 358 catalog[i].average[j].refColor = colorMedian; 360 if (setRefColor) { 361 dsort (C, Nc); 362 float colorMedian = (Nc > 0) ? C[(int)(0.5*Nc)] : NAN; 363 catalog[i].average[j].refColor = colorMedian; 364 } 359 365 360 366 /* choose the result based on the chisq values */ -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_objects.c
r36630 r36813 40 40 snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name); 41 41 catalog.filename = hostID ? hostfile : skylist[0].filename[i]; 42 43 // set up the basic catalog info 42 44 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 43 45 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data
Note:
See TracChangeset
for help on using the changeset viewer.
