Changeset 34424 for branches/eam_branches/ipp-20120905
- Timestamp:
- Sep 10, 2012, 8:44:35 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905/Ohana/src/relphot/src
- Files:
-
- 2 edited
-
StarOps.c (modified) (5 diffs)
-
initialize.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/Ohana/src/relphot/src/StarOps.c
r34423 r34424 327 327 328 328 char *primaryCell = NULL; 329 ALLOCATE (primaryCell, char, DVO_MAX_PATH); 329 if (isSetMrelFinal) { 330 ALLOCATE (primaryCell, char, DVO_MAX_PATH); 331 } 330 332 331 333 for (j = 0; j < catalog[Nc].Naverage; j++) { … … 338 340 } 339 341 340 BoundaryTreePrimaryCell(primaryCell, catalog[Nc].average[j].R, catalog[Nc].average[j].D); 342 if (isSetMrelFinal) { 343 BoundaryTreePrimaryCell(primaryCell, catalog[Nc].average[j].R, catalog[Nc].average[j].D); 344 } 341 345 342 346 int GoodPS1 = FALSE; … … 432 436 // count the extended detections 433 437 if (!isnan(catalog[Nc].measure[m].Map)) { 434 if (catalog[Nc].measure[m].M - catalog[Nc].measure[m].Map > 0.5) { 438 float dMagAp = catalog[Nc].measure[m].M - catalog[Nc].measure[m].Map; 439 float SigmaAp = hypot(0.1, 2.5*catalog[Nc].measure[m].dM); 440 // XXX this is still quite ad hoc, but at least it: 441 // (a) converges to 0.1 mag offset at the bright end 442 // (b) converges to 0.5 mag offset at the faint end (dM = 0.2) 443 if (dMagAp > SigmaAp) { 435 444 Next ++; 436 445 NextPS1 ++; … … 660 669 case 0: 661 670 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_0; 662 GoodPS1 = TRUE;671 if (havePS1) GoodPS1 = TRUE; 663 672 break; 664 673 case 1: 665 674 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_1; 666 GoodPS1 = TRUE;675 if (havePS1) GoodPS1 = TRUE; 667 676 break; 668 677 case 2: 669 678 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_2; 670 GoodPS1 = TRUE;679 if (havePS1) GoodPS1 = TRUE; 671 680 break; 672 681 case 3: … … 693 702 694 703 if (isSetMrelFinal) { 695 DVOAverageFlags flagBits = ID_OBJ_EXT | ID_OBJ_EXT_ALT | ID_OBJ_GOOD | ID_OBJ_GOOD_ALT; 696 697 // we attempt to set a few flags here; reset those bits before trying: 698 catalog[Nc].average[j].flags &= ~flagBits; 704 if (pass == 0) { 705 DVOAverageFlags flagBits = ID_OBJ_EXT | ID_OBJ_EXT_ALT | ID_OBJ_GOOD | ID_OBJ_GOOD_ALT; 706 // we attempt to set a few flags here; reset those bits before trying: 707 catalog[Nc].average[j].flags &= ~flagBits; 708 } 699 709 700 710 if (NextPS1 && (NextPS1 > NpsfPS1)) { -
branches/eam_branches/ipp-20120905/Ohana/src/relphot/src/initialize.c
r33963 r34424 77 77 args_client (argc, argv); 78 78 79 if (MODE == MODE_UPDATE_OBJECTS) return; 79 if (MODE == MODE_UPDATE_OBJECTS) { 80 char tmpline1[256]; 81 int Ns; 82 Nphotcodes = GetPhotcodeNsecfilt (); 83 ALLOCATE (photcodes, PhotCode *, Nphotcodes); 84 ALLOCATE (PhotcodeList, char, 256); 85 for (Ns = 0; Ns < Nphotcodes; Ns++) { 86 photcodes[Ns] = GetPhotcodebyNsec (Ns); 87 if (Ns > 0) { 88 snprintf (tmpline1, 256, "%s,%s", PhotcodeList, photcodes[Ns][0].name); 89 } else { 90 snprintf (tmpline1, 256, "%s", photcodes[Ns][0].name); 91 } 92 strcpy (PhotcodeList, tmpline1); 93 } 94 return; 95 } 80 96 81 97 // load the list of photcodes into the globals (photcodes, Nphotcodes)
Note:
See TracChangeset
for help on using the changeset viewer.
