Changeset 34872
- Timestamp:
- Dec 22, 2012, 3:19:47 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src
- Files:
-
- 1 added
- 7 edited
-
delstar/Makefile (modified) (2 diffs)
-
delstar/include/delstar.h (modified) (1 diff)
-
delstar/src/args.c (modified) (1 diff)
-
delstar/src/delete_photcodes_single.c (added)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/skyregion_ops.c (modified) (1 diff)
-
uniphot/src/initialize_setposangle.c (modified) (1 diff)
-
uniphot/src/update_dvo_setposangle.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/delstar/Makefile
r34749 r34872 31 31 $(SRC)/delete_image_photcodes.$(ARCH).o \ 32 32 $(SRC)/delete_photcodes.$(ARCH).o \ 33 $(SRC)/delete_photcodes_single.$(ARCH).o \ 33 34 $(SRC)/delete_times.$(ARCH).o \ 34 35 $(SRC)/gimages.$(ARCH).o \ … … 45 46 $(SRC)/args.$(ARCH).o \ 46 47 $(SRC)/delete_photcodes.$(ARCH).o \ 48 $(SRC)/delete_photcodes_single.$(ARCH).o \ 47 49 $(SRC)/Shutdown.$(ARCH).o 48 50 -
branches/eam_branches/ipp-20121219/Ohana/src/delstar/include/delstar.h
r34844 r34872 100 100 int delete_photcodes_catalog (Catalog *catalog, PhotCode **photcodes, int Nphotcodes); 101 101 int delete_image_photcodes (FITS_DB *db); 102 int delete_photcodes_single (char *cptname); -
branches/eam_branches/ipp-20121219/Ohana/src/delstar/src/args.c
r34844 r34872 169 169 goodtime: 170 170 171 if ((N = get_argument (argc, argv, "-cpt"))) { 172 remove_argument (N, &argc, argv); 173 char *filename = strcreate (argv[N]); 174 remove_argument (N, &argc, argv); 175 176 if (argc != 1) { 177 fprintf (stderr, "USAGE: delstar -cpt filename.cpt\n"); 178 exit (2); 179 } 180 181 switch (MODE) { 182 case MODE_IMAGEFILE: 183 case MODE_IMAGENAME: 184 case MODE_TIME: 185 case MODE_ORPHAN: 186 case MODE_MISSED: 187 fprintf (stderr, "mode not available for single cpt deletion\n"); 188 break; 189 case MODE_PHOTCODES: { 190 if (!delete_photcodes_single (filename)) { 191 fprintf (stderr, "failure deleting measurements\n"); 192 exit (1); 193 } 194 exit (0); 195 } 196 default: 197 usage (); 198 } 199 exit (0); 200 } 201 171 202 /* restrict to a single photcode (not compatible with -image) 172 PHOTCODE = NULL;173 if ((N = get_argument (argc, argv, "-photcode"))) {174 remove_argument (N, &argc, argv);175 PHOTCODE = GetPhotcodebyName (argv[N]);176 remove_argument (N, &argc, argv);177 }*/203 PHOTCODE = NULL; 204 if ((N = get_argument (argc, argv, "-photcode"))) { 205 remove_argument (N, &argc, argv); 206 PHOTCODE = GetPhotcodebyName (argv[N]); 207 remove_argument (N, &argc, argv); 208 }*/ 178 209 179 210 if (argc != 1) usage (); -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/include/dvo.h
r34844 r34872 658 658 SkyTable *SkyTableLoadOptimal PROTO((char *catdir, char *SKYFILE, char *GSCFILE, int readwrite, int depth, int VERBOSE)); 659 659 int SkyTableSetDepth PROTO((SkyTable *sky, int depth)); 660 SkyList *SkyRegionByCPT PROTO((SkyTable *table, char *filename)); 660 661 SkyList *SkyRegionByPoint PROTO((SkyTable *table, int depth, double ra, double dec)); 661 662 SkyList *SkyListByPoint PROTO((SkyTable *table, double ra, double dec)); -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/skyregion_ops.c
r33649 r34872 7 7 If the region at the given depth is populated with an image table, then 'image' is TRUE. 8 8 I have defined no accelerators other than the table hierarchy */ 9 10 /* given /path/file.ext return pointer to file.ext */ 11 char *filebasename_ptr (char *name) { 12 13 char *c, *file; 14 15 c = strrchr (name, '/'); 16 if (c) return (c+1); 17 return name; 18 } 19 20 /* find region which matches the named file */ 21 SkyList *SkyRegionByCPT (SkyTable *table, char *filename) { 22 23 int i, Ns, Ne, No; 24 SkyRegion *region; 25 SkyList *list; 26 27 ALLOCATE (list, SkyList, 1); 28 ALLOCATE (list[0].regions, SkyRegion *, 1); 29 ALLOCATE (list[0].filename, char *, 1); 30 list[0].Nregions = 0; 31 list[0].ownElements = FALSE; // this list is only holding a view to the elements 32 strcpy (list[0].hosts, table[0].hosts); 33 34 // i'd like to select the region from the given cpt filename, but 35 // in a parallel environment, the filename does not match the canonical name 36 // i select the basename to match 37 38 // we might have been given foo.cpt or just foo: 39 char *tgtbase = filebasename_ptr (filename); 40 int Ntgtbase = strlen(tgtbase); 41 if ((Ntgtbase > 4) && (!strcmp (&tgtbase[Ntgtbase - 4], ".cpt"))) { 42 Ntgtbase -= 4; 43 } 44 45 for (i = 0; i < table[0].Nregions; i++) { 46 char *regbase = filebasename_ptr (table[0].region[i].name); 47 if (strncmp (regbase, tgtbase, Ntgtbase)) continue; 48 49 list[0].regions[0] = &table[0].region[i]; 50 list[0].filename[0] = table[0].filename[i]; 51 list[0].Nregions = 1; 52 return (list); 53 } 54 return NULL; 55 } 9 56 10 57 /* find region which overlaps c at given depth (-1 : populated ) */ -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/initialize_setposangle.c
r34844 r34872 58 58 // XXX for now, hardwire gpc1 photcodes 59 59 60 SINGLE_CPT = NULL; 61 if ((N = get_argument (argc, argv, "-cpt"))) { 62 remove_argument (N, &argc, argv); 63 SINGLE_CPT = strcreate (argv[N]); 64 remove_argument (N, &argc, argv); 65 } 66 67 // region of interest 68 UserPatch.Rmin = 0; 69 UserPatch.Rmax = 360; 70 UserPatch.Dmin = -90; 71 UserPatch.Dmax = +90; 72 if ((N = get_argument (argc, argv, "-region"))) { 73 remove_argument (N, &argc, argv); 74 UserPatch.Rmin = atof (argv[N]); 75 remove_argument (N, &argc, argv); 76 UserPatch.Rmax = atof (argv[N]); 77 remove_argument (N, &argc, argv); 78 UserPatch.Dmin = atof (argv[N]); 79 remove_argument (N, &argc, argv); 80 UserPatch.Dmax = atof (argv[N]); 81 remove_argument (N, &argc, argv); 82 } 83 60 84 PARALLEL = FALSE; 61 85 if ((N = get_argument (argc, argv, "-parallel"))) { -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/update_dvo_setposangle.c
r34749 r34872 36 36 37 37 // determine the populated SkyRegions overlapping the requested area (default depth) 38 UserPatch.Rmin = 0; 39 UserPatch.Rmax = 360; 40 UserPatch.Dmin = -90; 41 UserPatch.Dmax = +90; 42 skylist = SkyListByPatch (sky, -1, &UserPatch); 38 if (!SINGLE_CPT) { 39 skylist = SkyListByPatch (sky, -1, &UserPatch); 40 } else { 41 skylist = SkyListByCPT (sky, cptname); 42 } 43 myAssert (skylist, "ooops!"); 43 44 44 45 // update measurements for each populated catalog … … 113 114 114 115 char command[1024]; 115 snprintf (command, 1024, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s ",116 snprintf (command, 1024, "setposangle_client -hostID %d -catdir %s -hostdir %s -images %s -region STUFF", 116 117 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile); 117 118
Note:
See TracChangeset
for help on using the changeset viewer.
