- Timestamp:
- Dec 5, 2017, 6:02:41 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_photcode_ops.c
r40214 r40243 381 381 382 382 float Mraw = NAN; 383 float Mcal = NAN; 383 384 switch (class) { 384 385 case MAG_CLASS_PSF: 385 386 Mraw = measure[0].M; 387 Mcal = measure[0].McalPSF; 386 388 break; 387 389 case MAG_CLASS_KRON: 388 390 Mraw = measure[0].Mkron; 391 Mcal = measure[0].McalAPER; 389 392 break; 390 393 case MAG_CLASS_APER: 391 394 Mraw = measure[0].Map; 395 Mcal = measure[0].McalAPER; 392 396 break; 393 397 default: … … 398 402 } 399 403 float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0; 400 float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;404 float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat; 401 405 402 406 /* for DEP, color must be made of PRI/SEC */ … … 1130 1134 1131 1135 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1132 float M cal= code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;1133 float Moff = M cal- ZERO_POINT + 8.9;1134 float Foff = 3630.8 * MagToFlux(M cal);1136 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C; 1137 float Moff = Mzpt - ZERO_POINT + 8.9; 1138 float Foff = 3630.8 * MagToFlux(Mzpt); 1135 1139 float Fcat = NAN; 1136 1140 switch (class) { … … 1158 1162 1159 1163 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1160 float M cal= code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;1161 float Moff = M cal- ZERO_POINT + 8.9;1162 float Foff = 3630.8 * MagToFlux(M cal);1164 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C; 1165 float Moff = Mzpt - ZERO_POINT + 8.9; 1166 float Foff = 3630.8 * MagToFlux(Mzpt); 1163 1167 float Fcat = NAN; 1164 1168 switch (class) { … … 1203 1207 1204 1208 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1209 1210 // use Mcal APER for aperture-like data 1211 float Mcal = (class == MAG_CLASS_PSF) ? measure[0].McalPSF : measure[0].McalAPER; 1205 1212 float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0; 1206 float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat; 1207 float Moff = Mcal - ZERO_POINT + 8.9; 1208 float Foff = 3630.8 * MagToFlux(Mcal); 1213 1214 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat; 1215 float Moff = Mzpt - ZERO_POINT + 8.9; 1216 float Foff = 3630.8 * MagToFlux(Mzpt); 1209 1217 float Fcat = NAN; 1210 1218 switch (class) { … … 1470 1478 1471 1479 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1472 float M cal= code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;1473 float Moff = M cal- ZERO_POINT + 8.9;1474 float Foff = 3630.8 * MagToFlux(M cal);1480 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C; 1481 float Moff = Mzpt - ZERO_POINT + 8.9; 1482 float Foff = 3630.8 * MagToFlux(Mzpt); 1475 1483 1476 1484 // use dFlux if we can, but use dMag if we must: … … 1516 1524 1517 1525 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1518 float M cal= code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;1519 float Moff = M cal- ZERO_POINT + 8.9;1520 float Foff = 3630.8 * MagToFlux(M cal);1526 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C; 1527 float Moff = Mzpt - ZERO_POINT + 8.9; 1528 float Foff = 3630.8 * MagToFlux(Mzpt); 1521 1529 1522 1530 // use dFlux if we can, but use dMag if we must: … … 1579 1587 1580 1588 // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux 1589 // XXX fix this too: 1581 1590 float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0; 1582 float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat; 1583 float Moff = Mcal - ZERO_POINT + 8.9; 1584 float Foff = 3630.8 * MagToFlux(Mcal); 1591 float Mcal = (class == MAG_CLASS_PSF) ? measure[0].McalPSF : measure[0].McalAPER; 1592 1593 float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat; 1594 float Moff = Mzpt - ZERO_POINT + 8.9; 1595 float Foff = 3630.8 * MagToFlux(Mzpt); 1585 1596 1586 1597 // use dFlux if we can, but use dMag if we must: … … 1742 1753 1743 1754 float Mraw = NAN; 1755 float Mcal = NAN; 1744 1756 switch (class) { 1745 1757 case MAG_CLASS_PSF: 1746 1758 Mraw = measure[0].M; 1759 Mcal = measure[0].McalPSF; 1747 1760 break; 1748 1761 case MAG_CLASS_KRON: 1749 1762 Mraw = measure[0].Mkron; 1763 Mcal = measure[0].McalAPER; 1750 1764 break; 1751 1765 case MAG_CLASS_APER: 1752 1766 // Mraw = measure[0].Map; // MeasureTiny does not have Map 1767 // Mcal = measure[0].McalAPER; 1753 1768 break; 1754 1769 default: … … 1759 1774 } 1760 1775 float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0; 1761 float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;1776 float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat; 1762 1777 1763 1778 /* for DEP, color must be made of PRI/SEC */
Note:
See TracChangeset
for help on using the changeset viewer.
