Changeset 38140
- Timestamp:
- Apr 17, 2015, 11:00:42 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150405/Ohana/src/dvolens/src/update_objects_catalog.c
r38136 r38140 51 51 if (!isfinite(lensing->X11_sm_obj)) continue; 52 52 53 // pointer from lensing entry to corresponding measure entry (keep updated?) 54 int Mseq = lensing->measureSeq; 55 myAssert (Mseq < average->Nmeasure, "oops"); 56 57 Measure *measure = &catalog->measure[Moff + Mseq]; 58 myAssert (measure->imageID == lensing->imageID, "oops, deux"); 59 60 # if (0) 53 61 Measure *measure = NULL; 54 62 int found = FALSE; … … 64 72 abort(); 65 73 } 74 # endif 66 75 67 76 // skip measurements that do not match the current photcode … … 77 86 if (measure->psfQFperf < 0.85) continue; 78 87 88 // I should probably only use lensing entries which correspond to warps 89 // included in the mean warp flux (setMrelCatalog.c) 90 if (measure->dbFlags & ID_MEAS_WARP_USED == 0) continue; 91 79 92 Mxx_obj[Nsec] += measure->Mxx; 80 93 Mxy_obj[Nsec] += measure->Mxy; … … 105 118 lensobj[Nsec]. E2_sh_psf += lensing-> E2_sh_psf; 106 119 107 lensobj[Nsec]. F_ApR5 += lensing-> F_ApR5; 108 lensobj[Nsec].dF_ApR5 += SQ(lensing->dF_ApR5); 109 lensobj[Nsec].sF_ApR5 += SQ(lensing->sF_ApR5); 110 lensobj[Nsec].fF_ApR5 += lensing->fF_ApR5; 111 112 lensobj[Nsec]. F_ApR6 += lensing-> F_ApR6; 113 lensobj[Nsec].dF_ApR6 += SQ(lensing->dF_ApR6); 114 lensobj[Nsec].sF_ApR6 += SQ(lensing->sF_ApR6); 115 lensobj[Nsec].fF_ApR6 += lensing->fF_ApR6; 116 117 lensobj[Nsec]. F_ApR7 += lensing-> F_ApR7; 118 lensobj[Nsec].dF_ApR7 += SQ(lensing->dF_ApR7); 119 lensobj[Nsec].sF_ApR7 += SQ(lensing->sF_ApR7); 120 lensobj[Nsec].fF_ApR7 += lensing->fF_ApR7; 120 myAbort ("NOTE: relphot needs to set measure->Mcal -- is this happening or not??"); 121 122 int Np = photcodes[0].hashcode[measure[0].photcode]; 123 if (Np == -1) return (NAN); 124 PhotCode *code = &photcodes[0].code[Np]; 125 126 float Mdef = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C; 127 float Moff = Mdef + 8.9 - measure->Mcal; 128 float Foff = 3630.8 * MagToFlux(Moff); 129 130 // lensing->F_ApR5, etc need to be in units of DN/sec 131 // Foff * lensing->F_ApR5 is in Jy 132 // XXX this is unweighted -- apply a weighting? 133 134 lensobj[Nsec]. F_ApR5 += Foff * lensing-> F_ApR5; 135 lensobj[Nsec].dF_ApR5 += SQ(Foff * lensing->dF_ApR5); 136 lensobj[Nsec].sF_ApR5 += SQ(Foff * lensing->sF_ApR5); 137 lensobj[Nsec].fF_ApR5 += Foff * lensing->fF_ApR5; 138 139 lensobj[Nsec]. F_ApR6 += Foff * lensing-> F_ApR6; 140 lensobj[Nsec].dF_ApR6 += SQ(Foff * lensing->dF_ApR6); 141 lensobj[Nsec].sF_ApR6 += SQ(Foff * lensing->sF_ApR6); 142 lensobj[Nsec].fF_ApR6 += Foff * lensing->fF_ApR6; 143 144 lensobj[Nsec]. F_ApR7 += Foff * lensing-> F_ApR7; 145 lensobj[Nsec].dF_ApR7 += SQ(Foff * lensing->dF_ApR7); 146 lensobj[Nsec].sF_ApR7 += SQ(Foff * lensing->sF_ApR7); 147 lensobj[Nsec].fF_ApR7 += Foff * lensing->fF_ApR7; 121 148 122 149 lensobj[Nsec].Nmeas ++;
Note:
See TracChangeset
for help on using the changeset viewer.
