Changeset 33736 for branches/eam_branches/ipp-20120405/Ohana
- Timestamp:
- Apr 9, 2012, 2:06:33 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120405/Ohana/src/relphot/src
- Files:
-
- 5 edited
-
MosaicOps.c (modified) (8 diffs)
-
StarOps.c (modified) (2 diffs)
-
bcatalog.c (modified) (1 diff)
-
relphot_objects.c (modified) (1 diff)
-
setMrelFinal.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/MosaicOps.c
r33651 r33736 569 569 } 570 570 571 static int npass_output = 0; 572 571 573 int setMmos (Catalog *catalog, int PoorImages, FlatCorrectionTable *flatcorr) { 572 574 … … 627 629 int minUbercalDist = 1000; 628 630 631 int testImage = FALSE; 632 testImage |= (abs(mosaic[i].start - 1323003245) < 10); 633 testImage |= (abs(mosaic[i].start - 1323003069) < 10); 634 testImage |= (abs(mosaic[i].start - 1323003125) < 10); 635 testImage |= (abs(mosaic[i].start - 1323003300) < 10); 636 testImage |= (abs(mosaic[i].start - 1323003365) < 10); 637 testImage |= (abs(mosaic[i].start - 1323003191) < 10); 638 testImage |= (abs(mosaic[i].start - 1323003014) < 10); 639 testImage |= (abs(mosaic[i].start - 1323003484) < 10); 640 testImage |= (abs(mosaic[i].start - 1323003419) < 10); 641 testImage |= (abs(mosaic[i].start - 1323002949) < 10); 642 643 FILE *fout = NULL; 644 if (testImage) { 645 char filename[64]; 646 snprintf (filename, 64, "test.%05d.%02d.dat", (int) i, npass_output); 647 fout = fopen (filename, "w"); 648 } 649 629 650 // number of stars to measure the bright-end scatter 630 651 Nbright = 0; … … 636 657 c = MosaicToCatalog[i][j]; 637 658 659 if (fout) { 660 Mcal = getMcal (m, c, flatcorr, catalog); 661 Mgrid = getMgrid (m, c); 662 Mrel = getMrel (catalog, m, c); 663 Mflat = getMflat (m, c, flatcorr, catalog); 664 665 n = catalog[c].measureT[m].averef; 666 Msys = PhotSysTiny (&catalog[c].measureT[m], &catalog[c].averageT[n], &catalog[c].secfilt[n*Nsecfilt]); 667 668 float delta = Msys - Mrel - Mcal - Mgrid + Mflat; 669 670 int isBad = (catalog[c].measureT[m].dbFlags & MEAS_BAD); 671 672 fprintf (fout, "%f %f : %f %f %f %f %f : %f %d\n", catalog[c].averageT[n].R, catalog[c].averageT[n].D, Msys, Mrel, Mcal, Mgrid, Mflat, delta, isBad); 673 } 674 638 675 if (catalog[c].measureT[m].dbFlags & MEAS_BAD) { 639 676 Nbad ++; … … 689 726 /* N_onMosaic[i] is all measurements, N is good measurements */ 690 727 728 if (fout) { 729 fclose (fout); 730 } 731 691 732 /* too few good measurements or too many bad measurements (skip in PoorImages run) */ 692 733 if (!PoorImages) { … … 696 737 mosaic[i].flags |= ID_IMAGE_PHOTOM_FEW; 697 738 Nfew ++; 739 if (testImage) { 740 fprintf (stderr, "NOTE: *** marked test image poor : %d %d %d***\n", (int) N, (int) IMAGE_TOOFEW, (int) (IMAGE_GOOD_FRACTION*N_onMosaic[i])); 741 } 698 742 } else { 699 743 mosaic[i].flags &= ~ID_IMAGE_PHOTOM_FEW; … … 708 752 mosaic[i].Xm = 100.0*log10(stats.chisq); 709 753 754 if (testImage) { 755 fprintf (stderr, "test image %d (%d) %f %f %d ... ", (int) i, mosaic[i].start, stats.mean, stats.error, mosaic[i].nFitPhotom); 756 } 757 710 758 plot_setMcal (list, N, &stats, CLOUD_TOLERANCE); 711 759 … … 716 764 if (mosaic[i].Mcal < -CLOUD_TOLERANCE) { 717 765 mosaic[i].Mcal = 0.0; 766 } 767 768 if (testImage) { 769 fprintf (stderr, "%f %f\n", mosaic[i].Mcal, mosaic[i].dMsys); 718 770 } 719 771 … … 733 785 free (Mlist); 734 786 free (dMlist); 787 788 npass_output ++; 735 789 736 790 fprintf (stderr, "%d mosaics marked having too few measurements (Nbad: %d, Ncal: %d, Ngrid: %d, Nrel: %d, Nsys: %d)\n", Nfew, Nbad, Ncal, Ngrid, Nrel, Nsys); -
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/StarOps.c
r33651 r33736 376 376 catalog[i].secfilt[Nsecfilt*j+Nsec].M = stats.mean; 377 377 catalog[i].secfilt[Nsecfilt*j+Nsec].Map = apstats.mean; 378 catalog[i].secfilt[Nsecfilt*j+Nsec].dM = MAX (stats.error, stats.sigma); 378 catalog[i].secfilt[Nsecfilt*j+Nsec].dM = stats.error; 379 catalog[i].secfilt[Nsecfilt*j+Nsec].Mstdev = 1000.0*stats.sigma; // Mstdev is in millimags (not enough space for more precision) 379 380 catalog[i].secfilt[Nsecfilt*j+Nsec].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NAN_S_SHORT; 380 381 catalog[i].secfilt[Nsecfilt*j+Nsec].Ncode = Ncode; … … 488 489 /* use sigma or error in dM for output? */ 489 490 catalog[i].secfilt[Nsecfilt*j+Ns].M = stats.mean; 490 catalog[i].secfilt[Nsecfilt*j+Ns].dM = MAX (stats.error, stats.sigma); 491 catalog[i].secfilt[Nsecfilt*j+Ns].dM = stats.error; 492 catalog[i].secfilt[Nsecfilt*j+Ns].Mstdev = 1000.0*stats.sigma; // Mstdev is in millimags (not enough space for more precision) 491 493 catalog[i].secfilt[Nsecfilt*j+Ns].Xm = (stats.Nmeas > 1) ? 100.0*log10(stats.chisq) : NAN_S_SHORT; 492 494 catalog[i].secfilt[Nsecfilt*j+Ns].Ncode = N; -
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/bcatalog.c
r33651 r33736 74 74 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].Map = NAN; 75 75 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].dM = NAN; 76 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].Mstdev = NAN_S_SHORT; 76 77 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].Xm = NAN; 77 78 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].M_20 = NAN_S_SHORT; -
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/relphot_objects.c
r33651 r33736 78 78 catalog.secfilt[j*Nsecfilt + k].Map = NAN; 79 79 catalog.secfilt[j*Nsecfilt + k].dM = NAN; 80 catalog.secfilt[j*Nsecfilt + k].Mstdev = NAN_S_SHORT; 80 81 catalog.secfilt[j*Nsecfilt + k].Xm = NAN; 81 82 catalog.secfilt[j*Nsecfilt + k].M_20 = NAN_S_SHORT; -
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/setMrelFinal.c
r33651 r33736 43 43 catalog[0].secfilt[N].Map = NAN; 44 44 catalog[0].secfilt[N].dM = NAN; 45 catalog[0].secfilt[N].Mstdev = NAN_S_SHORT; 45 46 catalog[0].secfilt[N].Xm = NAN; 46 47 catalog[0].secfilt[N].M_20 = NAN_S_SHORT;
Note:
See TracChangeset
for help on using the changeset viewer.
