- Timestamp:
- Apr 16, 2016, 7:04:50 AM (10 years ago)
- Location:
- trunk/Ohana/src/dvolens/src
- Files:
-
- 4 edited
-
args.c (modified) (1 diff)
-
dvolens_client.c (modified) (1 diff)
-
update_objects.c (modified) (2 diffs)
-
update_objects_catalog.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvolens/src/args.c
r39487 r39537 158 158 } 159 159 160 /* specify region file by name (eg n0000/0000.00) */ 161 UserCatalog = NULL; 162 if ((N = get_argument (argc, argv, "-catalog"))) { 163 remove_argument (N, &argc, argv); 164 UserCatalog = strcreate (argv[N]); 165 remove_argument (N, &argc, argv); 166 } 167 160 168 VERBOSE = VERBOSE2 = FALSE; 161 169 if ((N = get_argument (argc, argv, "-v"))) { -
trunk/Ohana/src/dvolens/src/dvolens_client.c
r39487 r39537 19 19 FREE (HOSTDIR); 20 20 FREE (CATDIR); 21 FREE (UserCatalog); 21 22 free_images(); 22 23 FreeWarpGroups(); -
trunk/Ohana/src/dvolens/src/update_objects.c
r39487 r39537 50 50 // does this host ID match the desired location for the table? 51 51 if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue; 52 53 if (UserCatalog && strcasecmp (skylist[0].regions[i]->name, UserCatalog)) continue; 52 54 53 55 INITTIME; … … 171 173 if (UPDATE) strextend (&command, "-update"); 172 174 if (REPAIR_LENSING_IDS) strextend (&command, "-repair-lensing-ids"); 175 if (UserCatalog) strextend (&command, "-catalog %s", UserCatalog); 173 176 174 177 fprintf (stderr, "command: %s\n", command); -
trunk/Ohana/src/dvolens/src/update_objects_catalog.c
r39489 r39537 109 109 Mj = RecoverLensingIndex (average, measureSeq, lensing); 110 110 if (Mj == -1) { 111 fprintf (stderr, "failed %f %f : %d\n", average->R, average->D, lensing->imageID);111 if (Nfailed < 10) fprintf (stderr, "failed %f %f : %d\n", average->R, average->D, lensing->imageID); 112 112 Nfailed ++; 113 113 continue; … … 190 190 // Fcal * lensing->F_ApR5 is in Jy 191 191 192 // F_ApR5 is <F_ApR5_i>, the mean of the lensing entries. we will save stdev of F_ApR5_i, 193 // not the r.m.s. of sF_ApR5 194 195 // stdev = sqrt(F_Ap_R5_i^2 / N - <F_Ap_R5>) 196 192 197 if (isfinite(lensing-> F_ApR5)) { 193 198 lensobj[Nsec]. F_ApR5 += Fcal * lensing-> F_ApR5; 194 199 lensobj[Nsec].dF_ApR5 += SQ(Fcal * lensing->dF_ApR5); 195 lensobj[Nsec].sF_ApR5 += SQ(Fcal * lensing-> sF_ApR5);200 lensobj[Nsec].sF_ApR5 += SQ(Fcal * lensing-> F_ApR5); 196 201 lensobj[Nsec].fF_ApR5 += lensing->fF_ApR5; 197 202 N5[Nsec] ++; … … 201 206 lensobj[Nsec]. F_ApR6 += Fcal * lensing-> F_ApR6; 202 207 lensobj[Nsec].dF_ApR6 += SQ(Fcal * lensing->dF_ApR6); 203 lensobj[Nsec].sF_ApR6 += SQ(Fcal * lensing-> sF_ApR6);208 lensobj[Nsec].sF_ApR6 += SQ(Fcal * lensing-> F_ApR6); 204 209 lensobj[Nsec].fF_ApR6 += lensing->fF_ApR6; 205 210 N6[Nsec] ++; … … 209 214 lensobj[Nsec]. F_ApR7 += Fcal * lensing-> F_ApR7; 210 215 lensobj[Nsec].dF_ApR7 += SQ(Fcal * lensing->dF_ApR7); 211 lensobj[Nsec].sF_ApR7 += SQ(Fcal * lensing-> sF_ApR7);216 lensobj[Nsec].sF_ApR7 += SQ(Fcal * lensing-> F_ApR7); 212 217 lensobj[Nsec].fF_ApR7 += lensing->fF_ApR7; 213 218 N7[Nsec] ++; … … 253 258 if (N5[j]) { 254 259 lensobj[j]. F_ApR5 /= (float) N5[j]; 255 lensobj[j].dF_ApR5 /= (float) N5[j];256 lensobj[j].sF_ApR5 /= (float) N5[j];257 260 lensobj[j].fF_ApR5 /= (float) N5[j]; 261 lensobj[j].dF_ApR5 = sqrt(lensobj[j].dF_ApR5 / (float) N5[j]); 262 263 double S1 = SQ(lensobj[j]. F_ApR5); // <f>^2 264 double S2 = lensobj[j].sF_ApR5 / (float) N5[j]; // sum(f^2) / N 265 lensobj[j].sF_ApR5 = sqrt(S2 - S1) * (N5[j] / (N5[j] - 1.0)); // correct to sample stdev 258 266 } else { 259 267 lensobj[j]. F_ApR5 = NAN; … … 265 273 if (N6[j]) { 266 274 lensobj[j]. F_ApR6 /= (float) N6[j]; 267 lensobj[j].dF_ApR6 /= (float) N6[j];268 lensobj[j].sF_ApR6 /= (float) N6[j];269 275 lensobj[j].fF_ApR6 /= (float) N6[j]; 276 lensobj[j].dF_ApR6 = sqrt(lensobj[j].dF_ApR6 / (float) N6[j]); 277 278 double S1 = SQ(lensobj[j]. F_ApR6); // <f>^2 279 double S2 = lensobj[j].sF_ApR6 / (float) N6[j]; // sum(f^2) / N 280 lensobj[j].sF_ApR6 = sqrt(S2 - S1) * (N6[j] / (N6[j] - 1.0)); // correct to sample stdev 270 281 } else { 271 282 lensobj[j]. F_ApR6 = NAN; … … 277 288 if (N7[j]) { 278 289 lensobj[j]. F_ApR7 /= (float) N7[j]; 279 lensobj[j].dF_ApR7 /= (float) N7[j];280 lensobj[j].sF_ApR7 /= (float) N7[j];281 290 lensobj[j].fF_ApR7 /= (float) N7[j]; 291 lensobj[j].dF_ApR7 = sqrt(lensobj[j].dF_ApR7 / (float) N7[j]); 292 293 double S1 = SQ(lensobj[j]. F_ApR7); // <f>^2 294 double S2 = lensobj[j].sF_ApR7 / (float) N7[j]; // sum(f^2) / N 295 lensobj[j].sF_ApR7 = sqrt(S2 - S1) * (N7[j] / (N7[j] - 1.0)); // correct to sample stdev 282 296 } else { 283 297 lensobj[j]. F_ApR7 = NAN; … … 286 300 lensobj[j].fF_ApR7 = NAN; 287 301 } 288 289 lensobj[j].dF_ApR5 = sqrt(lensobj[j].dF_ApR5);290 lensobj[j].sF_ApR5 = sqrt(lensobj[j].sF_ApR5);291 lensobj[j].dF_ApR6 = sqrt(lensobj[j].dF_ApR6);292 lensobj[j].sF_ApR6 = sqrt(lensobj[j].sF_ApR6);293 lensobj[j].dF_ApR7 = sqrt(lensobj[j].dF_ApR7);294 lensobj[j].sF_ApR7 = sqrt(lensobj[j].sF_ApR7);295 296 // somewhere in here I should calculate the values of E1, E2, and gamma297 302 298 303 float e0 = Mxx_obj[j] + Myy_obj[j];
Note:
See TracChangeset
for help on using the changeset viewer.
