Changeset 3393
- Timestamp:
- Mar 7, 2005, 10:21:59 PM (21 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 16 edited
-
cmd.astro/coords.c (modified) (4 diffs)
-
cmd.astro/drizzle.c (modified) (1 diff)
-
dvo/ImageOps.c (modified) (5 diffs)
-
dvo/LoadImages.c (modified) (3 diffs)
-
dvo/avextract.c (modified) (2 diffs)
-
dvo/dvomisc.c (modified) (1 diff)
-
dvo/gimages.c (modified) (2 diffs)
-
dvo/images.c (modified) (2 diffs)
-
dvo/imdata.c (modified) (3 diffs)
-
dvo/imdense.c (modified) (2 diffs)
-
dvo/imextract.c (modified) (3 diffs)
-
dvo/imlist.c (modified) (2 diffs)
-
dvo/imphot.c (modified) (1 diff)
-
dvo/imstats.c (modified) (2 diffs)
-
dvo/photometry.c (modified) (12 diffs)
-
dvo/subpix.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/coords.c
r2843 r3393 1 1 # include "astro.h" 2 3 enum {NONE, SKY, PIXEL}; 2 4 3 5 int coords (int argc, char **argv) { … … 5 7 int mode, N; 6 8 double X, Y, R, D; 7 Coords coords; 8 Buffer *buf; 9 char *MOSAIC; 10 Coords coords, moscoords; 11 Buffer *buf, *mosbuffer; 9 12 10 mode = 0; 13 MOSAIC = NULL; 14 if ((N = get_argument (argc, argv, "-mosaic"))) { 15 remove_argument (N, &argc, argv); 16 MOSAIC = strcreate (argv[N]); 17 remove_argument (N, &argc, argv); 18 } 19 20 mode = NONE; 11 21 if ((N = get_argument (argc, argv, "-p"))) { 12 22 remove_argument (N, &argc, argv); … … 15 25 Y = atof(argv[N]); 16 26 remove_argument (N, &argc, argv); 17 mode = 1;27 mode = SKY; 18 28 } 19 29 if ((N = get_argument (argc, argv, "-c"))) { 20 if (mode == 1) { 21 fprintf (stderr, "only one of -p or -c can be used\n"); 22 return (FALSE); 23 } 30 if (mode == SKY) goto syntax; 24 31 remove_argument (N, &argc, argv); 25 32 R = atof(argv[N]); … … 27 34 D = atof(argv[N]); 28 35 remove_argument (N, &argc, argv); 29 mode = 2;36 mode = PIXEL; 30 37 } 31 if ((mode == 0) || (argc != 2)) { 32 fprintf (stderr, "USAGE: coords [buffer] (-c R D) / (-p X Y)\n"); 33 return (FALSE); 34 } 38 if (mode == NONE) goto syntax; 39 if (argc != 2) goto syntax; 35 40 36 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);41 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) goto escape; 37 42 GetCoords (&coords, &buf[0].header); 43 if (strcmp(&coords.ctype[4], "-WRP")) { 44 if (MOSAIC == NULL) { 45 fprintf (stderr, "must supply mosaic for WRP coords\n"); 46 return (FALSE); 47 } 48 if ((mosbuffer = SelectBuffer (MOSAIC, OLDBUFFER, TRUE)) == NULL) goto escape; 49 GetCoords (&moscoords, &mosbuffer[0].header); 50 RegisterMosaic (&moscoords); 51 } 38 52 39 if (mode == 1) {53 if (mode == SKY) { 40 54 XY_to_RD (&R, &D, X, Y, &coords); 41 55 fprintf (stderr, "%10.6f %10.6f\n", R, D); 42 56 set_variable ("RA", R); 43 57 set_variable ("DEC", D); 58 return (TRUE); 44 59 } 45 60 46 if (mode == 2) {61 if (mode == PIXEL) { 47 62 RD_to_XY (&X, &Y, R, D, &coords); 48 63 fprintf (stderr, "%7.2f %7.2f\n", X, Y); 49 64 set_variable ("Xc", X); 50 65 set_variable ("Yc", Y); 66 return (TRUE); 51 67 } 68 return (FALSE); 52 69 53 return (TRUE); 54 70 syntax: 71 fprintf (stderr, "USAGE: coords [buffer] (-c R D) / (-p X Y)\n"); 72 fprintf (stderr, "only one of -p or -c can be used\n"); 73 escape: 74 if (MOSAIC != NULL) free (MOSAIC); 75 return (FALSE); 55 76 } -
trunk/Ohana/src/opihi/cmd.astro/drizzle.c
r2843 r3393 1 1 # include "astro.h" 2 3 /*** needs mosaic astrometry ***/ 2 4 3 5 static double XO, XX, XY; -
trunk/Ohana/src/opihi/dvo/ImageOps.c
r2598 r3393 9 9 int *subset; 10 10 int N, n, npts; 11 double r, d, x[4], y[4], Rmin, Rmax, Rmid; 12 double X[8], Y[8]; 11 double r, d, X, Y, x[4], y[4], Rmin, Rmax, Rmid; 13 12 14 13 if (RegionSelect) { … … 16 15 Rmax = graph[0].coords.crval1 + 182.0; 17 16 Rmid = 0.5*(Rmin + Rmax); 17 BuildChipMatch (image, Nimage); 18 18 } 19 19 … … 22 22 trange = fabs (trange); 23 23 } 24 status = InPic = TRUE; 24 25 25 npts = 200; 26 26 ALLOCATE (subset, int, npts); … … 29 29 if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue; 30 30 if (RegionSelect) { 31 if (!FindMosaicForImage (image, Nimage, i)) continue; 31 32 /* project this image to screen display coords */ 32 33 x[0] = 0; y[0] = 0; … … 34 35 x[2] = image[i].NX; y[2] = image[i].NY; 35 36 x[3] = 0; y[3] = image[i].NY; 36 status = FALSE; 37 flipped = FALSE; 37 InPic = flipped = FALSE; 38 38 for (j = 0; j < 4; j++) { 39 39 XY_to_RD (&r, &d, x[j], y[j], &image[i].coords); 40 while ((j == 0) && (r < Rmin)) { flipped = TRUE; r += 360.0; } 41 while ((j == 0) && (r > Rmax)) { flipped = TRUE; r -= 360.0; } 42 if ((j > 0) && flipped) { 43 while (r < Rmid) r+= 360.0; 44 while (r > Rmid) r-= 360.0; 40 /* use same side of 0,360 boundary for all corners */ 41 if ((j == 0) && (r < Rmin)) flipped = TRUE; 42 if ((j == 0) && (r > Rmax)) flipped = TRUE; 43 while (flipped && (r < Rmid)) r+= 360.0; 44 while (flipped && (r > Rmid)) r-= 360.0; 45 status = RD_to_XY (&X, &Y, r, d, &graph[0].coords); 46 47 if (!status) continue; 48 if (X < graph[0].xmin) continue; 49 if (X > graph[0].xmax) continue; 50 if (Y < graph[0].ymin) continue; 51 if (Y > graph[0].ymax) continue; 52 subset[n] = i; 53 n++; 54 if (n > npts - 1) { 55 npts += 200; 56 REALLOCATE (subset, int, npts); 45 57 } 46 status |= RD_to_XY (&X[2*j], &Y[2*j], r, d, &graph[0].coords); 47 if (j > 0) { 48 X[2*j - 1] = X[2*j]; 49 Y[2*j - 1] = Y[2*j]; 50 } 58 break; 51 59 } 52 X[7] = X[0]; 53 Y[7] = Y[0]; 54 InPic = FALSE; 55 for (j = 0; status && (j < 8); j+=2) { 56 if ((X[j] >= graph[0].xmin) && 57 (X[j] <= graph[0].xmax) && 58 (Y[j] >= graph[0].ymin) && 59 (Y[j] <= graph[0].ymax)) 60 InPic = TRUE; 61 } 62 } 63 if (InPic && status) { 64 subset[n] = i; 65 n++; 66 if (n > npts - 1) { 67 npts += 200; 68 REALLOCATE (subset, int, npts); 69 } 60 /** we miss any images which surround the region. we are also 61 missing the DIS images for which the corners don't touch 62 the region, but which are needed for WRP images with 63 corners touching the region **/ 70 64 } 71 65 } -
trunk/Ohana/src/opihi/dvo/LoadImages.c
r2598 r3393 11 11 VarConfig ("IMAGE_CATALOG", "%s", filename); 12 12 13 NIMAGE = 0; 14 Nimage = 0; 15 image = NULL; 16 13 17 /* check if image datafile exists, get header */ 14 18 if (!fits_read_header (filename, &header)) { 15 19 fprintf (stderr, "No available image catalog %s (1)\n", filename); 16 *Nimage = 0; 17 return ((Image *) NULL); 20 return (NULL); 21 } 22 23 fits_scan (&header, "NIMAGES", "%d", 1, &NIMAGE); 24 if (NIMAGE == 0) { 25 fprintf (stderr, "no images found\n"); 26 return (NULL); 18 27 } 19 28 … … 23 32 fprintf (stderr, "No available image catalog: %s (2)\n", filename); 24 33 free (header.buffer); 25 *Nimage = 0; 26 return ((Image *) NULL); 27 } 28 29 NIMAGE = 0; 30 fits_scan (&header, "NIMAGES", "%d", 1, &NIMAGE); 31 if (NIMAGE == 0) { 32 fprintf (stderr, "no images found\n"); 33 *Nimage = NIMAGE; 34 fclose (f); 35 return ((Image *) NULL); 34 return (NULL); 36 35 } 37 36 … … 46 45 *Nimage = nimage; 47 46 return (image); 48 49 50 47 } 51 -
trunk/Ohana/src/opihi/dvo/avextract.c
r2598 r3393 62 62 if ((vec = SelectVector (argv[2], ANYVECTOR, TRUE)) == NULL) goto escape; 63 63 64 /* need valid code for some params: */64 /* Need valid code for some params: */ 65 65 switch (param) { 66 66 case AVE_MAG: … … 84 84 regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions); 85 85 if (!SetImageSelection (param, &graphsky, TRUE)) goto escape; 86 /* this is not really used by avextract -- no parameters require images */ 86 87 } else { 87 88 Nregions = 1; -
trunk/Ohana/src/opihi/dvo/dvomisc.c
r2598 r3393 70 70 } 71 71 72 /** this does not seem to be used at the moment */ 72 73 /* values are ave[i].R, ave[i].D, ave[i].M */ 73 74 void sort_images (Image *image, int N) { -
trunk/Ohana/src/opihi/dvo/gimages.c
r2598 r3393 71 71 if (!str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE); 72 72 73 image = LoadImages (&Nimage); 74 if (Nimage == 0) { 75 return (FALSE); 76 } 73 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 77 74 image_subset (image, Nimage, &subset, &Nsubset, (Graphdata *) NULL, FALSE, tzero, trange, TimeSelect); 75 BuildChipMatch (image, Nimage); 78 76 79 77 Nfound = 0; 80 78 for (j = 0; j < Nsubset; j++) { 81 79 i = subset[j]; 82 status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords);83 if (!status || (X < 0) || (X > image[i].NX) || (Y < 0) || (Y > image[i].NY)) continue;84 XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);85 Mcal = applyMcal (&image[i], 2048.0, 2048.0);86 /* t = TimeValue (image[i].tzero, TimeReference, TimeFormat); */87 date = sec_to_date (image[i].tzero);88 80 if (PhotCodeSelect) { 89 81 if ((code[0].type == PHOT_REF) || (code[0].type == PHOT_DEP)) { … … 94 86 } 95 87 } 88 if (!FindMosaicForImage (image, Nimage, i)) continue; 89 90 status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords); 91 if (!status) continue; 92 if (X < 0) continue; 93 if (Y < 0) continue; 94 if (X > image[i].NX) continue; 95 if (Y > image[i].NY) continue; 96 97 Mcal = applyMcal (&image[i], 2048.0, 2048.0); 98 date = sec_to_date (image[i].tzero); 99 96 100 if (PixelCoords) { 97 101 fprintf (GetOutfile(), "%3d %s %6.1f %6.1f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 98 102 Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code); 99 103 } else { 104 XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 100 105 fprintf (GetOutfile(), "%3d %s %8.4f %8.4f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 101 106 Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code); -
trunk/Ohana/src/opihi/dvo/images.c
r2598 r3393 68 68 } 69 69 70 image = LoadImages (&Nimage); 71 if (Nimage == 0) { 72 return (TRUE); 73 } 70 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 71 BuildChipMatch (image, Nimage); 74 72 75 73 Rmin = graphmode.coords.crval1 - 180.0; … … 85 83 if (ByName && strcmp (name, image[i].name)) continue; 86 84 if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue; 85 if (!FindMosaicForImage (image, Nimage, i)) continue; 86 87 87 /* project this image to screen display coords */ 88 88 x[0] = 0; y[0] = 0; -
trunk/Ohana/src/opihi/dvo/imdata.c
r2598 r3393 4 4 int imdata (int argc, char **argv) { 5 5 6 int i, j, k ;6 int i, j, k, I; 7 7 int Nimage, N, NPTS, skip, mode, TimeSelect; 8 8 int n, Nregion, Ntregion, TimeFormat; … … 74 74 if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE); 75 75 76 image = LoadImages (&Nimage); 77 if (Nimage == 0) { 78 return (FALSE); 79 } 76 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 80 77 image_subset (image, Nimage, &subset, &Nsubset, (Graphdata *) NULL, FALSE, tzero, trange, TimeSelect); 78 BuildChipMatch (image, Nimage); 81 79 GetTimeFormat (&TimeReference, &TimeFormat); 82 80 … … 85 83 ALLOCATE (region, GSCRegion, 1); 86 84 for (i = 0; i < Nsubset; i++) { 87 tregion = get_regions (&image[subset[i]], &Ntregion); 85 I = subset[i]; 86 if (!FindMosaicForImage (image, Nimage, I)) continue; 87 tregion = get_regions (&image[I], &Ntregion); 88 88 REALLOCATE (region, GSCRegion, MAX (1, Nregion + Ntregion)); 89 89 for (j = 0; j < Ntregion; j++) { -
trunk/Ohana/src/opihi/dvo/imdense.c
r2598 r3393 20 20 if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE); 21 21 22 image = LoadImages (&Nimage); 23 if (Nimage == 0) { 24 return (FALSE); 25 } 22 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 23 BuildChipMatch (image, Nimage); 26 24 27 25 Rmin = graphmode.coords.crval1 - 182.0; … … 42 40 /* project this image to screen display coords */ 43 41 status = FALSE; 42 if (!FindMosaicForImage (image, Nimage, i)) continue; 44 43 XY_to_RD (&r, &d, x, y, &image[i].coords); 45 44 while (r < Rmin) r += 360.0; -
trunk/Ohana/src/opihi/dvo/imextract.c
r2598 r3393 97 97 if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE); 98 98 99 image = LoadImages (&Nimage); 100 if (Nimage == 0) { 101 return (FALSE); 102 } 99 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 103 100 image_subset (image, Nimage, &subset, &Nsubset, &graphsky, RegionSelect, tzero, trange, TimeSelect); 101 if ((mode == RA) || (mode == DEC)) BuildChipMatch (image, Nimage); 104 102 105 103 GetTimeFormat (&TimeReference, &TimeFormat); … … 123 121 switch (mode) { 124 122 case (RA): 123 if (!FindMosaicForImage (image, Nimage, j)) continue; 125 124 x = 0.5*image[j].NX; 126 125 y = 0.5*image[j].NY; … … 129 128 break; 130 129 case (DEC): 130 if (!FindMosaicForImage (image, Nimage, j)) continue; 131 131 x = 0.5*image[j].NX; 132 132 y = 0.5*image[j].NY; -
trunk/Ohana/src/opihi/dvo/imlist.c
r2598 r3393 64 64 } 65 65 66 image = LoadImages (&Nimage); 67 if (Nimage == 0) { 68 return (FALSE); 69 } 66 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 70 67 image_subset (image, Nimage, &subset, &Nsubset, &graphmode, RegionSelect, tzero, trange, TimeSelect); 68 BuildChipMatch (image, Nimage); 71 69 72 70 GetTimeFormat (&TimeReference, &TimeFormat); … … 82 80 } 83 81 } 82 if (!FindMosaicForImage (image, Nimage, i)) continue; 84 83 t = TimeValue (image[i].tzero, TimeReference, TimeFormat); 85 84 XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); -
trunk/Ohana/src/opihi/dvo/imphot.c
r2598 r3393 51 51 fprintf (stderr, "searching in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange); 52 52 53 image = LoadImages (&Nimage); 54 if (Nimage == 0) { 55 return (FALSE); 56 } 53 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 57 54 image_subset (image, Nimage, &subset, &Nsubset, (Graphdata *) NULL, FALSE, tzero, trange, TRUE); 58 55 -
trunk/Ohana/src/opihi/dvo/imstats.c
r2598 r3393 35 35 } 36 36 37 image = LoadImages (&Nimage); 38 if (Nimage == 0) { 39 return (FALSE); 40 } 37 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 38 BuildChipMatch (image, Nimage); 41 39 42 40 /* assign vector values */ … … 52 50 else 53 51 Yvec.elements[i] = 0.001*image[i].dMcal; 52 if (!FindMosaicForImage (image, Nimage, i)) continue; 54 53 XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 55 54 fprintf (stderr, "%d %8.4f %8.4f %10d %6d %5.3f %6.3f %6.3f\n", -
trunk/Ohana/src/opihi/dvo/photometry.c
r2598 r3393 268 268 } 269 269 270 image = LoadImages (&Nimage); 271 if (Nimage == 0) { 272 return (FALSE); 273 } 270 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 271 BuildChipMatch (image, Nimage); 274 272 image_subset (image, Nimage, &subset, &Nsubset, graphsky, RegionSelect, tzero, (double) tend - tzero, TimeSelect); 275 276 273 sort_image_subset (image, subset, Nsubset); 277 274 return (TRUE); … … 282 279 if (image != NULL) free (image); 283 280 if (subset != NULL) free (subset); 281 image = NULL; 282 subset = NULL; 284 283 return; 285 284 } … … 487 486 488 487 /* assign value */ 488 value = 0; 489 489 switch (param) { 490 490 case MEAS_MAG: /* magnitudes are already determined above */ … … 531 531 dec = average[0].D - measure[i].dD / 360000.0; 532 532 m = match_image_subset (image, subset, Nsubset, measure[i].t, measure[i].source); 533 if (m == -1) { 534 value = 0.0; 535 break; 536 } 533 if (m == -1) break; 534 if (!FindMosaicForImage (image, Nimage, m)) break; 537 535 RD_to_XY (&x, &y, ra, dec, &image[m].coords); 538 536 value = x; … … 542 540 dec = average[0].D - measure[i].dD / 360000.0; 543 541 m = match_image_subset (image, subset, Nsubset, measure[i].t, measure[i].source); 544 if (m == -1) { 545 value = 0.0; 546 break; 547 } 542 if (m == -1) break; 543 if (!FindMosaicForImage (image, Nimage, m)) break; 548 544 RD_to_XY (&x, &y, ra, dec, &image[m].coords); 549 545 value = y; … … 553 549 dec = average[0].D - measure[i].dD / 360000.0; 554 550 m = match_image_subset (image, subset, Nsubset, measure[i].t, measure[i].source); 555 if (m == -1) {556 value = 0.0; 557 break; 558 }551 if (m == -1) break; 552 /* this should use the mosaic assoicated with the image */ 553 /* the solution here depends on image.coords having crref1,2 set to match the boresite center */ 554 /* XXX set the mosaic.coords to have a unity WRP transformation in which x,y = ra,dec */ 559 555 mosaic.crval1 = image[m].coords.crval1; 560 556 mosaic.crval2 = image[m].coords.crval2; … … 566 562 dec = average[0].D - measure[i].dD / 360000.0; 567 563 m = match_image_subset (image, subset, Nsubset, measure[i].t, measure[i].source); 568 if (m == -1) { 569 value = 0.0; 570 break; 571 } 564 if (m == -1) break; 565 /* same comments as above */ 572 566 mosaic.crval1 = image[m].coords.crval1; 573 567 mosaic.crval2 = image[m].coords.crval2; … … 1008 1002 TESTMEASURE (measure[j]); 1009 1003 SETMAG(M2, measure[j], mode[1]); 1010 if (use_first) 1011 n = i; 1012 else 1013 n = j; 1004 n = (use_first) ? i : j; 1005 1014 1006 /* assign value */ 1007 value = 0; 1015 1008 switch (param) { 1016 1009 case MEAS_MAG: /* magnitudes are already determined above */ … … 1057 1050 dec = average[0].D - measure[n].dD / 360000.0; 1058 1051 m = match_image_subset (image, subset, Nsubset, measure[n].t, measure[n].source); 1059 if (m == -1) { 1060 value = 0.0; 1061 break; 1062 } 1052 if (m == -1) break; 1053 if (!FindMosaicForImage (image, Nimage, m)) break; 1063 1054 RD_to_XY (&x, &y, ra, dec, &image[m].coords); 1064 1055 value = x; … … 1068 1059 dec = average[0].D - measure[n].dD / 360000.0; 1069 1060 m = match_image_subset (image, subset, Nsubset, measure[n].t, measure[n].source); 1070 if (m == -1) { 1071 value = 0.0; 1072 break; 1073 } 1061 if (m == -1) break; 1062 if (!FindMosaicForImage (image, Nimage, m)) break; 1074 1063 RD_to_XY (&x, &y, ra, dec, &image[m].coords); 1075 1064 value = y; … … 1079 1068 dec = average[0].D - measure[n].dD / 360000.0; 1080 1069 m = match_image_subset (image, subset, Nsubset, measure[n].t, measure[n].source); 1081 if (m == -1) { 1082 value = 0.0; 1083 break; 1084 } 1070 if (m == -1) break; 1085 1071 mosaic.crval1 = image[m].coords.crval1; 1086 1072 mosaic.crval2 = image[m].coords.crval2; … … 1092 1078 dec = average[0].D - measure[n].dD / 360000.0; 1093 1079 m = match_image_subset (image, subset, Nsubset, measure[n].t, measure[n].source); 1094 if (m == -1) { 1095 value = 0.0; 1096 break; 1097 } 1080 if (m == -1) break; 1098 1081 mosaic.crval1 = image[m].coords.crval1; 1099 1082 mosaic.crval2 = image[m].coords.crval2; -
trunk/Ohana/src/opihi/dvo/subpix.c
r2598 r3393 120 120 121 121 /* load all images, extract those touching Ra, Dec */ 122 image = LoadImages (&Nimage); 122 if ((image = LoadImages (&Nimage)) == NULL) return (FALSE); 123 BuildChipMatch (image, Nimage); 124 123 125 for (i = 0; i < Nimage; i++) { 126 if (!FindMosaicForImage (image, Nimage, i)) continue; 124 127 status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords); 125 128 if (!status || (X < 0) || (X > image[i].NX) || (Y < 0) || (Y > image[i].NY)) continue; … … 137 140 for (i = 0; i < Nsub; i++) { 138 141 I = index[i]; 142 if (!FindMosaicForImage (image, Nimage, I)) continue; 139 143 Timage = image[I].tzero; 140 144 for (j = 0; j < Nmeasure; j++) {
Note:
See TracChangeset
for help on using the changeset viewer.
