Changeset 36990
- Timestamp:
- Jul 10, 2014, 12:05:21 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140610/Ohana/src/relphot
- Files:
-
- 1 added
- 10 edited
-
Makefile (modified) (2 diffs)
-
doc/mosaic.txt (modified) (1 diff)
-
include/relphot.h (modified) (3 diffs)
-
src/ImageOps.c (modified) (9 diffs)
-
src/MosaicOps.c (modified) (31 diffs)
-
src/Shutdown.c (modified) (1 diff)
-
src/assign_images.c (modified) (1 diff)
-
src/extra.c (added)
-
src/launch_region_hosts.c (modified) (1 diff)
-
src/relphot_parallel_images.c (modified) (1 diff)
-
src/setMrelCatalog.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140610/Ohana/src/relphot/Makefile
r36630 r36990 34 34 $(SRC)/args.$(ARCH).o \ 35 35 $(SRC)/help.$(ARCH).o \ 36 $(SRC)/extra.$(ARCH).o \ 36 37 $(SRC)/bcatalog.$(ARCH).o \ 37 38 $(SRC)/global_stats.$(ARCH).o \ … … 82 83 $(SRC)/args.$(ARCH).o \ 83 84 $(SRC)/help.$(ARCH).o \ 85 $(SRC)/extra.$(ARCH).o \ 84 86 $(SRC)/synthetic_mags.$(ARCH).o \ 85 87 $(SRC)/plotstuff.$(ARCH).o \ -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/doc/mosaic.txt
r33963 r36990 1 2 3 2014.07.09 4 5 * trying to make sense of mosaic.Mcal vs image.Mcal in the context of UBERCAL: 6 7 * relphot_images: 8 * load_images (convert raw FITS table to Image structure, select subset matching selection) 9 * initMosaics (associate mosaics to images (gpc1 photcodes only)) 10 * initMosaicGrid (define spatial range of mosaics [only used by grid analysis]; set Mcal to <image.Mcal> and image.Mcal to 0.0) 11 --- calculate image or mosaic Mcal values 12 * setMcalFinal (set image.Mcal = mosaicMcal) 13 14 * relphot_parallel_regions: 15 * assign_images 16 * makeMosaics (equivalent to initMosaics, but works on full image table, not subset) 17 * setMosaicCenters (set Mcal to <image.Mcal> and image.Mcal to 0.0) <--- this is wrong! 18 (sends images ONLY, not mosaics, to remote machines) 19 (slurps back new image values, applies to db) 20 21 * relphot_parallel_images: 22 * makeMosaics (associate mosaics to images, gpc1 photcodes only) 23 * initMosaicGrid (needed in this one) 24 --- 1 25 2 26 For 'mosaic' zero points, I define the mosaics by grouping the images -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/include/relphot.h
r36984 r36990 48 48 float dMsys; 49 49 unsigned short nFitPhotom; 50 float Xm;50 short Xm; 51 51 float secz; 52 52 float ubercalDist; … … 317 317 int findMosaics PROTO((Catalog *catalog, int Ncatalog, int doMosaicList)); 318 318 319 void makeMosaics (Image *image, off_t Nimage );319 void makeMosaics (Image *image, off_t Nimage, int mergeMcal); 320 320 Mosaic *getMosaicForImage (off_t im); 321 321 void setMosaicCenters (Image *image, off_t Nimage); … … 509 509 int relphot_parallel_images (); 510 510 int relphot_parallel_regions (); 511 512 // in extra.c 513 int isGPC1chip (int photcode); 514 int isGPC1stack (int photcode); 515 int isGPC1warp (int photcode); 516 517 -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/ImageOps.c
r36976 r36990 532 532 533 533 // FREEZE_IMAGES only applies to mosaic data (eg, gpc1) 534 // skip this function if photcode is gpc1 and FREEZE_IMAGES535 // otherwise, allow image to be calibrated536 // if (FREEZE_IMAGES) return;537 534 538 535 fprintf (stderr, "limiting negative clouds to %f\n", CLOUD_TOLERANCE); … … 565 562 } 566 563 567 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 568 if (FREEZE_IMAGES && isGPC1cam) continue; 564 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 569 565 570 566 // UBERCAL image: if this is an ubercal image, set minUbercalDist to 0: … … 713 709 if (image[i].flags & IMAGE_BAD) continue; 714 710 715 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 716 if (FREEZE_IMAGES && isGPC1cam) continue; 711 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 717 712 718 713 mlist[N] = image[i].Mcal; … … 825 820 for (i = 0; i < Nimage; i++) { 826 821 827 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 828 if (FREEZE_IMAGES && isGPC1cam) continue; 822 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 829 823 830 824 Mlist[Nplot] = image[i].Mcal; … … 873 867 874 868 for (i = 0; i < Nimage; i++) { 875 i nt isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500));876 if (FREEZE_IMAGES && isGPC1cam) continue; 869 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 870 877 871 bin = image[i].dMcal / 0.00025; 878 872 bin = MAX (0, MIN (NBIN - 1, bin)); … … 910 904 if (image[i].flags & IMAGE_BAD) continue; 911 905 912 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 913 if (FREEZE_IMAGES && isGPC1cam) continue; 906 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 914 907 915 908 N = 0; … … 957 950 if (image[i].flags & IMAGE_BAD) continue; 958 951 959 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 960 if (FREEZE_IMAGES && isGPC1cam) continue; 952 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 961 953 962 954 list[n] = pow (10.0, 0.01*image[i].Xm); … … 990 982 if (image[i].flags & IMAGE_BAD) continue; 991 983 992 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 993 if (FREEZE_IMAGES && isGPC1cam) continue; 984 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 994 985 995 986 list[n] = image[i].Mcal; … … 1023 1014 if (image[i].flags & IMAGE_BAD) continue; 1024 1015 1025 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 1026 if (FREEZE_IMAGES && isGPC1cam) continue; 1016 if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue; 1027 1017 1028 1018 list[n] = image[i].dMcal; -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/MosaicOps.c
r36984 r36990 1 1 # include "relphot.h" 2 2 void plot_setMcal (double *list, int Npts, StatType *stats, float clouds); 3 off_t findMosaic (unsigned int *startTimes, off_t Nmosaic, unsigned int start); 3 4 4 5 // see discussion in ImagesOps.c re: IDX_T … … 36 37 // MosaicN_image was 'Nimlist' 37 38 // MosaicToImage was 'imlist' 39 40 void sort_times (unsigned int *T, int N) { 41 42 # define SWAPFUNC(A,B){ unsigned int tmp; \ 43 tmp = T[A]; T[A] = T[B]; T[B] = tmp; \ 44 } 45 # define COMPARE(A,B)(T[A] < T[B]) 46 47 OHANA_SORT (N, COMPARE, SWAPFUNC); 48 49 # undef SWAPFUNC 50 # undef COMPARE 51 52 } 38 53 39 54 /* find mosaic frames (unique time periods & photcode name matches mosaic) */ … … 136 151 } 137 152 138 off_t findMosaic (unsigned int *startTimes, off_t Nmosaic, unsigned int start);139 140 void sort_times (unsigned int *T, int N) {141 142 # define SWAPFUNC(A,B){ unsigned int tmp; \143 tmp = T[A]; T[A] = T[B]; T[B] = tmp; \144 }145 # define COMPARE(A,B)(T[A] < T[B])146 147 OHANA_SORT (N, COMPARE, SWAPFUNC);148 149 # undef SWAPFUNC150 # undef COMPARE151 152 }153 154 153 /* find mosaic frames (unique time periods) (NOTE : we do NOT require matching photcodes...) 155 154 this function will also identify the images NOT in the subset which belong to a selected mosaic … … 157 156 void initMosaics (Image *subset, off_t Nsubset, Image *image, char *inSubset, off_t Nimage) { 158 157 159 off_t i, j, status,found, NMOSAIC, *MosaicN_IMAGE;158 off_t i, j, found, NMOSAIC, *MosaicN_IMAGE; 160 159 unsigned int start, stop, *startTimes, *startTimesMosaic; 161 char *pname;162 160 163 161 if (!MOSAIC_ZEROPT) return; … … 174 172 int Nmoschip = 0; 175 173 for (i = 0; i < Nsubset; i++) { 176 int isGPC1cam = ((subset[i].photcode >= 10000) && (subset[i].photcode <= 10500)); 177 if (!isGPC1cam) { 178 continue; 179 } 174 if (!isGPC1chip(subset[i].photcode)) continue; 180 175 startTimes[Nmoschip] = subset[i].tzero; 181 176 Nmoschip ++; … … 191 186 // generate a list of the unique start times (these define the mosaics) 192 187 for (i = 0; i < Nmoschip; i++) { 193 if (startTimes[i] < startTimesMosaic[Nmosaic]) { 194 fprintf (stderr, "error?\n"); 195 abort(); 196 } 188 myAssert (startTimes[i] >= startTimesMosaic[Nmosaic], "times out of order?"); 197 189 if (startTimes[i] == startTimesMosaic[Nmosaic]) continue; 198 190 Nmosaic ++; … … 221 213 mosaic[i].dMcal = 0.0; 222 214 mosaic[i].dMsys = 0.0; 223 mosaic[i].Xm = 0.0;215 mosaic[i].Xm = 0.0; 224 216 mosaic[i].flags = 0; 225 217 mosaic[i].secz = NAN; … … 244 236 } 245 237 246 // this is gpc1-specific. needs a more general solution 247 int isGPC1cam = ((image[i].photcode >= 10000) && (image[i].photcode <= 10500)); 248 if (!isGPC1cam) { 249 continue; 250 } 251 252 if (0) { 253 // XXX this version fails if we have stack and fforce data: GPC1.g.SkyChip 254 /* select valid mosaic images by photcode */ 255 pname = GetPhotcodeNamebyCode (image[i].photcode); 256 if (!pname) continue; 257 status = strncmp (pname, MOSAICNAME, strlen (MOSAICNAME)); 258 if (status) continue; 259 } 238 if (!isGPC1chip(image[i].photcode)) continue; 260 239 261 240 /* set image time range */ … … 281 260 ImageToMosaic[i] = -1; 282 261 283 // this is gpc1-specific. needs a more general solution 284 int isGPC1cam = ((subset[i].photcode >= 10000) && (subset[i].photcode <= 10500)); 285 if (!isGPC1cam) { 262 if (!isGPC1chip(subset[i].photcode)) { 286 263 Nsimple ++; 287 264 continue; 288 }289 290 if (0) {291 // XXX this version fails if we have stack and fforce data: GPC1.g.SkyChip292 /* select valid mosaic images by photcode */293 pname = GetPhotcodeNamebyCode (subset[i].photcode);294 status = strncmp (pname, MOSAICNAME, strlen (MOSAICNAME));295 if (status) continue;296 265 } 297 266 … … 325 294 abort(); 326 295 } 327 mosaic[j].stop = stop;328 mosaic[j].Mcal = 0.0;329 mosaic[j].dMcal = 0.0;330 mosaic[j].Xm = 0.0;331 mosaic[j].dMsys = subset[i].flags;332 mosaic[j].flags = subset[i].flags;333 mosaic[j].secz = subset[i].secz;296 mosaic[j].stop = stop; 297 mosaic[j].Mcal = 0.0; 298 mosaic[j].dMcal = 0.0; 299 mosaic[j].Xm = 0.0; 300 mosaic[j].dMsys = subset[i].flags; 301 mosaic[j].flags = subset[i].flags; 302 mosaic[j].secz = subset[i].secz; 334 303 mosaic[j].photcode = GetPhotcodeEquivCodebyCode (subset[i].photcode); 335 304 } … … 346 315 } 347 316 348 /* find mosaic frames (unique time periods) (NOTE : we do NOT require matching photcodes but we 349 match images by MOSAICNAME. this last point is weak: it forces a single camera at a time. 350 we can extend the logic to multiple cameras if we make list of MOSAICNAMES (better to assign a camera ID) 317 /* find mosaic frames (unique time periods) (NOTE : require gpc1 chips, which is pretty limiting) 318 if mergeMcal is TRUE, <image.Mcal> values will be saved on Mosaic.Mcal 351 319 */ 352 void makeMosaics (Image *image, off_t Nimage ) {353 354 off_t i, j, status,found, NMOSAIC, *MosaicN_IMAGE;320 void makeMosaics (Image *image, off_t Nimage, int mergeMcal) { 321 322 off_t i, j, found, NMOSAIC, *MosaicN_IMAGE; 355 323 unsigned int start, stop, *startTimes, *startTimesMosaic; 356 char *pname;357 324 358 325 if (!MOSAIC_ZEROPT) return; … … 367 334 // generate a list of all image start times 368 335 ALLOCATE (startTimes, unsigned int, Nimage); 336 int Nmoschip = 0; 369 337 for (i = 0; i < Nimage; i++) { 370 startTimes[i] = image[i].tzero; 371 } 372 sort_times (startTimes, Nimage); 338 if (!isGPC1chip(image[i].photcode)) continue; 339 startTimes[Nmoschip] = image[i].tzero; 340 Nmoschip ++; 341 } 342 sort_times (startTimes, Nmoschip); 373 343 MARKTIME("create array of all image obstimes: %f sec\n", dtime); 374 344 … … 379 349 380 350 // generate a list of the unique start times (these define the mosaics) 381 for (i = 0; i < Nimage; i++) { 382 if (startTimes[i] < startTimesMosaic[Nmosaic]) { 383 fprintf (stderr, "error?\n"); 384 abort(); 385 } 351 for (i = 0; i < Nmoschip; i++) { 352 myAssert (startTimes[i] >= startTimesMosaic[Nmosaic], "times out of order?"); 386 353 if (startTimes[i] == startTimesMosaic[Nmosaic]) continue; 387 354 Nmosaic ++; … … 405 372 // init the mosaic array values 406 373 for (i = 0; i < Nmosaic; i++) { 407 mosaic[i].start = startTimesMosaic[i];408 mosaic[i].stop = 0;409 mosaic[i].Mcal = 0.0;410 mosaic[i].dMcal = 0.0;411 mosaic[i].dMsys = 0.0;412 mosaic[i].Xm = 0.0;413 mosaic[i].flags = 0;414 mosaic[i].secz = NAN;374 mosaic[i].start = startTimesMosaic[i]; 375 mosaic[i].stop = 0; 376 mosaic[i].Mcal = 0.0; 377 mosaic[i].dMcal = 0.0; 378 mosaic[i].dMsys = 0.0; 379 mosaic[i].Xm = 0.0; 380 mosaic[i].flags = 0; 381 mosaic[i].secz = NAN; 415 382 mosaic[i].photcode = 0; 416 mosaic[i].skipCal = FALSE;383 mosaic[i].skipCal = FALSE; 417 384 418 385 memset (&mosaic[i].coords, 0, sizeof(Coords)); … … 427 394 428 395 // assign each image to a mosaic 396 int Nsimple = 0; 429 397 for (i = 0; i < Nimage; i++) { 430 398 ImageToMosaic[i] = -1; 431 399 432 /* select valid mosaic images by photcode */ 433 pname = GetPhotcodeNamebyCode (image[i].photcode); 434 if (!pname) continue; 435 436 status = strncmp (pname, MOSAICNAME, strlen (MOSAICNAME)); 437 if (status) continue; 400 if (!isGPC1chip(image[i].photcode)) { 401 Nsimple ++; 402 continue; 403 } 438 404 439 405 start = image[i].tzero; … … 466 432 abort(); 467 433 } 468 mosaic[j].stop = stop;469 mosaic[j].Mcal = 0.0;470 mosaic[j].dMcal = 0.0;471 mosaic[j].Xm = 0.0;472 mosaic[j].dMsys = image[i].flags;473 mosaic[j].flags = image[i].flags;474 mosaic[j].secz = image[i].secz;434 mosaic[j].stop = stop; 435 mosaic[j].Mcal = 0.0; 436 mosaic[j].dMcal = 0.0; 437 mosaic[j].Xm = 0.0; 438 mosaic[j].dMsys = image[i].flags; 439 mosaic[j].flags = image[i].flags; 440 mosaic[j].secz = image[i].secz; 475 441 mosaic[j].photcode = GetPhotcodeEquivCodebyCode (image[i].photcode); 476 442 } … … 482 448 free (startTimesMosaic); 483 449 450 if (mergeMcal) { 451 initMosaicGrid (image, Nimage); 452 } 453 484 454 fprintf (stderr, "matched %d images to %d mosaics\n", (int) Nimage, (int) Nmosaic); 485 486 455 return; 487 456 } … … 539 508 off_t i, j, m, NX, NY, NC, Nc; 540 509 double R, D, Rmid, Dmid; 541 double Mcal, dMcal, Xm;542 510 double *Rc, *Dc; 543 511 … … 549 517 Nc = 0; 550 518 Rmid = Dmid = NAN; 551 Mcal = dMcal = Xm = 0;552 519 for (j = 0; j < MosaicN_Image[i]; j++) { 553 520 m = MosaicToImage[i][j]; … … 589 556 REALLOCATE (Dc, double, NC); 590 557 } 591 592 Mcal += image[m].Mcal;593 dMcal += image[m].dMcal;594 Xm += image[m].Xm;595 596 // for ubercal images, we (elsewhere) keep Mcal frozen597 598 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */599 image[m].Mcal = 0.0;600 image[m].dMcal = NAN;601 image[m].Xm = NAN_S_SHORT;602 558 } 603 559 … … 643 599 mosaic[i].coords.pc2_1 = 0.0; 644 600 645 mosaic[i].Mcal = Mcal / MosaicN_Image[i];646 mosaic[i].dMcal = dMcal / MosaicN_Image[i];647 mosaic[i].Xm = Xm / MosaicN_Image[i];601 mosaic[i].Mcal = 0.0; 602 mosaic[i].dMcal = 0.0; 603 mosaic[i].Xm = 0.0; 648 604 } 649 605 return; … … 661 617 double R, D, Rmin, Rmax, Dmin, Dmax; 662 618 double Mcal, dMcal, Xm; 619 620 fprintf (stderr, "*** moving Mcal from image.Mcal to mosaic.Mcal ***\n"); 663 621 664 622 dXmax = dYmax = 0.0; … … 693 651 Dmin = MIN (Dmin, D); 694 652 Dmax = MAX (Dmax, D); 653 654 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */ 655 656 // XXX: how does this work with UBERCAL? We want to keep the Mcal values supplied by ubercal, but 657 // solve for a single offset for each exposure (Mosaic.Mcal). 658 // we also want to keep the flat-field terms for each exposure (regardless of ubercal or not) 659 // if it helps, note that ubercal uses a single zp per exposure, so the mean of those values is the same as the value 660 695 661 Mcal += image[m].Mcal; 696 662 dMcal += image[m].dMcal; 697 663 Xm += image[m].Xm; 698 664 699 // XXX: how does this work with UBERCAL? We want to keep the Mcal values supplied by ubercal, but700 // solve for a single offset for each exposure (Mosaic.Mcal).701 702 // we also want to keep the flat-field terms for each exposure (regardless of ubercal or not)703 704 // if it helps, note that ubercal uses a single zp per exposure, so the mean of those values is the same as the value705 706 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */707 665 image[m].Mcal = 0.0; 708 666 image[m].dMcal = NAN; 709 image[m].Xm = NAN_S_SHORT;667 image[m].Xm = NAN_S_SHORT; 710 668 } 711 669 dS /= MosaicN_Image[i]; … … 725 683 mosaic[i].Mcal = Mcal / MosaicN_Image[i]; 726 684 mosaic[i].dMcal = dMcal / MosaicN_Image[i]; 727 mosaic[i].Xm = Xm / MosaicN_Image[i];685 mosaic[i].Xm = Xm / MosaicN_Image[i]; 728 686 } 729 687 if (!USE_GRID) return; … … 735 693 } 736 694 737 // XXX : what about mosaics with skipCal == TRUE?738 695 void setMcalFinal () { 739 696 … … 745 702 image = getimages (&Nimage, NULL); 746 703 747 // XXX I think this is OK in the ubercal context, but probably need to skip UBERCAL 748 // images? (no need to update them) 704 fprintf (stderr, "*** return Mcal from mosaic.Mcal to image.Mcal ***\n"); 749 705 750 706 // copy the mosaic results to the images. set the mosaic Mcal to 0.0 since we have moved its … … 1267 1223 1268 1224 if (testImage) { 1269 fprintf (stderr, "%f %f : %f\n", myMosaic[0].Mcal, myMosaic[0].dMsys, myMosaic[0].Xm);1225 fprintf (stderr, "%f %f : %f\n", myMosaic[0].Mcal, myMosaic[0].dMsys, pow (10.0, 0.01*myMosaic[0].Xm)); 1270 1226 } 1271 1227 … … 1620 1576 if (mosaic[i].flags & IMAGE_BAD) continue; 1621 1577 if (mosaic[i].skipCal) continue; 1578 if (KEEP_UBERCAL && (mosaic[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) continue; 1579 1622 1580 list[n] = mosaic[i].Mcal; 1623 1581 dlist[n] = 1; … … 1650 1608 if (mosaic[i].flags & IMAGE_BAD) continue; 1651 1609 if (mosaic[i].skipCal) continue; 1610 if (KEEP_UBERCAL && (mosaic[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) continue; 1611 1652 1612 list[n] = mosaic[i].dMcal; 1653 1613 dlist[n] = 1; … … 1681 1641 if (mosaic[i].flags & IMAGE_BAD) continue; 1682 1642 if (mosaic[i].skipCal) continue; 1643 if (KEEP_UBERCAL && (mosaic[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) continue; 1683 1644 1684 1645 N = 0; … … 1727 1688 if (mosaic[i].flags & IMAGE_BAD) continue; 1728 1689 if (mosaic[i].skipCal) continue; 1690 if (KEEP_UBERCAL && (mosaic[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) continue; 1691 1729 1692 list[n] = pow (10.0, 0.01*mosaic[i].Xm); 1730 1693 dlist[n] = 1; -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/Shutdown.c
r33651 r36990 23 23 SetProtect (TRUE); 24 24 if (db) gfits_db_close (db); 25 fprintf (stderr, "ERROR: addstarhalted\n");25 fprintf (stderr, "ERROR: relphot halted\n"); 26 26 exit (1); 27 27 } -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/assign_images.c
r36976 r36990 25 25 26 26 if (MOSAIC_ZEROPT) { 27 makeMosaics (image, Nimage );27 makeMosaics (image, Nimage, FALSE); 28 28 29 29 // center coords and Mcal, dMcal, Mchisq for the mosaics -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/launch_region_hosts.c
r36884 r36990 55 55 56 56 char command[1024]; 57 snprintf (command, 1024, "relphot %s -parallel-images %s -region-hosts %s -region-hostID %d -D CATDIR %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f", 58 PhotcodeList, filename, REGION_FILE, host->hostID, CATDIR, host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat, STATMODE, CAMERA, STAR_TOOFEW, MIN_ERROR); 57 snprintf (command, 1024, "relphot %s", PhotcodeList); 58 strextend (command, "-parallel-images %s", filename); 59 strextend (command, "-region-hosts %s", REGION_FILE); 60 strextend (command, "-region-hostID %d", host->hostID); 61 strextend (command, "-D CATDIR %s", CATDIR); 62 strextend (command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat); 63 strextend (command, "-statmode %s", STATMODE); 64 strextend (command, "-D CAMERA %s", CAMERA); 65 strextend (command, "-D STAR_TOOFEW %d", STAR_TOOFEW); 66 strextend (command, "-minerror %f", MIN_ERROR); 67 strextend (command, "-cloud-limit %f", CLOUD_TOLERANCE); 59 68 60 69 if (VERBOSE) strextend (command, "-v"); -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/relphot_parallel_images.c
r36630 r36990 38 38 // unlink (IMAGE_TABLE); // XXX a bit risky, add some protection? 39 39 40 // XXX need to deal with mosaic vs image... 41 makeMosaics (image, Nimage); 40 makeMosaics (image, Nimage, TRUE); 42 41 43 42 initImages (image, NULL, Nimage); -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/setMrelCatalog.c
r36976 r36990 159 159 160 160 // are we a PS1 exposure photcode? 161 if ((measureT[k].photcode >= 10000) && (measureT[k].photcode <= 10500)) { 162 NexpPS1 ++; 163 } 161 if (isGPC1chip(measureT[k].photcode)) NexpPS1 ++; 164 162 165 163 // SKIP gpc1 stack data 166 if ((measureT[k].photcode >= 11000) && (measureT[k].photcode <= 11500)) { 167 continue; 168 } 164 if (isGPC1stack(measureT[k].photcode)) continue; 169 165 170 166 // SKIP gpc1 forced-warp data 171 if ((measureT[k].photcode >= 12000) && (measureT[k].photcode <= 12500)) { 172 continue; 173 } 167 if (isGPC1warp(measureT[k].photcode)) continue; 174 168 175 169 if (measureT[k].dbFlags & MEAS_BAD) SKIP_THIS_MEAS(Nbad); … … 497 491 498 492 // only examine gpc1 stack data 499 // XXX this is absurdly hardwired (along with several photcode tests) 500 if (measure[k].photcode < 11000) continue; 501 if (measure[k].photcode > 11400) continue; 493 if (!isGPC1stack(measure[k].photcode)) continue; 502 494 503 495 haveStack = TRUE; … … 695 687 for (k = 0; k < average[0].Nmeasure; k++, meas++) { 696 688 697 // skip measurements which are not ForcedWarp values698 if ( (measure[k].photcode < 12000) || (measure[k].photcode > 12500)) continue;689 // only examine gpc1 forced-warp data 690 if (!isGPC1warp(measure[k].photcode)) continue; 699 691 700 692 // skip measurements that do not match the current photcode
Note:
See TracChangeset
for help on using the changeset viewer.
