Changeset 38372
- Timestamp:
- Jun 5, 2015, 8:22:24 AM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src
- Files:
-
- 15 edited
-
addstar/src/resort_threaded.c (modified) (1 diff)
-
addstar/src/resort_unthreaded.c (modified) (1 diff)
-
libfits/include/gfitsio.h (modified) (2 diffs)
-
libohana/include/ohana.h (modified) (3 diffs)
-
libohana/src/string.c (modified) (1 diff)
-
photdbc/include/photdbc.h (modified) (1 diff)
-
photdbc/src/ConfigInit.c (modified) (1 diff)
-
photdbc/src/args.c (modified) (2 diffs)
-
photdbc/src/photdbc_catalogs.c (modified) (2 diffs)
-
relphot/include/relphot.h (modified) (1 diff)
-
relphot/src/launch_region_hosts.c (modified) (1 diff)
-
relphot/src/load_catalogs.c (modified) (1 diff)
-
relphot/src/reload_catalogs.c (modified) (1 diff)
-
relphot/src/relphot_objects.c (modified) (1 diff)
-
relphot/src/relphot_synthphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/addstar/src/resort_threaded.c
r38352 r38372 43 43 44 44 // set the parameters which guide catalog open/load/create 45 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 46 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 47 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING; 48 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 45 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 46 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 47 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 48 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING; 49 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 49 50 50 51 // an error exit status here is a significant error (disk I/O or file access) -
branches/eam_branches/ohana.20150429/src/addstar/src/resort_unthreaded.c
r38352 r38372 21 21 22 22 // set the parameters which guide catalog open/load/create 23 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 24 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 25 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING; 26 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 23 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 24 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 25 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 26 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING; 27 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 27 28 28 29 // an error exit status here is a significant error (disk I/O or file access) -
branches/eam_branches/ohana.20150429/src/libfits/include/gfitsio.h
r38366 r38372 139 139 int gfits_modify PROTO((Header *header, char *field, char *mode, int N,...)) OHANA_FORMAT(printf, 3, 5); 140 140 int gfits_print PROTO((Header *header, char *field, char *mode, int N,...)) OHANA_FORMAT(printf, 3, 5); 141 int gfits_modify_alt PROTO((Header *header, char *field, char *mode, int N,...)); 142 int gfits_print_alt PROTO((Header *header, char *field, char *mode, int N,...)); 141 int gfits_modify_alt PROTO((Header *header, char *field, char *mode, int N,...)); // do not use a FORMAT: non-standard fmt chars 142 int gfits_print_alt PROTO((Header *header, char *field, char *mode, int N,...)); // do not use a FORMAT: non-standard fmt chars 143 143 int gfits_find_Xheader PROTO((FILE *f, Header *header, char *extname)); 144 144 int gfits_read_Xheader PROTO((char *filename, Header *header, int N)); … … 146 146 int gfits_save_header PROTO((FILE *f, Header *header)); 147 147 int gfits_scan PROTO((Header *header, char *field, char *mode, int N,...)) OHANA_FORMAT(scanf, 3, 5); 148 int gfits_scan_alt PROTO((Header *header, char *field, char *mode, int N,...)); 148 int gfits_scan_alt PROTO((Header *header, char *field, char *mode, int N,...)); // do not use a FORMAT: non-standard fmt chars 149 149 int gfits_set_unsign_mode PROTO((int mode)); 150 150 int gfits_stripwhite PROTO((char *string)); -
branches/eam_branches/ohana.20150429/src/libohana/include/ohana.h
r37807 r38372 286 286 char *strcreate PROTO((char *string)); 287 287 char *strncreate PROTO((char *string, int n)); 288 int strextend PROTO((char *input, char *format,...)) OHANA_FORMAT(printf, 2, 3); 288 289 int scan_line PROTO((FILE *f, char *line)); 289 290 int scan_line_maxlen PROTO((FILE *f, char *line, int maxlen)); … … 393 394 394 395 char *memstr PROTO((char *m1, char *m2, int n)); 395 int write_fmt PROTO((int fd, char *format, ...)) ;396 int write_fmt PROTO((int fd, char *format, ...)) OHANA_FORMAT(printf, 2, 3); 396 397 397 398 char **isolate_elements PROTO((int argc, char **argv, int *nstack)); … … 403 404 404 405 // gprint gets a stub implementation in libohana. opihi implements the real one. 405 int gprint (gpDest dest, char *format, ...);406 int gprint PROTO((gpDest dest, char *format, ...) OHANA_FORMAT(printf, 2, 3)); 406 407 407 408 // rconnect is used to run remote programs with a pipe for communication -
branches/eam_branches/ohana.20150429/src/libohana/src/string.c
r37033 r38372 51 51 } 52 52 53 int strextend (char *input, char *format,...) { 54 55 char tmpextra[1024], tmpline[1024]; 56 va_list argp; 57 58 va_start (argp, format); 59 vsnprintf (tmpextra, 1024, format, argp); 60 snprintf (tmpline, 1024, "%s %s", input, tmpextra); 61 strcpy (input, tmpline); 62 63 return TRUE; 64 } 65 53 66 /* create a new string of length n from this string */ 54 67 char *strncreate (char *string, int n) { -
branches/eam_branches/ohana.20150429/src/photdbc/include/photdbc.h
r37807 r38372 54 54 char *CATMODE; /* raw, mef, split, mysql */ 55 55 char *CATFORMAT; /* internal, elixir, loneos, panstarrs */ 56 char *CATCOMPRESS; /* ?? */ 56 57 char PhotCodeFile[DVO_MAX_PATH]; 57 58 -
branches/eam_branches/ohana.20150429/src/photdbc/src/ConfigInit.c
r34749 r38372 63 63 WarnConfig (config, "ZERO_PT", "%lf", 0, &ZERO_POINT); 64 64 65 // NOTE: in this program, CATFORMAT, CATMODE, CATCOMPRESS may only be set 66 // as command-line options, eg: -set-format PS1_V5 67 65 68 if (!success) { 66 69 fprintf (stderr, "missing config parameter\n"); -
branches/eam_branches/ohana.20150429/src/photdbc/src/args.c
r37807 r38372 71 71 remove_argument (N, &argc, argv); 72 72 CATMODE = strcreate (argv[N]); 73 remove_argument (N, &argc, argv); 74 } 75 76 // override input catalog format (PS1_V1, PS1_REF, etc) 77 CATCOMPRESS = NULL; 78 if ((N = get_argument (argc, argv, "-set-compress"))) { 79 remove_argument (N, &argc, argv); 80 CATCOMPRESS = strcreate (argv[N]); 73 81 remove_argument (N, &argc, argv); 74 82 } … … 257 265 } 258 266 267 // override input catalog format (PS1_V1, PS1_REF, etc) 268 CATCOMPRESS = NULL; 269 if ((N = get_argument (argc, argv, "-set-compress"))) { 270 remove_argument (N, &argc, argv); 271 CATCOMPRESS = strcreate (argv[N]); 272 remove_argument (N, &argc, argv); 273 } 274 259 275 /* specify portion of the sky */ 260 276 REGION.Rmin = 0; -
branches/eam_branches/ohana.20150429/src/photdbc/src/photdbc_catalogs.c
r38352 r38372 51 51 52 52 // define outcatalog open parameters 53 outcatalog.catformat = CATFORMAT ? dvo_catalog_catformat (CATFORMAT) : incatalog.catformat; 54 outcatalog.catmode = CATMODE ? dvo_catalog_catmode (CATMODE) : incatalog.catmode; 55 outcatalog.Nsecfilt = incatalog.Nsecfilt; // inherit from the incatalog 56 outcatalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 53 outcatalog.catformat = CATFORMAT ? dvo_catalog_catformat (CATFORMAT) : incatalog.catformat; 54 outcatalog.catmode = CATMODE ? dvo_catalog_catmode (CATMODE) : incatalog.catmode; 55 outcatalog.catcompress = CATCOMPRESS ? dvo_catalog_catcompress (CATCOMPRESS) : incatalog.catcompress; // set the default catcompress from config data 56 outcatalog.Nsecfilt = incatalog.Nsecfilt; // inherit from the incatalog 57 outcatalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 57 58 58 59 // output catalogs always represent the same skyregions as the input catalogs … … 135 136 if (PHOTCODE_DROP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-drop %s", command, PHOTCODE_DROP_LIST); strcpy (command, tmpline); } 136 137 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, DVO_MAX_PATH, "%s -photcode-keep %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 138 if (CATCOMPRESS) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-compress %s", command, CATCOMPRESS); strcpy (command, tmpline); } 137 139 if (CATFORMAT) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-format %s", command, CATFORMAT); strcpy (command, tmpline); } 138 140 if (CATMODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -set-mode %s", command, CATMODE); strcpy (command, tmpline); } -
branches/eam_branches/ohana.20150429/src/relphot/include/relphot.h
r38062 r38372 494 494 495 495 int launch_region_hosts (RegionHostTable *regionHosts); 496 int strextend (char *input, char *format,...);497 496 498 497 Image *ImageTableLoad(char *filename, off_t *nimage); -
branches/eam_branches/ohana.20150429/src/relphot/src/launch_region_hosts.c
r37037 r38372 1 1 # include "relphot.h" 2 2 # define DEBUG 0 3 4 int strextend (char *input, char *format,...) {5 6 char tmpextra[1024], tmpline[1024];7 va_list argp;8 9 va_start (argp, format);10 vsnprintf (tmpextra, 1024, format, argp);11 snprintf (tmpline, 1024, "%s %s", input, tmpextra);12 strcpy (input, tmpline);13 14 return TRUE;15 }16 3 17 4 int launch_region_hosts (RegionHostTable *regionHosts) { -
branches/eam_branches/ohana.20150429/src/relphot/src/load_catalogs.c
r38352 r38372 41 41 char hostfile[1024]; 42 42 snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name); 43 tcatalog.filename = hostID ? hostfile : skylist[0].filename[i];44 45 tcatalog.cat format = dvo_catalog_catformat (CATFORMAT); // set the default catformatfrom config data46 tcatalog.cat mode = dvo_catalog_catmode (CATMODE); // set the default catmodefrom config data47 tcatalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; // don't need to load all data at this point48 tcatalog.Nsecfilt = GetPhotcodeNsecfilt (); // set the desired number in case we need to create the catalog43 tcatalog.filename = hostID ? hostfile : skylist[0].filename[i]; 44 tcatalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 45 tcatalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 46 tcatalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 47 tcatalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; // don't need to load all data at this point 48 tcatalog.Nsecfilt = GetPhotcodeNsecfilt (); // set the desired number in case we need to create the catalog 49 49 50 50 if (!dvo_catalog_open (&tcatalog, skylist[0].regions[i], VERBOSE2, "r")) { -
branches/eam_branches/ohana.20150429/src/relphot/src/reload_catalogs.c
r38352 r38372 56 56 TIMESTAMP(time1); 57 57 58 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 59 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 60 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 61 catalog.Nsecfilt = GetPhotcodeNsecfilt (); // set the desired number in case we need to create the catalog 58 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 59 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 60 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 61 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 62 catalog.Nsecfilt = GetPhotcodeNsecfilt (); // set the desired number in case we need to create the catalog 62 63 63 64 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) { -
branches/eam_branches/ohana.20150429/src/relphot/src/relphot_objects.c
r38352 r38372 39 39 char hostfile[1024]; 40 40 snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name); 41 catalog.filename = hostID ? hostfile : skylist[0].filename[i]; 42 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 43 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 44 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 45 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 41 catalog.filename = hostID ? hostfile : skylist[0].filename[i]; 42 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 43 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 44 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 45 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 46 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 46 47 47 48 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) { -
branches/eam_branches/ohana.20150429/src/relphot/src/relphot_synthphot.c
r38352 r38372 40 40 char hostfile[1024]; 41 41 snprintf (hostfile, 1024, "%s/%s.cpt", hostpath, skylist[0].regions[i]->name); 42 catalog.filename = hostID ? hostfile : skylist[0].filename[i]; 43 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 44 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 45 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; 46 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 42 catalog.filename = hostID ? hostfile : skylist[0].filename[i]; 43 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 44 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 45 catalog.catcompress = dvo_catalog_catcompress (CATCOMPRESS); // set the default catcompress from config data 46 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; 47 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 47 48 48 49 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
Note:
See TracChangeset
for help on using the changeset viewer.
