Changeset 3402
- Timestamp:
- Mar 9, 2005, 9:23:49 PM (21 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 10 edited
-
addstar/Makefile (modified) (3 diffs)
-
addstar/include/addstar.h (modified) (1 diff)
-
addstar/src/addstar.c (modified) (1 diff)
-
addstar/src/args.c (modified) (1 diff)
-
addstar/src/gstars.c (modified) (2 diffs)
-
libohana/include/loneos.h (modified) (1 diff)
-
libohana/src/mosaic_astrom.c (modified) (1 diff)
-
opihi/dvo/ImageOps.c (modified) (2 diffs)
-
opihi/dvo/LoadImages.c (modified) (3 diffs)
-
opihi/dvo/images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/Makefile
r3389 r3402 1 #install:2 # @echo "addstar under re-construction"3 1 default: addstar 4 2 help: … … 31 29 $(SRC)/ConfigInit.$(ARCH).o \ 32 30 $(SRC)/conversions.$(ARCH).o \ 31 $(SRC)/dump.$(ARCH).o \ 33 32 $(SRC)/edge_check.$(ARCH).o \ 34 33 $(SRC)/find_matches.$(ARCH).o \ … … 112 111 # utilities ################################################# 113 112 114 #install:113 install: 115 114 for i in $(INSTALL); do make $$i.install; done 116 115 -
trunk/Ohana/src/addstar/include/addstar.h
r3400 r3402 87 87 88 88 int MODE; 89 char *DUMP; 89 90 90 91 time_t TIMEREF; -
trunk/Ohana/src/addstar/src/addstar.c
r3376 r3402 24 24 case M_IMAGE: 25 25 stars = gstars (argv[1], &Nstars, &image); 26 if ((DUMP != NULL) && !strcmp (DUMP, "rawstars")) dump_rawstars (stars, Nstars); 26 27 regions = gregion_image (&image, &Nregions); 27 28 overlap = gimages (&image, &Noverlap); -
trunk/Ohana/src/addstar/src/args.c
r3389 r3402 149 149 remove_argument (N, &argc, argv); 150 150 } 151 DUMP = NULL; 152 if ((N = get_argument (argc, argv, "-dump"))) { 153 remove_argument (N, &argc, argv); 154 DUMP = strcreate(argv[N]); 155 remove_argument (N, &argc, argv); 156 } 151 157 152 158 if (argc != 2) { -
trunk/Ohana/src/addstar/src/gstars.c
r3389 r3402 44 44 exit (1); 45 45 } 46 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;47 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;48 46 itmp = 0; 49 47 fits_scan (&header, "NASTRO", "%d", 1, &itmp); … … 58 56 } 59 57 RegisterMosaic (MOSAIC); 60 } 58 } else { 59 /* force image to lie in 0-360 range */ 60 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0; 61 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0; 62 } 61 63 62 64 /* get ST (used for airmass calculation) */ -
trunk/Ohana/src/libohana/include/loneos.h
r3400 r3402 413 413 void RegisterMosaic (Coords *coords); 414 414 void coords_precess (double *ra, double *dec, double in_epoch, double out_epoch); 415 int FindMosaicForImage (Image *images, int Nimages, int entry); 416 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry); 417 int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry); 418 int BuildChipMatch (Image *images, int Nimages); 415 419 416 420 int FindMosaicForImage (Image *images, int Nimages, int entry); -
trunk/Ohana/src/libohana/src/mosaic_astrom.c
r3389 r3402 117 117 118 118 got_match: 119 ChipMatch[i] = j;119 continue; 120 120 } 121 121 return (TRUE); -
trunk/Ohana/src/opihi/dvo/ImageOps.c
r3393 r3402 44 44 while (flipped && (r > Rmid)) r-= 360.0; 45 45 status = RD_to_XY (&X, &Y, r, d, &graph[0].coords); 46 47 46 if (!status) continue; 48 47 if (X < graph[0].xmin) continue; … … 50 49 if (Y < graph[0].ymin) continue; 51 50 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); 57 } 58 break; 51 goto in_region; 52 /** we miss any images which surround the region. we are also 53 missing the DIS images for which the corners don't touch 54 the region, but which are needed for WRP images with 55 corners touching the region **/ 59 56 } 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 **/ 57 continue; 58 } 59 in_region: 60 subset[n] = i; 61 n++; 62 if (n > npts - 1) { 63 npts += 200; 64 REALLOCATE (subset, int, npts); 64 65 } 65 66 } -
trunk/Ohana/src/opihi/dvo/LoadImages.c
r3393 r3402 1 1 # include "dvo.h" 2 2 3 Image *LoadImages (int * Nimage) {3 Image *LoadImages (int *nimage) { 4 4 5 5 char filename[256]; 6 int nimage, NIMAGE;6 int Nimage, NIMAGE; 7 7 FILE *f; 8 8 Header header; … … 11 11 VarConfig ("IMAGE_CATALOG", "%s", filename); 12 12 13 *nimage = 0; 13 14 NIMAGE = 0; 14 15 Nimage = 0; … … 37 38 ALLOCATE (image, Image, NIMAGE); 38 39 fseek (f, header.size, SEEK_SET); 39 nimage = Fread (image, sizeof(Image), NIMAGE, f, "image");40 if ( nimage != NIMAGE) {41 fprintf (stderr, "failed to read in all images (%d of %d)\n", nimage, NIMAGE);40 Nimage = Fread (image, sizeof(Image), NIMAGE, f, "image"); 41 if (Nimage != NIMAGE) { 42 fprintf (stderr, "failed to read in all images (%d of %d)\n", Nimage, NIMAGE); 42 43 } 43 44 44 45 fclose (f); 45 * Nimage = nimage;46 *nimage = Nimage; 46 47 return (image); 47 48 } -
trunk/Ohana/src/opihi/dvo/images.c
r3393 r3402 86 86 87 87 /* project this image to screen display coords */ 88 x[0] = 0; y[0] = 0; 89 x[1] = image[i].NX; y[1] = 0; 90 x[2] = image[i].NX; y[2] = image[i].NY; 91 x[3] = 0; y[3] = image[i].NY; 88 /* DIS images represent a field, not a chip */ 89 if (!strcmp(&image[i].coords.ctype[4], "-DIS")) { 90 x[0] = -0.5*image[i].NX; y[0] = -0.5*image[i].NY; 91 x[1] = +0.5*image[i].NX; y[1] = -0.5*image[i].NY; 92 x[2] = +0.5*image[i].NX; y[2] = +0.5*image[i].NY; 93 x[3] = -0.5*image[i].NX; y[3] = +0.5*image[i].NY; 94 } else { 95 x[0] = 0; y[0] = 0; 96 x[1] = image[i].NX; y[1] = 0; 97 x[2] = image[i].NX; y[2] = image[i].NY; 98 x[3] = 0; y[3] = image[i].NY; 99 } 92 100 status = FALSE; 93 101
Note:
See TracChangeset
for help on using the changeset viewer.
