IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 21, 2021, 2:04:53 PM (5 years ago)
Author:
eugene
Message:

I have stripped out all flatcorr references : flat correction is applied by setphot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relphot.20210521/src/TGroupOps.c

    r41603 r41606  
    22
    33void assignMosaicsToTGroups (void);
    4 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog, FlatCorrectionTable *flatcorr);
     4int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog);
    55
    66// tgroupTimes carries the times of the tgroups (initially, just the photometric nights)
     
    647647  Catalog *catalog;
    648648  Image *image;
    649   FlatCorrectionTable *flatcorr;
    650649  SetMgrpInfo info;
    651650} ThreadInfo;
    652651
    653 int   setMgrp_tgroup (TGroup *tgroup, off_t Nmos, Image *image, Catalog *catalog, SetMgrpInfo *info, FlatCorrectionTable *flatcorr);
     652int   setMgrp_tgroup (TGroup *tgroup, off_t Nmos, Image *image, Catalog *catalog, SetMgrpInfo *info);
    654653void *setMgrp_worker (void *data);
    655 int   setMgrp_threaded (Catalog *catalog, FlatCorrectionTable *flatcorr);
     654int   setMgrp_threaded (Catalog *catalog);
    656655
    657656void SetMgrpInfoInit (SetMgrpInfo *info, off_t Nmax, int allocLists) {
     
    727726}
    728727
    729 int setMgrp (Catalog *catalog, FlatCorrectionTable *flatcorr) {
     728int setMgrp (Catalog *catalog) {
    730729
    731730  off_t N;
     
    738737  // so do not run setMgrp in threaded mode if PLOTSTUFF is set
    739738  if (NTHREADS && !PLOTSTUFF) {
    740     int status = setMgrp_threaded (catalog, flatcorr);
     739    int status = setMgrp_threaded (catalog);
    741740    return status;
    742741  }
     
    758757    TGroup *tgroup = tgroupTimes[i][0].byCode;
    759758    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);
    761760      // 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",
    762761      // 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);
     
    781780
    782781// '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) {
     782int setMgrp_tgroup (TGroup *myTGroup, off_t Ngrp, Image *image, Catalog *catalog, SetMgrpInfo *info) {
    784783
    785784  off_t j;
     
    826825    fout = fopen (filename, "w");
    827826    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);
    829828    fclose (fout);
    830829  }
     
    877876    // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
    878877
    879     float Mflat = getMflat (m, c, flatcorr, catalog);
     878    float Mflat = getMflat (m, c, catalog);
    880879
    881880    off_t n = catalog[c].measureT[m].averef;
     
    1000999}
    10011000 
    1002 int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog, FlatCorrectionTable *flatcorr) {
     1001int save_test_night_measures (FILE *fout, TGroup *myTGroup, Catalog *catalog) {
    10031002
    10041003  int Nsecfilt = GetPhotcodeNsecfilt ();
     
    10151014    float Mgrid    = getMgridTiny (&catalog[c].measureT[m]);                    // camera offset (deprecated?)
    10161015    float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude
    1017     float Mflat    = getMflat (m, c, flatcorr, catalog); // flat-field correction
     1016    float Mflat    = getMflat (m, c, catalog); // flat-field correction
    10181017
    10191018    off_t n = catalog[c].measureT[m].averef;
     
    10371036}
    10381037
    1039 int setMgrp_threaded (Catalog *catalog, FlatCorrectionTable *flatcorr) {
     1038int setMgrp_threaded (Catalog *catalog) {
    10401039
    10411040  int i;
     
    10751074    threadinfo[i].catalog  =  catalog;
    10761075    threadinfo[i].image    =    image;
    1077     threadinfo[i].flatcorr = flatcorr;
    10781076
    10791077    // we do NOT allocate the arrays here, we only supply basic info used in the threads
     
    11471145
    11481146    Catalog *catalog = threadinfo->catalog;
    1149     FlatCorrectionTable *flatcorr = threadinfo->flatcorr;
    11501147    Image *image = threadinfo->image;
    11511148
    11521149    TGroup *tgroup = tgroupTimes[i][0].byCode;
    11531150    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);
    11551152      SetMgrpInfoAccum (&threadinfo->info, &results);
    11561153    }
     
    15061503        float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude
    15071504        // float Mgrid    = getMgridTiny (&catalog[c].measureT[m]); // camera offset (deprecated?)
    1508         // float Mflat    = getMflat (m, c, flatcorr, catalog); // flat-field correction
     1505        // float Mflat    = getMflat (m, c, catalog); // flat-field correction
    15091506
    15101507        off_t n = catalog[c].measureT[m].averef;
Note: See TracChangeset for help on using the changeset viewer.