IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 7, 2020, 9:30:05 AM (6 years ago)
Author:
eugene
Message:

updates to get tgroups working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relphot.20200519/src/GridOps.c

    r40291 r41387  
    289289
    290290  int **gotstar, **gridmeas;
    291   int i, j, k, Ngood, Nbad, Nmos, Ncal, Nrel, Nsys;
     291  int i, j, k, Ngood, Nbad, Nmos, Ncal, Nrel, Nsys, Ngrp;
    292292  double **A, **B, *Mjx, *Wjx;
    293   float Msys, Mcal, Mmos, Merr, Wsys;
     293  float Msys, Mcal, Mmos, Mgrp, Merr, Wsys;
    294294  double Mj, Wj;
    295295 
     
    305305  }
    306306
    307   Ngood = Nbad = Ncal = Nmos = Nrel = Nsys = 0;
     307  Ngood = Nbad = Ncal = Nmos = Nrel = Nsys = Ngrp = 0;
    308308
    309309  ALLOCATE (gotstar, int *, Ncatalog);
     
    411411        if (isnan(Mmos)) {
    412412          Nmos ++;
     413          continue;
     414        }
     415
     416        // skip mosaics marked as BAD
     417        Mgrp = getMgrp  (m, c, catalog[c].measureT[m].airmass);
     418        if (isnan(Mgrp)) {
     419          Ngrp ++;
    413420          continue;
    414421        }
     
    526533void setMgrid (Catalog *catalog, FlatCorrectionTable *flatcorr) {
    527534
    528   int i, j, m, c, n, N, Nmax, Nbad, Nmos, Ncal, Nrel, Nsys, Nfit;
     535  int i, j, m, c, n, N, Nmax, Nbad, Nmos, Ngrp, Ncal, Nrel, Nsys, Nfit;
    529536  double *list, *dlist;
    530   float Msys, Mrel, Mcal, Mmos;
     537  float Msys, Mrel, Mcal, Mmos, Mgrp;
    531538
    532539  StatType stats;
     
    544551  ALLOCATE (dlist, double, Nmax);
    545552
    546   Nbad = Ncal = Nmos = Nrel = Nsys = Nfit = 0;
     553  Nbad = Ncal = Nmos = Ngrp = Nrel = Nsys = Nfit = 0;
    547554
    548555  for (i = 0; i < Ngrid; i++) {
     
    568575        continue;
    569576      }
     577      Mgrp = getMgrp  (m, c, catalog[c].measureT[m].airmass);
     578      if (isnan(Mgrp)) {
     579        Ngrp ++;
     580        continue;
     581      }
    570582      Mrel  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP);
    571583      if (isnan(Mrel)) {
     
    580592        continue;
    581593      }
    582       list[N] = Msys - Mrel - Mcal - Mmos;
     594      list[N] = Msys - Mrel - Mcal - Mmos - Mgrp;
    583595      dlist[N] = MAX (catalog[c].measureT[m].dM, MIN_ERROR);
    584596      N++;
     
    616628
    617629  int i, j, m, c, n, N, Narea;
    618   float Msys, Mrel, Mcal, Mmos;
     630  float Msys, Mrel, Mcal, Mmos, Mgrp;
    619631  double *xlist, *Mlist, *dlist, *ylist;
    620632  Graphdata graphdata;
     
    649661      Mmos  = getMmos  (m, c);
    650662      if (isnan(Mmos)) continue;
     663      Mgrp  = getMgrp  (m, c, catalog[c].measureT[m].airmass);
     664      if (isnan(Mgrp)) continue;
    651665      Mrel  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP);
    652666      if (isnan(Mrel)) continue;
     
    657671      xlist[N] = Xmeas[c][m];
    658672      ylist[N] = Ymeas[c][m];
    659       Mlist[N] = Msys - Mrel - Mcal - Mmos;
    660       dlist[N] = Msys - Mrel - Mcal - Mmos - gridM[i];
     673      Mlist[N] = Msys - Mrel - Mcal - Mmos - Mgrp;
     674      dlist[N] = Msys - Mrel - Mcal - Mmos - Mgrp - gridM[i];
    661675      N++;
    662676    }
Note: See TracChangeset for help on using the changeset viewer.