Changeset 32346
- Timestamp:
- Sep 6, 2011, 11:15:56 AM (15 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 22 edited
- 9 copied
-
addstar/doc/wise.catalog.txt (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/doc/wise.catalog.txt )
-
addstar/doc/wise.sample.dat (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/doc/wise.sample.dat )
-
addstar/include/WISE.h (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/include/WISE.h )
-
addstar/src/loadwise.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/src/loadwise.c )
-
addstar/src/loadwise_ops.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/src/loadwise_ops.c )
-
addstar/src/loadwise_prelim_rawdata.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/src/loadwise_prelim_rawdata.c )
-
addstar/src/loadwise_star_full.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/addstar/src/loadwise_star_full.c )
-
kapa2/src/DrawObjects.c (modified) (11 diffs)
-
kapa2/src/PSObjects.c (modified) (11 diffs)
-
kapa2/src/bDrawObjects.c (modified) (11 diffs)
-
opihi/cmd.basic/echo.c (modified) (2 diffs)
-
opihi/cmd.data/plot.c (modified) (2 diffs)
-
relastro/Makefile (modified) (1 diff)
-
relastro/include/relastro.h (modified) (4 diffs)
-
relastro/src/CoordOps.c (modified) (1 diff)
-
relastro/src/FitPM.c (modified) (1 diff)
-
relastro/src/FitPMandPar.c (modified) (2 diffs)
-
relastro/src/FixProblemImages.c (modified) (1 diff)
-
relastro/src/ImageOps.c (modified) (3 diffs)
-
relastro/src/StarMaps.c (modified) (4 diffs)
-
relastro/src/UpdateChips.c (modified) (1 diff)
-
relastro/src/UpdateMeasures.c (modified) (1 diff)
-
relastro/src/UpdateObjects.c (modified) (2 diffs)
-
relastro/src/UpdateSimple.c (modified) (1 diff)
-
relastro/src/args.c (modified) (4 diffs)
-
relastro/src/initialize.c (modified) (1 diff)
-
relastro/src/load_images.c (modified) (2 diffs)
-
relastro/src/relastro.c (modified) (1 diff)
-
relastro/src/relastro_merge_source.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/relastro/src/relastro_merge_source.c )
-
relastro/src/resort_catalog.c (copied) (copied from branches/eam_branches/ipp-20110710/Ohana/src/relastro/src/resort_catalog.c )
-
relphot/src/load_images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/kapa2/src/DrawObjects.c
r31665 r32346 408 408 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 409 409 if (scaleColor) { 410 if (!finite(z[i])) continue; 410 411 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 411 412 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 424 425 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 425 426 if (scaleColor) { 427 if (!finite(z[i])) continue; 426 428 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 427 429 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 440 442 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 441 443 if (scaleColor) { 444 if (!finite(z[i])) continue; 442 445 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 443 446 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 457 460 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 458 461 if (scaleColor) { 462 if (!finite(z[i])) continue; 459 463 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 460 464 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 475 479 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 476 480 if (scaleColor) { 481 if (!finite(z[i])) continue; 477 482 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 478 483 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 495 500 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 496 501 if (scaleColor) { 502 if (!finite(z[i])) continue; 497 503 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 498 504 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 513 519 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 514 520 if (scaleColor) { 521 if (!finite(z[i])) continue; 515 522 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 516 523 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 531 538 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 532 539 if (scaleColor) { 540 if (!finite(z[i])) continue; 533 541 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 534 542 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 547 555 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 548 556 if (scaleColor) { 557 if (!finite(z[i])) continue; 549 558 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 550 559 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 567 576 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 568 577 if (scaleColor) { 578 if (!finite(z[i])) continue; 569 579 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 570 580 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); … … 589 599 (sy < graph[0].axis[1].fy) && (sy > graph[0].axis[1].fy + graph[0].axis[1].dfy)) { 590 600 if (scaleColor) { 601 if (!finite(z[i])) continue; 591 602 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 592 603 XSetForeground (graphic->display, graphic->gc, graphic->cmap[pixel].pixel); -
trunk/Ohana/src/kapa2/src/PSObjects.c
r31665 r32346 323 323 { 324 324 if (scaleColor) { 325 if (!finite(z[i])) continue; 325 326 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 326 327 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 340 341 { 341 342 if (scaleColor) { 343 if (!finite(z[i])) continue; 342 344 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 343 345 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 357 359 { 358 360 if (scaleColor) { 361 if (!finite(z[i])) continue; 359 362 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 360 363 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 375 378 { 376 379 if (scaleColor) { 380 if (!finite(z[i])) continue; 377 381 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 378 382 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 393 397 { 394 398 if (scaleColor) { 399 if (!finite(z[i])) continue; 395 400 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 396 401 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 415 420 { 416 421 if (scaleColor) { 422 if (!finite(z[i])) continue; 417 423 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 418 424 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 434 440 { 435 441 if (scaleColor) { 442 if (!finite(z[i])) continue; 436 443 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 437 444 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 453 460 { 454 461 if (scaleColor) { 462 if (!finite(z[i])) continue; 455 463 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 456 464 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 470 478 { 471 479 if (scaleColor) { 480 if (!finite(z[i])) continue; 472 481 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 473 482 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 491 500 { 492 501 if (scaleColor) { 502 if (!finite(z[i])) continue; 493 503 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 494 504 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); … … 514 524 { 515 525 if (scaleColor) { 526 if (!finite(z[i])) continue; 516 527 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 517 528 fprintf (f, "%4.2f %4.2f %4.2f setrgbcolor\n", pixel1[pixel], pixel2[pixel], pixel3[pixel]); -
trunk/Ohana/src/kapa2/src/bDrawObjects.c
r31665 r32346 307 307 { 308 308 if (scaleColor) { 309 if (!finite(z[i])) continue; 309 310 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 310 311 buffer->bColor_R = pixel1[pixel]; … … 326 327 { 327 328 if (scaleColor) { 329 if (!finite(z[i])) continue; 328 330 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 329 331 buffer->bColor_R = pixel1[pixel]; … … 345 347 { 346 348 if (scaleColor) { 349 if (!finite(z[i])) continue; 347 350 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 348 351 buffer->bColor_R = pixel1[pixel]; … … 365 368 { 366 369 if (scaleColor) { 370 if (!finite(z[i])) continue; 367 371 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 368 372 buffer->bColor_R = pixel1[pixel]; … … 385 389 { 386 390 if (scaleColor) { 391 if (!finite(z[i])) continue; 387 392 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 388 393 buffer->bColor_R = pixel1[pixel]; … … 405 410 { 406 411 if (scaleColor) { 412 if (!finite(z[i])) continue; 407 413 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 408 414 buffer->bColor_R = pixel1[pixel]; … … 424 430 { 425 431 if (scaleColor) { 432 if (!finite(z[i])) continue; 426 433 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 427 434 buffer->bColor_R = pixel1[pixel]; … … 445 452 { 446 453 if (scaleColor) { 454 if (!finite(z[i])) continue; 447 455 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 448 456 buffer->bColor_R = pixel1[pixel]; … … 464 472 { 465 473 if (scaleColor) { 474 if (!finite(z[i])) continue; 466 475 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 467 476 buffer->bColor_R = pixel1[pixel]; … … 487 496 { 488 497 if (scaleColor) { 498 if (!finite(z[i])) continue; 489 499 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 490 500 buffer->bColor_R = pixel1[pixel]; … … 511 521 { 512 522 if (scaleColor) { 523 if (!finite(z[i])) continue; 513 524 int pixel = MIN (graphic->Npixels - 2, MAX (0, z[i]*(graphic->Npixels - 1))); 514 525 buffer->bColor_R = pixel1[pixel]; -
trunk/Ohana/src/opihi/cmd.basic/echo.c
r14190 r32346 3 3 int echo (int argc, char **argv) { 4 4 5 int i; 5 int i, N, RETURN_CHAR; 6 7 RETURN_CHAR = TRUE; 8 if ((N = get_argument (argc, argv, "-no-return"))) { 9 remove_argument (N, &argc, argv); 10 RETURN_CHAR = FALSE; 11 } 6 12 7 13 for (i = 1; i < argc - 1; i++) { … … 9 15 } 10 16 if (argc >= 2) { 17 if (RETURN_CHAR) { 11 18 gprint (GP_LOG, "%s\n", argv[argc - 1]); 19 } else { 20 gprint (GP_LOG, "%s", argv[argc - 1]); 21 } 12 22 } 13 23 return (TRUE); -
trunk/Ohana/src/opihi/cmd.data/plot.c
r20936 r32346 53 53 return (FALSE); 54 54 } 55 if (dypvec && (dypvec->Nelements != xvec->Nelements)) goto mismatch; 56 if (dymvec && (dymvec->Nelements != xvec->Nelements)) goto mismatch; 57 if (dxpvec && (dxpvec->Nelements != xvec->Nelements)) goto mismatch; 58 if (dxmvec && (dxmvec->Nelements != xvec->Nelements)) goto mismatch; 59 55 60 Npts = xvec[0].Nelements; 56 61 if (Npts == 0) return (TRUE); … … 69 74 } 70 75 return (TRUE); 76 77 mismatch: 78 gprint (GP_ERR, "error and data vector lengths are mismatched\n"); 79 return (FALSE); 71 80 } -
trunk/Ohana/src/relastro/Makefile
r31635 r32346 62 62 $(SRC)/high_speed_objects.$(ARCH).o \ 63 63 $(SRC)/high_speed_utils.$(ARCH).o \ 64 $(SRC)/relastro_merge_source.$(ARCH).o \ 65 $(SRC)/resort_catalog.$(ARCH).o \ 64 66 $(SRC)/relastroVisual.$(ARCH).o 65 67 -
trunk/Ohana/src/relastro/include/relastro.h
r31664 r32346 15 15 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 16 16 17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED } FitTarget;17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE} FitTarget; 18 18 19 19 typedef struct { … … 94 94 char SKY_TABLE[256]; 95 95 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 96 97 unsigned int OBJ_ID_SRC; 98 unsigned int CAT_ID_SRC; 99 unsigned int OBJ_ID_DST; 100 unsigned int CAT_ID_DST; 96 101 97 102 double SIGMA_LIM; … … 210 215 void getfullregion PROTO((Image *image, off_t Nimage, GSCRegion *fullregion)); 211 216 Image *getimage PROTO((off_t N)); 212 Image *getimages PROTO((off_t *N ));217 Image *getimages PROTO((off_t *N, off_t **line_number)); 213 218 void global_stats PROTO((Catalog *catalog, int Ncatalog)); 214 219 void initGrid PROTO((int dX, int dY)); 215 220 void initGridBins PROTO((Catalog *catalog, int Ncatalog)); 216 221 void initImageBins PROTO((Catalog *catalog, int Ncatalog, int FULLINIT)); 217 void initImages PROTO((Image *input, off_t N));222 void initImages PROTO((Image *input, off_t *line_number, off_t N)); 218 223 void initMosaicBins PROTO((Catalog *catalog, int Ncatalog)); 219 224 void initMosaicGrid PROTO((Image *image, off_t Nimage)); … … 372 377 int applyConstraintsB(Catalog *catalog, off_t i); 373 378 void setupAreaSelection(SkyRegion *region); 379 380 int relastro_merge_source (); 381 void resort_catalog (Catalog *catalog); -
trunk/Ohana/src/relastro/src/CoordOps.c
r27581 r32346 13 13 Image *images; 14 14 15 images = getimages (&N );15 images = getimages (&N, NULL); 16 16 17 17 NoldCoords = N; -
trunk/Ohana/src/relastro/src/FitPM.c
r17210 r32346 73 73 chisq = 0.0; 74 74 for (i = 0; i < Npts; i++) { 75 Xf = fit[0].Ro + fit[0].uR*T[i];76 Yf = fit[0].Do + fit[0].uD*T[i];77 chisq += SQ(X[i] - Xf) / SQ(dX[i]);78 chisq += SQ(Y[i] - Yf) / SQ(dY[i]);75 Xf = fit[0].Ro + fit[0].uR*T[i]; 76 Yf = fit[0].Do + fit[0].uD*T[i]; 77 chisq += SQ(X[i] - Xf) / SQ(dX[i]); 78 chisq += SQ(Y[i] - Yf) / SQ(dY[i]); 79 79 } 80 80 fit[0].Nfit = Npts; -
trunk/Ohana/src/relastro/src/FitPMandPar.c
r16060 r32346 9 9 double wx, wy, Wx, Wy, Tx, Ty, Tx2, Ty2, Xs, Ys, XT, YT; 10 10 double PR, PD, PRT, PDT, PRX, PDY, PR2, PD2; 11 double chisq, Xf, Yf; 11 12 12 13 A = array_init (5, 5); … … 95 96 /* get the chisq from the matrix values */ 96 97 98 // add up the chi square for the fit 99 chisq = 0.0; 100 for (i = 0; i < Npts; i++) { 101 Xf = fit[0].Ro + fit[0].uR*T[i] + fit[0].dp*pR[i]; 102 Yf = fit[0].Do + fit[0].uD*T[i] + fit[0].dp*pD[i]; 103 chisq += SQ(X[i] - Xf) / SQ(dX[i]); 104 chisq += SQ(Y[i] - Yf) / SQ(dY[i]); 105 } 106 fit[0].Nfit = Npts; 107 108 // the reduced chisq is divided by (Ndof = 2*Npts - 5) 109 fit[0].chisq = chisq / (2.0*Npts - 5.0); 97 110 return (TRUE); 98 111 } -
trunk/Ohana/src/relastro/src/FixProblemImages.c
r27581 r32346 15 15 ALLOCATE (sublist.filename, char *, 1); 16 16 17 image = getimages (&Nimage );17 image = getimages (&Nimage, NULL); 18 18 19 19 Nbad = 0; -
trunk/Ohana/src/relastro/src/ImageOps.c
r31664 r32346 11 11 static Image *image; // list of available images 12 12 static off_t Nimage; // number of available images 13 static off_t *LineNumber; // match of subset to full image table 13 14 14 15 static int *Ncatlist; // catalogs associated with each image … … 27 28 # endif 28 29 29 Image *getimages (off_t *N) { 30 Image *getimages (off_t *N, off_t **line_number) { 31 30 32 *N = Nimage; 33 if (line_number) *line_number = LineNumber; 31 34 return (image); 32 35 } … … 42 45 } 43 46 44 void initImages (Image *input, off_t N) {47 void initImages (Image *input, off_t *line_number, off_t N) { 45 48 46 49 off_t i; 47 50 48 51 image = input; 52 LineNumber = line_number; 49 53 Nimage = N; 50 54 -
trunk/Ohana/src/relastro/src/StarMaps.c
r30616 r32346 40 40 off_t i, Nimages; 41 41 42 images = getimages(&Nimages );42 images = getimages(&Nimages, NULL); 43 43 44 44 ALLOCATE (starmap, StarMap, Nimages); … … 64 64 gettimeofday (&start, (void *) NULL); 65 65 66 images = getimages(&Nimages );66 images = getimages(&Nimages, NULL); 67 67 68 68 for (i = 0; i < catalog[0].Nmeasure; i++) { … … 90 90 int ix, iy; 91 91 92 images = getimages(&Nimages );92 images = getimages(&Nimages, NULL); 93 93 94 94 for (i = 0; i < Nimages; i++) { … … 129 129 double L, M, dLmax, dMmax; 130 130 131 images = getimages(&Nimages );131 images = getimages(&Nimages, NULL); 132 132 133 133 dLmax = dMmax = 0.0; -
trunk/Ohana/src/relastro/src/UpdateChips.c
r30616 r32346 18 18 Nskip = Nmosaic = NnewFit = NoldFit = 0; 19 19 20 image = getimages (&Nimage );20 image = getimages (&Nimage, NULL); 21 21 22 22 // save fit results for summary plot -
trunk/Ohana/src/relastro/src/UpdateMeasures.c
r29001 r32346 13 13 ID_IMAGE_ASTROM_FEW; 14 14 15 image = getimages (&Nimage );15 image = getimages (&Nimage, NULL); 16 16 17 17 for (i = 0; i < Nimage; i++) { -
trunk/Ohana/src/relastro/src/UpdateObjects.c
r31450 r32346 196 196 } 197 197 198 XVERB = FALSE &&(catalog[i].measure[m].dM < 0.01) && (N == 6) && (mode == FIT_PM_ONLY);198 XVERB = (catalog[i].measure[m].dM < 0.01) && (N == 6) && (mode == FIT_PM_ONLY); 199 199 200 200 // to judge the quality of the PM and PAR fits, we need to fit all three models and compare Chisq … … 225 225 226 226 if (mode == FIT_PM_AND_PAR) { 227 fprintf (stderr, "parallax fitting is still untested (%s, %d)", __FILE__, __LINE__); 228 exit (2); 227 // fprintf (stderr, "parallax fitting is still untested (%s, %d)\n", __FILE__, __LINE__); 229 228 230 229 for (k = 0; k < N; k++) { -
trunk/Ohana/src/relastro/src/UpdateSimple.c
r27581 r32346 8 8 StarData *raw, *ref; 9 9 10 image = getimages (&Nimage );10 image = getimages (&Nimage, NULL); 11 11 12 12 for (i = 0; i < Nimage; i++) { -
trunk/Ohana/src/relastro/src/args.c
r31664 r32346 1 1 # include "relastro.h" 2 2 void usage (void); 3 void usage_merge_source (void); 4 void usage_merge_source_id (char *name); 3 5 4 6 int args (int argc, char **argv) { … … 6 8 int N; 7 9 double trange; 10 char *endptr; 8 11 9 12 /* possible operations */ 10 13 FIT_TARGET = TARGET_NONE; 11 14 FIT_MODE = FIT_AVERAGE; 15 16 if ((N = get_argument (argc, argv, "-merge-source"))) { 17 if (N > argc - 6) usage_merge_source(); 18 if (strcmp(argv[N+3], "into")) usage_merge_source(); 19 FIT_TARGET = TARGET_MERGE_SOURCE; 20 remove_argument (N, &argc, argv); 21 OBJ_ID_SRC = strtol(argv[N], &endptr, 0); 22 if (*endptr) usage_merge_source_id (argv[N]); 23 remove_argument (N, &argc, argv); 24 CAT_ID_SRC = strtol(argv[N], &endptr, 0); 25 if (*endptr) usage_merge_source_id (argv[N]); 26 remove_argument (N, &argc, argv); 27 remove_argument (N, &argc, argv); // remove the 'into' 28 OBJ_ID_DST = strtol(argv[N], &endptr, 0); 29 if (*endptr) usage_merge_source_id (argv[N]); 30 remove_argument (N, &argc, argv); 31 CAT_ID_DST = strtol(argv[N], &endptr, 0); 32 if (*endptr) usage_merge_source_id (argv[N]); 33 remove_argument (N, &argc, argv); 34 35 if (argc != 1) usage (); 36 return TRUE; 37 } 38 12 39 if ((N = get_argument (argc, argv, "-update-objects"))) { 13 40 remove_argument (N, &argc, argv); … … 307 334 fprintf (stderr, "ERROR: USAGE: relastro -region RA RA DEC DEC\n"); 308 335 fprintf (stderr, " OR: relastro -catalog (ra) (dec)\n\n"); 336 fprintf (stderr, " OR: relastro -high-speed [options]\n\n"); 337 fprintf (stderr, " OR: relastro -merge-source [options]\n\n"); 309 338 fprintf (stderr, " specify one of the following modes: \n"); 310 339 fprintf (stderr, " -update-objects\n"); … … 340 369 } 341 370 371 void usage_merge_source_id (char *name) { 372 373 fprintf (stderr, "ERROR: invalid ID %s (remember to prefix 0x to hex IDs)\n", name); 374 exit (2); 375 } 376 377 void usage_merge_source () { 378 fprintf (stderr, "ERROR: USAGE: relastro -merge-source (objID) (catID) into (objID) (catID)\n"); 379 exit (2); 380 } -
trunk/Ohana/src/relastro/src/initialize.c
r31635 r32346 10 10 ConfigInit (&argc, argv); 11 11 args (argc, argv); 12 13 if (FIT_TARGET == TARGET_MERGE_SOURCE) return; 12 14 13 15 /* build a list of accepted photcodes. these will be used by bcatalog to accept or -
trunk/Ohana/src/relastro/src/load_images.c
r31664 r32346 44 44 MARKTIME(" select images: %f sec\n", dtime); 45 45 46 // generate db->vtable from db->ftable based on the selection 47 // XXX does this simply duplicate the memory needlessly? we recreate these lines 48 // in reload_images. If we had saved the line numbers, we could avoid this 49 // vtable points *another* copy of the subset rows 50 // (the later call to 'reload_images' copies the subset elements back on top of 51 // the rows of the vtable) 52 // gfits_vtable_from_ftable (&db[0].ftable, &db[0].vtable, LineNumber, Nsubset); 53 // MARKTIME("converted ftable to vtable: %f sec\n", dtime); 54 55 initImages (subset, Nsubset); 46 initImages (subset, LineNumber, Nsubset); 56 47 MARKTIME(" init images: %f sec\n", dtime); 57 48 … … 68 59 69 60 Image *image; 70 off_t Nimage, Nx, i ;61 off_t Nimage, Nx, i, *LineNumber; 71 62 VTable *vtable; 72 63 73 image = getimages (&Nimage );64 image = getimages (&Nimage, &LineNumber); 74 65 66 gfits_vtable_from_ftable (&db[0].ftable, &db[0].vtable, LineNumber, Nimage); 75 67 vtable = &db[0].vtable; 76 68 -
trunk/Ohana/src/relastro/src/relastro.c
r30616 r32346 23 23 if (FIT_TARGET == TARGET_HIGH_SPEED) { 24 24 high_speed_catalogs (); 25 exit (0); 26 } 27 28 /* the object analysis is a separate process iterating over catalogs */ 29 if (FIT_TARGET == TARGET_MERGE_SOURCE) { 30 relastro_merge_source (); 25 31 exit (0); 26 32 } -
trunk/Ohana/src/relphot/src/load_images.c
r31668 r32346 85 85 } 86 86 87 88 // generate db->vtable from db->ftable based on the selection89 // XXX does this simply duplicate the memory needlessly? we recreate these lines90 // in reload_images. If we had saved the line numbers, we could avoid this91 // vtable points *another* copy of the subset rows92 // (the later call to 'reload_images' copies the subset elements back on top of93 // the rows of the vtable)94 // gfits_vtable_from_ftable (&db[0].ftable, &db[0].vtable, LineNumber, Nsubset);95 // MARKTIME("converted ftable to vtable: %f sec\n", dtime);96 97 87 // save the subset of images in the static reference in ImageOps, set up indexes 98 88 initImages (subset, LineNumber, Nsubset);
Note:
See TracChangeset
for help on using the changeset viewer.
