Changeset 38547
- Timestamp:
- Jun 25, 2015, 4:28:13 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150616/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
ReadStarsFITS.c (modified) (4 diffs)
-
loadgalphot_readstars.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ReadStarsFITS.c
r38540 r38547 874 874 Catalog *catalog = addstar_catalog_init (Nstars); 875 875 ALLOCATE (catalog->lensing, Lensing, Nstars); 876 catalog->Nlensing = Nstars; 876 877 877 878 for (i = 0; i < Nstars; i++) { … … 997 998 Catalog *catalog = addstar_catalog_init (Nstars); 998 999 ALLOCATE (catalog->lensing, Lensing, Nstars); 1000 catalog->Nlensing = Nstars; 999 1001 1000 1002 for (i = 0; i < Nstars; i++) { … … 1111 1113 CMF_PS1_V5_R2_Lensing *ps1data; 1112 1114 1113 ps1data = gfits_table_get_CMF_PS1_V5_R2_Lensing (table, &Nstars, NULL); 1115 // this code expects the output cmf files to have a fixed column order 1116 // unfortunatly, psphot is not consistent for the obj lensing values: 1117 // if the first object in the list is not a valid object for the lensing measurement, then 1118 // the lensingOBJ structure is not allocated for that source and the corresponding rows 1119 // are not added to the output metadata until an object which does include the 1120 // measurement. 1121 1122 char field[128]; 1123 gfits_scan (table->header, "TTYPE45", "%s", 1, field); 1124 1125 int mode = 0; 1126 if (!strcmp (field, "LENS_X11_SM_OBJ")) { mode = 1; } 1127 if (!strcmp (field, "LENS_X11_SM_PSF")) { mode = 2; } 1128 myAssert (mode, "invalid table layout\n"); 1129 1130 if (mode == 1) { 1131 ps1data = gfits_table_get_CMF_PS1_V5_R2_Lensing (table, &Nstars, NULL); 1132 fprintf (stderr, "PS1_V5_R2_Lensing mode 1\n"); 1133 } 1134 if (mode == 2) { 1135 ps1data = gfits_table_get_CMF_PS1_V5_R2x_Lensing (table, &Nstars, NULL); 1136 fprintf (stderr, "PS1_V5_R2_Lensing mode 2\n"); 1137 } 1138 1114 1139 if (!ps1data) { 1115 1140 fprintf (stderr, "skipping inconsistent entry\n"); … … 1120 1145 Catalog *catalog = addstar_catalog_init (Nstars); 1121 1146 ALLOCATE (catalog->lensing, Lensing, Nstars); 1147 catalog->Nlensing = Nstars; 1122 1148 1123 1149 for (i = 0; i < Nstars; i++) { -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_readstars.c
r38539 r38547 375 375 // use bilinear interpolation to choose Flux @ (Xmin,Ymin)? 376 376 galphot->mag = -2.5*log10(flux[iMin]); // correct for exptime? 377 galphot->magErr = fluxErr[iMin]/ flux[iMin];377 galphot->magErr = sqrt(fluxErr[iMin]) / flux[iMin]; 378 378 galphot->chisq = chisqMin; 379 379
Note:
See TracChangeset
for help on using the changeset viewer.
