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/MosaicOps.c

    r41603 r41606  
    11# include "relphot.h"
    22off_t findMosaic (unsigned int *startTimes, off_t Nmosaic, unsigned int start);
    3 int save_test_mosaic_measures (FILE *fout, int Nmos, Catalog *catalog, FlatCorrectionTable *flatcorr);
     3int save_test_mosaic_measures (FILE *fout, int Nmos, Catalog *catalog);
    44
    55// see discussion in ImagesOps.c re: IDX_T
     
    818818  Catalog *catalog;
    819819  Image *image;
    820   FlatCorrectionTable *flatcorr;
    821820  SetMmosInfo info;
    822821} ThreadInfo;
    823822
    824 int setMmos_mosaic (Mosaic *mosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr);
     823int setMmos_mosaic (Mosaic *mosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info);
    825824void *setMmos_worker (void *data);
    826 int setMmos_threaded (Catalog *catalog, FlatCorrectionTable *flatcorr);
     825int setMmos_threaded (Catalog *catalog);
    827826
    828827void SetMmosInfoInit (SetMmosInfo *info, off_t Nmax, int allocLists) {
     
    890889}
    891890
    892 int setMmos (Catalog *catalog, FlatCorrectionTable *flatcorr) {
     891int setMmos (Catalog *catalog) {
    893892
    894893  off_t i, N, Nmax;
     
    903902  // so do not run setMmos in threaded mode if PLOTSTUFF is set
    904903  if (NTHREADS && !PLOTSTUFF) {
    905     int status = setMmos_threaded (catalog, flatcorr);
     904    int status = setMmos_threaded (catalog);
    906905    return status;
    907906  }
     
    923922
    924923  for (i = 0; i < Nmosaic; i++) {
    925     setMmos_mosaic (&mosaic[i], i, image, catalog, &info, flatcorr);
     924    setMmos_mosaic (&mosaic[i], i, image, catalog, &info);
    926925  }
    927926  SetMmosInfoFree (&info);
     
    940939 
    941940// 'mosaic' is a pointer to the current mosaic of interest (Nmos)
    942 int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr) {
     941int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info) {
    943942
    944943  off_t j, NimageReal;
     
    10211020    snprintf (filename, 64, "test.%05d.%02d.dat", (int) Nmos, npass_output);
    10221021    fout = fopen (filename, "w");
    1023     save_test_mosaic_measures (fout, Nmos, catalog, flatcorr);
     1022    save_test_mosaic_measures (fout, Nmos, catalog);
    10241023    fclose (fout);
    10251024  }
     
    10721071    // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
    10731072
    1074     float Mflat = getMflat (m, c, flatcorr, catalog);
     1073    float Mflat = getMflat (m, c, catalog);
    10751074
    10761075    off_t n = catalog[c].measureT[m].averef;
     
    11871186}
    11881187 
    1189 int save_test_mosaic_measures (FILE *fout, int Nmos, Catalog *catalog, FlatCorrectionTable *flatcorr) {
     1188int save_test_mosaic_measures (FILE *fout, int Nmos, Catalog *catalog) {
    11901189
    11911190  int Nsecfilt = GetPhotcodeNsecfilt ();
     
    12011200    float Mgrid    = getMgridTiny (&catalog[c].measureT[m]);
    12021201    float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP);
    1203     float Mflat    = getMflat (m, c, flatcorr, catalog);
     1202    float Mflat    = getMflat (m, c, catalog);
    12041203
    12051204    off_t n = catalog[c].measureT[m].averef;
     
    12151214}
    12161215
    1217 int setMmos_threaded (Catalog *catalog, FlatCorrectionTable *flatcorr) {
     1216int setMmos_threaded (Catalog *catalog) {
    12181217
    12191218  int i;
     
    12521251    threadinfo[i].catalog  =  catalog;
    12531252    threadinfo[i].image    =    image;
    1254     threadinfo[i].flatcorr = flatcorr;
    12551253
    12561254    // we do NOT allocate the arrays here, we only supply basic info (Nmax, Nloop) used in
     
    13211319
    13221320    Catalog *catalog = threadinfo->catalog;
    1323     FlatCorrectionTable *flatcorr = threadinfo->flatcorr;
    13241321    Image *image = threadinfo->image;
    13251322
    1326     setMmos_mosaic (&mosaic[i], i, image, catalog, &results, flatcorr);
     1323    setMmos_mosaic (&mosaic[i], i, image, catalog, &results);
    13271324    SetMmosInfoAccum (&threadinfo->info, &results);
    13281325  }
     
    15991596}
    16001597
    1601 StatType statsMosaicN (Catalog *catalog, FlatCorrectionTable *flatcorr) {
     1598StatType statsMosaicN (Catalog *catalog) {
    16021599
    16031600  off_t i, j, m, c, n, N;
Note: See TracChangeset for help on using the changeset viewer.