Changeset 6763
- Timestamp:
- Apr 4, 2006, 8:58:12 AM (20 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 1 added
- 6 edited
-
Makefile (modified) (1 diff)
-
doc/notes.txt (modified) (1 diff)
-
include/addstar.h (modified) (4 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/addstar.c (modified) (3 diffs)
-
src/args.c (modified) (2 diffs)
-
src/fakeimage.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/Makefile
r6675 r6763 35 35 $(SRC)/find_matches_refstars.$(ARCH).o \ 36 36 $(SRC)/find_subset.$(ARCH).o \ 37 $(SRC)/fakeimage.$(ARCH).o \ 37 38 $(SRC)/gcatalog.$(ARCH).o \ 38 39 $(SRC)/get2mass.$(ARCH).o \ -
trunk/Ohana/src/addstar/doc/notes.txt
r5448 r6763 1 2 2006.04.02 3 4 I am considering an option to insert fake camera images into the 5 database. The camera would be described with a file specifying the 6 dimensions of each chip (Nx,Ny,pixel scale), the location of each 7 chip in the focal plane, and the optical parameters of the camera 8 (plate scale at center, x,y distortion terms). Each call to addstar 9 would specify the boresite center: 10 11 addstar -fakeimage ra dec theta 12 13 the camera parameters should be loaded via the config information. 1 14 2 15 2005.10.24 -
trunk/Ohana/src/addstar/include/addstar.h
r6683 r6763 33 33 typedef struct sockaddr_in SockAddress; 34 34 35 enum {M_IMAGE, M_REFLIST, M_REFCAT };35 enum {M_IMAGE, M_REFLIST, M_REFCAT, M_FAKEIMAGE}; 36 36 37 37 /* global which define database info / data sources (KEEP) */ … … 53 53 char SKY_TABLE[256]; 54 54 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 55 char CameraLayout[256]; 55 56 SkyTable *ServerSky; 56 57 … … 81 82 double Latitude; // carried into image structure from config 82 83 Coords *MOSAIC; // carries the mosaic into gstars 84 double FAKE_RA; // boresite coords for fake images 85 double FAKE_DEC; // boresite coords for fake images 86 double FAKE_THETA; // boresite angle for fake images 83 87 84 88 /* these globals are used separately by both client and server (KEEP) */ … … 118 122 int dump_rawstars PROTO((Stars *stars, int Nstars)); 119 123 int edge_check PROTO((double *x1, double *y1, double *x2, double *y2)); 124 Image *fakeimage PROTO((char *rootname, int *Nimage, int photcode)); 120 125 void find_matches PROTO((SkyRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options)); 121 126 void find_matches_closest PROTO((SkyRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap, Coords *mosaic, AddstarClientOptions options)); -
trunk/Ohana/src/addstar/src/ConfigInit.c
r6684 r6763 75 75 /* dropped: ScanConfig (config, "IMAGE_CATALOG", "%s", 0, ImageCat); */ 76 76 77 ScanConfig (config, "CAMERA_LAYOUT", "%s", 0, CameraLayout); 77 78 78 79 /* used by client/server setup */ -
trunk/Ohana/src/addstar/src/addstar.c
r6684 r6763 4 4 5 5 int Nm, Na, Ns, status; 6 int i, Nstars, N overlap, Nsubset, Naverage, Nmeasure;6 int i, Nstars, Nimage, Noverlap, Nsubset, Naverage, Nmeasure; 7 7 Stars *stars, **subset; 8 Image image, * overlap;8 Image image, *imageSet, *overlap; 9 9 Catalog catalog; 10 10 FITS_DB db; … … 54 54 skylist = SkyListByPatch (sky, -1, &UserPatch); 55 55 break; 56 case M_FAKEIMAGE: 57 imageSet = fakeimage (argv[1], &Nimage, options.photcode); 58 RegisterMosaic (MOSAIC); 59 60 if (db.dbstate == LCK_EMPTY) { 61 create_image_db (&db); 62 } else { 63 if (!dvo_image_load (&db, VERBOSE, FORCE_READ)) { 64 Shutdown ("can't read image catalog %s", db.filename); 65 } 66 } 67 68 dvo_image_addrows (&db, imageSet, Nimage); 69 SetProtect (TRUE); 70 dvo_image_update (&db, VERBOSE); 71 SetProtect (FALSE); 72 73 ohana_memcheck (FALSE); 74 dvo_image_unlock (&db); /* unlock? */ 75 76 gettimeofday (&stop, NULL); 77 dtime = DTIME (stop, start); 78 fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for fake image\n", dtime); 79 exit (0); 56 80 } 57 81 if (options.only_match || options.existing_regions) { … … 63 87 if (VERBOSE) fprintf (stderr, "writing to %d regions\n", skylist[0].Nregions); 64 88 89 /* XXX clean this up a bit : for only_image, I don't need to do this loop 90 unless we are getting the calibration. */ 65 91 Naverage = Nmeasure = 0; 66 92 for (i = 0; i < skylist[0].Nregions; i++) { -
trunk/Ohana/src/addstar/src/args.c
r6684 r6763 23 23 if ((N = get_argument (argc, argv, "-cat"))) { 24 24 options.mode = M_REFCAT; 25 remove_argument (N, &argc, argv); 26 } 27 if ((N = get_argument (argc, argv, "-fakeimage"))) { 28 options.mode = M_FAKEIMAGE; 29 remove_argument (N, &argc, argv); 30 FAKE_RA = atof (argv[N]); 31 remove_argument (N, &argc, argv); 32 FAKE_DEC = atof (argv[N]); 33 remove_argument (N, &argc, argv); 34 FAKE_THETA = atof (argv[N]); 25 35 remove_argument (N, &argc, argv); 26 36 } … … 241 251 fprintf (stderr, "USAGE: addstar -cat (catalog)\n"); 242 252 fprintf (stderr, "USAGE: addstar -ref (filename)\n"); 253 fprintf (stderr, "USAGE: addstar -fakeimage (ra) (dec) (theta) (name)\n"); 243 254 exit (2); 244 255 }
Note:
See TracChangeset
for help on using the changeset viewer.
