Changeset 41606 for branches/eam_branches/relphot.20210521/src/TGroupOps.c
- Timestamp:
- May 21, 2021, 2:04:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relphot.20210521/src/TGroupOps.c
r41603 r41606 2 2 3 3 void assignMosaicsToTGroups (void); 4 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog , FlatCorrectionTable *flatcorr);4 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog); 5 5 6 6 // tgroupTimes carries the times of the tgroups (initially, just the photometric nights) … … 647 647 Catalog *catalog; 648 648 Image *image; 649 FlatCorrectionTable *flatcorr;650 649 SetMgrpInfo info; 651 650 } ThreadInfo; 652 651 653 int setMgrp_tgroup (TGroup *tgroup, off_t Nmos, Image *image, Catalog *catalog, SetMgrpInfo *info , FlatCorrectionTable *flatcorr);652 int setMgrp_tgroup (TGroup *tgroup, off_t Nmos, Image *image, Catalog *catalog, SetMgrpInfo *info); 654 653 void *setMgrp_worker (void *data); 655 int setMgrp_threaded (Catalog *catalog , FlatCorrectionTable *flatcorr);654 int setMgrp_threaded (Catalog *catalog); 656 655 657 656 void SetMgrpInfoInit (SetMgrpInfo *info, off_t Nmax, int allocLists) { … … 727 726 } 728 727 729 int setMgrp (Catalog *catalog , FlatCorrectionTable *flatcorr) {728 int setMgrp (Catalog *catalog) { 730 729 731 730 off_t N; … … 738 737 // so do not run setMgrp in threaded mode if PLOTSTUFF is set 739 738 if (NTHREADS && !PLOTSTUFF) { 740 int status = setMgrp_threaded (catalog , flatcorr);739 int status = setMgrp_threaded (catalog); 741 740 return status; 742 741 } … … 758 757 TGroup *tgroup = tgroupTimes[i][0].byCode; 759 758 for (off_t j = 0; j < tgroupTimes[i][0].nCode; j++) { 760 setMgrp_tgroup (&tgroup[j], i, image, catalog, &info , flatcorr);759 setMgrp_tgroup (&tgroup[j], i, image, catalog, &info); 761 760 // fprintf (stderr, "TGROUP time %.0f photcode %d Mcal: %f, dK: %f, dMcal: %f, sigma: %f, chisq: %f, %d of %d, limiting negative clouds to %f\n", 762 761 // ohana_sec_to_mjd(tgroupTimes[i][0].start), tgroup[j].photcode, tgroup[j].McalPSF, tgroup[j].dKlam, tgroup[j].dMcal, tgroup[j].stdev, tgroup[j].McalChiSq, tgroup[j].nFitPhotom, tgroup[j].nValPhotom, CLOUD_TOLERANCE); … … 781 780 782 781 // 'tgroup' is a pointer to the current tgroup of interest (entry Ngrp) 783 int setMgrp_tgroup (TGroup *myTGroup, off_t Ngrp, Image *image, Catalog *catalog, SetMgrpInfo *info , FlatCorrectionTable *flatcorr) {782 int setMgrp_tgroup (TGroup *myTGroup, off_t Ngrp, Image *image, Catalog *catalog, SetMgrpInfo *info) { 784 783 785 784 off_t j; … … 826 825 fout = fopen (filename, "w"); 827 826 fprintf (fout, "# tgroup %s (%.0f)\n", ohana_sec_to_date(tgroup->start), mjdStart); 828 save_test_night_measures (fout, myTGroup, catalog , flatcorr);827 save_test_night_measures (fout, myTGroup, catalog); 829 828 fclose (fout); 830 829 } … … 877 876 // the flat-correction. NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat) 878 877 879 float Mflat = getMflat (m, c, flatcorr,catalog);878 float Mflat = getMflat (m, c, catalog); 880 879 881 880 off_t n = catalog[c].measureT[m].averef; … … 1000 999 } 1001 1000 1002 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog , FlatCorrectionTable *flatcorr) {1001 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog) { 1003 1002 1004 1003 int Nsecfilt = GetPhotcodeNsecfilt (); … … 1015 1014 float Mgrid = getMgridTiny (&catalog[c].measureT[m]); // camera offset (deprecated?) 1016 1015 float MrelPSF = getMrel (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude 1017 float Mflat = getMflat (m, c, flatcorr,catalog); // flat-field correction1016 float Mflat = getMflat (m, c, catalog); // flat-field correction 1018 1017 1019 1018 off_t n = catalog[c].measureT[m].averef; … … 1037 1036 } 1038 1037 1039 int setMgrp_threaded (Catalog *catalog , FlatCorrectionTable *flatcorr) {1038 int setMgrp_threaded (Catalog *catalog) { 1040 1039 1041 1040 int i; … … 1075 1074 threadinfo[i].catalog = catalog; 1076 1075 threadinfo[i].image = image; 1077 threadinfo[i].flatcorr = flatcorr;1078 1076 1079 1077 // we do NOT allocate the arrays here, we only supply basic info used in the threads … … 1147 1145 1148 1146 Catalog *catalog = threadinfo->catalog; 1149 FlatCorrectionTable *flatcorr = threadinfo->flatcorr;1150 1147 Image *image = threadinfo->image; 1151 1148 1152 1149 TGroup *tgroup = tgroupTimes[i][0].byCode; 1153 1150 for (int j = 0; j < tgroupTimes[i][0].nCode; j++) { 1154 setMgrp_tgroup (&tgroup[j], i, image, catalog, &results , flatcorr);1151 setMgrp_tgroup (&tgroup[j], i, image, catalog, &results); 1155 1152 SetMgrpInfoAccum (&threadinfo->info, &results); 1156 1153 } … … 1506 1503 float MrelPSF = getMrel (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude 1507 1504 // float Mgrid = getMgridTiny (&catalog[c].measureT[m]); // camera offset (deprecated?) 1508 // float Mflat = getMflat (m, c, flatcorr,catalog); // flat-field correction1505 // float Mflat = getMflat (m, c, catalog); // flat-field correction 1509 1506 1510 1507 off_t n = catalog[c].measureT[m].averef;
Note:
See TracChangeset
for help on using the changeset viewer.
