Changeset 41387 for branches/eam_branches/relphot.20200519/src/GridOps.c
- Timestamp:
- Jul 7, 2020, 9:30:05 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relphot.20200519/src/GridOps.c
r40291 r41387 289 289 290 290 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; 292 292 double **A, **B, *Mjx, *Wjx; 293 float Msys, Mcal, Mmos, M err, Wsys;293 float Msys, Mcal, Mmos, Mgrp, Merr, Wsys; 294 294 double Mj, Wj; 295 295 … … 305 305 } 306 306 307 Ngood = Nbad = Ncal = Nmos = Nrel = Nsys = 0;307 Ngood = Nbad = Ncal = Nmos = Nrel = Nsys = Ngrp = 0; 308 308 309 309 ALLOCATE (gotstar, int *, Ncatalog); … … 411 411 if (isnan(Mmos)) { 412 412 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 ++; 413 420 continue; 414 421 } … … 526 533 void setMgrid (Catalog *catalog, FlatCorrectionTable *flatcorr) { 527 534 528 int i, j, m, c, n, N, Nmax, Nbad, Nmos, N cal, Nrel, Nsys, Nfit;535 int i, j, m, c, n, N, Nmax, Nbad, Nmos, Ngrp, Ncal, Nrel, Nsys, Nfit; 529 536 double *list, *dlist; 530 float Msys, Mrel, Mcal, Mmos ;537 float Msys, Mrel, Mcal, Mmos, Mgrp; 531 538 532 539 StatType stats; … … 544 551 ALLOCATE (dlist, double, Nmax); 545 552 546 Nbad = Ncal = Nmos = N rel = Nsys = Nfit = 0;553 Nbad = Ncal = Nmos = Ngrp = Nrel = Nsys = Nfit = 0; 547 554 548 555 for (i = 0; i < Ngrid; i++) { … … 568 575 continue; 569 576 } 577 Mgrp = getMgrp (m, c, catalog[c].measureT[m].airmass); 578 if (isnan(Mgrp)) { 579 Ngrp ++; 580 continue; 581 } 570 582 Mrel = getMrel (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); 571 583 if (isnan(Mrel)) { … … 580 592 continue; 581 593 } 582 list[N] = Msys - Mrel - Mcal - Mmos ;594 list[N] = Msys - Mrel - Mcal - Mmos - Mgrp; 583 595 dlist[N] = MAX (catalog[c].measureT[m].dM, MIN_ERROR); 584 596 N++; … … 616 628 617 629 int i, j, m, c, n, N, Narea; 618 float Msys, Mrel, Mcal, Mmos ;630 float Msys, Mrel, Mcal, Mmos, Mgrp; 619 631 double *xlist, *Mlist, *dlist, *ylist; 620 632 Graphdata graphdata; … … 649 661 Mmos = getMmos (m, c); 650 662 if (isnan(Mmos)) continue; 663 Mgrp = getMgrp (m, c, catalog[c].measureT[m].airmass); 664 if (isnan(Mgrp)) continue; 651 665 Mrel = getMrel (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); 652 666 if (isnan(Mrel)) continue; … … 657 671 xlist[N] = Xmeas[c][m]; 658 672 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]; 661 675 N++; 662 676 }
Note:
See TracChangeset
for help on using the changeset viewer.
