Changeset 41664
- Timestamp:
- Jun 16, 2021, 1:43:22 PM (5 years ago)
- Location:
- trunk/Ohana/src/relphot/src
- Files:
-
- 5 edited
-
GridOps.c (modified) (2 diffs)
-
ImageOps.c (modified) (2 diffs)
-
MosaicOps.c (modified) (3 diffs)
-
TGroupOps.c (modified) (3 diffs)
-
relphot_images.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/src/GridOps.c
r41647 r41664 274 274 if (!GridCorr[code]) continue; 275 275 276 // float GridSum = 0.0; 277 // int GridCnt = 0; 276 278 for (int ix = 0; ix < GridCorr[code]->Nx; ix++) { 277 279 for (int iy = 0; iy < GridCorr[code]->Ny; iy++) { … … 292 294 GridCorr[code]->dMgrid[ix][iy] = sqrt(r*(Mgrid2 - Mgrid*Mgrid)); // sample stdev 293 295 // fprintf (stderr, "grid code %d, %d x %d : %f +/- %f : %d\n", code, ix, iy, GridCorr[code]-> Mgrid[ix][iy], GridCorr[code]->dMgrid[ix][iy], GridCorr[code]->nMgrid[ix][iy]); 296 // GridSum += Mgrid; 297 // GridCnt ++; 294 298 } 295 299 } 300 // float GridAve = GridSum / GridCnt; 301 // fprintf (stderr, "grid average: %f\n", GridAve); 296 302 } 297 303 return; -
trunk/Ohana/src/relphot/src/ImageOps.c
r41662 r41664 1021 1021 free (mlist); 1022 1022 1023 fprintf (stderr, "rationalize by image using %d pts\n", N); 1023 1024 return stats.median; 1024 1025 } … … 1031 1032 int mycode = GetPhotcodeEquivCodebyCode (image[i].photcode); 1032 1033 if (mycode != photcode) continue; 1033 image[i].McalPSF -= zpt; 1034 image[i].McalAPER -= zpt; 1034 // fprintf (stderr, "IMAGE %d zpt %f -> ", i, image[i].McalPSF); 1035 1036 int applyOffset = TRUE; 1037 TGroup *mygrp = getTGroupForImage (i); 1038 if (mygrp && (mygrp->flags & ID_IMAGE_TGROUP_PHOTCAL)) applyOffset = FALSE; 1039 1040 Mosaic *mymos = getMosaicForImage (i); 1041 if (mymos && (mymos->flags & ID_IMAGE_MOSAIC_PHOTCAL)) applyOffset = FALSE; 1042 1043 if (applyOffset) { 1044 image[i].McalPSF -= zpt; 1045 image[i].McalAPER -= zpt; 1046 } 1047 // fprintf (stderr, "%f (%d)\n", image[i].McalPSF, applyOffset); 1035 1048 } 1036 1049 -
trunk/Ohana/src/relphot/src/MosaicOps.c
r41662 r41664 1574 1574 } 1575 1575 1576 TGroup *getTGroupForMosaic (int mos) { 1577 if (mos >= Nmosaic) return NULL; 1578 if (mos < 0) return NULL; 1579 1580 if (!mosaic[mos].inTGroup) return NULL; 1581 1582 int imageIdx = MosaicToImage[mos][0]; 1583 1584 TGroup *mygrp = getTGroupForImage (imageIdx); 1585 return mygrp; 1586 } 1587 1576 1588 double get_median_zpt_mosaics (short photcode) { 1577 1589 … … 1601 1613 free (mlist); 1602 1614 1615 fprintf (stderr, "rationalize by mosaic using %d pts\n", N); 1603 1616 return stats.median; 1604 1617 } … … 1611 1624 for (int i = 0; i < Nmosaic; i++) { 1612 1625 if (mosaic[i].photcode != photcode) continue; 1613 mosaic[i].McalPSF -= zpt; 1614 mosaic[i].McalAPER -= zpt; 1626 // fprintf (stderr, "MOSAIC %d zpt %f -> ", i, mosaic[i].McalPSF); 1627 1628 int applyOffset = TRUE; 1629 TGroup *mygrp = getTGroupForMosaic (i); 1630 if (mygrp && (mygrp->flags & ID_IMAGE_TGROUP_PHOTCAL)) applyOffset = FALSE; 1631 if (!(mosaic[i].flags & ID_IMAGE_MOSAIC_PHOTCAL)) applyOffset = FALSE; 1632 1633 if (applyOffset) { 1634 mosaic[i].McalPSF -= zpt; 1635 mosaic[i].McalAPER -= zpt; 1636 } 1637 // fprintf (stderr, "%f (%d)\n", mosaic[i].McalPSF, applyOffset); 1615 1638 } 1616 1639 -
trunk/Ohana/src/relphot/src/TGroupOps.c
r41662 r41664 1335 1335 } 1336 1336 // too few exposures (configure) 1337 if ( tgroup[j].Nmosaic < 4) {1337 if ((tgroup[j].Nmosaic < 4) && (tgroup[j].Nimage < 4)) { 1338 1338 mark = TRUE; 1339 1339 NfewExp ++; … … 1395 1395 free (mlist); 1396 1396 1397 fprintf (stderr, "rationalize by tgroup using %d pts\n", N); 1397 1398 return stats.median; 1398 1399 } … … 1407 1408 for (int j = 0; j < tgroupTimes[i][0].nCode; j++) { 1408 1409 if (tgroup[j].photcode != photcode) continue; 1410 if (!(tgroup[j].flags & ID_IMAGE_TGROUP_PHOTCAL)) continue; 1409 1411 tgroup[j].McalPSF -= zpt; 1410 1412 tgroup[j].McalAPER -= zpt; -
trunk/Ohana/src/relphot/src/relphot_images.c
r41662 r41664 97 97 SetZptIteration (i); 98 98 99 rationalize_zeropoints (i); 100 99 101 setMrel (catalog, Ncatalog); // threaded (calls setMrelCatalog) 100 102 … … 102 104 setMmos (catalog); 103 105 setMgrp (catalog); 104 105 rationalize_zeropoints (i);106 106 107 107 setMgrid (catalog, Ncatalog);
Note:
See TracChangeset
for help on using the changeset viewer.
