Changeset 4826
- Timestamp:
- Aug 19, 2005, 4:34:27 PM (21 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 6 edited
-
doc/Changes.txt (modified) (1 diff)
-
include/addstar.h (modified) (1 diff)
-
src/ConfigInit.c (modified) (4 diffs)
-
src/gcatalog.c (modified) (1 diff)
-
src/mkcatalog.c (modified) (2 diffs)
-
src/wcatalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/doc/Changes.txt
r4800 r4826 23 23 2005.08.15: 24 24 cleanup of the minor Wall,Werror messages 25 26 2005.08.19: 27 changed load_photcode to handle CATMODE and CATFORMAT variations 28 - addstar.h: added CATMODE and CATFORMAT globals 29 - ConfigInit: read CATMODE and CATFORMAT from config 30 - gcatalog: set catalog.catmode from CATMODE 31 - mkcatalog: set CATFORMAT and CATMODE for new catalog 32 - wcatalog: set CATFORMAT for new catalog 33 34 using full photometry conversions in find_matches 35 added SetZeroPoint to gstars to enable phot conversions 36 -
trunk/Ohana/src/addstar/include/addstar.h
r4810 r4826 59 59 char GSCFILE[256]; 60 60 char CATDIR[256]; 61 char CATMODE[16]; /* raw, mef, split, mysql */ 62 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 61 63 char TWO_MASS_DIR_AS[256]; 62 64 char TWO_MASS_DIR_DR2[256]; -
trunk/Ohana/src/addstar/src/ConfigInit.c
r4299 r4826 17 17 if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file); 18 18 19 ScanConfig (config, "RADIUS", "%s", 0, RadiusWord); 20 if (!strcasecmp (RadiusWord, "header")) { 21 DEFAULT_RADIUS = 0; 22 } else { 23 DEFAULT_RADIUS = atof (RadiusWord); 24 } 19 XMIN = XMAX = YMIN = YMAX = 0; 25 20 26 XMIN = XMAX = YMIN = YMAX = 0;21 ScanConfig (config, "RADIUS", "%s", 0, RadiusWord); 27 22 ScanConfig (config, "NSIGMA", "%lf", 0, &NSIGMA); 28 23 ScanConfig (config, "XOVERSCAN", "%d", 0, &XOVERSCAN); … … 32 27 ScanConfig (config, "ADDSTAR_YMIN", "%d", 0, &YMIN); 33 28 ScanConfig (config, "ADDSTAR_YMAX", "%d", 0, &YMAX); 29 ScanConfig (config, "MIN_SN_FSTAT", "%lf", 0, &SNLIMIT); 34 30 35 31 ScanConfig (config, "2MASS_DIR_AS", "%s", 0, TWO_MASS_DIR_AS); … … 43 39 ScanConfig (config, "GSCFILE", "%s", 0, GSCFILE); 44 40 ScanConfig (config, "CATDIR", "%s", 0, CATDIR); 45 ScanConfig (config, "MIN_SN_FSTAT", "%lf", 0, &SNLIMIT); 41 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 42 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); 46 43 ScanConfig (config, "PHOTCODE_FILE", "%s", 0, PhotCodeFile); 47 44 … … 60 57 ScanConfig (config, "OBSERVATORY-LATITUDE", "%lf", 0, &Latitude); 61 58 ScanConfig (config, "SUBPIX_DATAFILE", "%s", 0, SubpixDatafile); 59 60 if (!strcasecmp (RadiusWord, "header")) { 61 DEFAULT_RADIUS = 0; 62 } else { 63 DEFAULT_RADIUS = atof (RadiusWord); 64 } 65 66 if (*CATMODE == 0) strcpy (CATMODE, "RAW"); 67 if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR"); 62 68 63 69 if (!LoadPhotcodes (PhotCodeFile)) { -
trunk/Ohana/src/addstar/src/gcatalog.c
r3361 r4826 5 5 int Nsecfilt; 6 6 char mode; 7 8 /* no autodetect for CATMODE yet */ 9 strcpy (catalog[0].catmode, CATMODE); 7 10 8 11 /* read catalog header */ -
trunk/Ohana/src/addstar/src/mkcatalog.c
r3361 r4826 3 3 void mkcatalog (GSCRegion *region, Catalog *catalog) { 4 4 5 char filename[64], line[64]; 6 struct tm *local; 7 struct timeval now; 5 char *line; 6 time_t now; 8 7 9 8 if (VERBOSE) fprintf (stderr, "new catalog file: %s\n", region[0].filename); 10 if (!fits_read_header (CatTemplate, &catalog[0].header)) { 11 fprintf (stderr, "ERROR: can't find template header %s\n", CatTemplate); 12 exit (1); 13 } 9 10 fits_init_header (&catalog[0].header); 11 fits_create_header (&catalog[0].header); 14 12 15 /* assign header values for RA, DEC, DATE, etc*/16 fits_modify (&catalog[0].header, "RA0", "%lf", 1, region[0].RA[0]);13 /* write RA,DEC range in header */ 14 fits_modify (&catalog[0].header, "RA0", "%lf", 1, region[0].RA[0]); 17 15 fits_modify (&catalog[0].header, "DEC0", "%lf", 1, region[0].DEC[0]); 18 fits_modify (&catalog[0].header, "RA1", "%lf", 1, region[0].RA[1]);16 fits_modify (&catalog[0].header, "RA1", "%lf", 1, region[0].RA[1]); 19 17 fits_modify (&catalog[0].header, "DEC1", "%lf", 1, region[0].DEC[1]); 20 gettimeofday (&now, NULL); 21 local = localtime (&now.tv_sec); 22 sprintf (line, "%02d/%02d/%02d", local[0].tm_year, local[0].tm_mon + 1, local[0].tm_mday); 18 19 /* write creation date in header */ 20 str_to_time ("now", &now); 21 line = sec_to_date (now); 23 22 fits_modify (&catalog[0].header, "DATE", "%s", 1, line); 24 strcpy (filename, CatTemplate); 23 free (line); 24 25 25 ALLOCATE (catalog[0].average, Average, 1); 26 26 ALLOCATE (catalog[0].measure, Measure, 1); … … 28 28 catalog[0].Naverage = catalog[0].Nmeasure = catalog[0].Nmissing = 0; 29 29 30 /* setup secondary filters to match photcodes */ 30 /* setup secondary filters to match photcodes: 31 * Nsecfilt is number of filters. Number of entries in array is 32 * Nsecfilt * Naverage. At this point, N entries == 0 33 */ 31 34 ALLOCATE (catalog[0].secfilt, SecFilt, 1); 32 35 catalog[0].Nsecfilt = GetPhotcodeNsecfilt (); 33 36 34 /* Nsecfilt is number of filters. Number of entries in array is35 Nsecfilt * Naverage. At this point, N entries == 0 */37 /* set catalog mode (raw, mef, etc) - no autodetect for CATMODE yet */ 38 strcpy (catalog[0].catmode, CATMODE); 36 39 40 /* set catalog format (elixir, loneos, etc) */ 41 if (!strcmp (CATFORMAT, "INTERNAL")) { 42 sprintf (catalog[0].average_format, "DVO_AVERAGE"); 43 sprintf (catalog[0].measure_format, "DVO_MEASURE"); 44 } else { 45 sprintf (catalog[0].average_format, "DVO_AVERAGE_%s", CATFORMAT); 46 sprintf (catalog[0].measure_format, "DVO_MEASURE_%s", CATFORMAT); 47 } 37 48 } -
trunk/Ohana/src/addstar/src/wcatalog.c
r2457 r4826 3 3 void wcatalog (Catalog *catalog) { 4 4 5 /* we'll leave these for now, but they are LONEOS specific */ 6 fits_modify (&catalog[0].header, "MARKSTAR", "%t", 1, FALSE); 7 fits_modify (&catalog[0].header, "ADDUSNO", "%t", 1, FALSE); 8 fits_modify (&catalog[0].header, "MARKROCK", "%t", 1, FALSE); 5 /* set catalog format (elixir, loneos, etc) */ 6 if (!strcmp (CATFORMAT, "INTERNAL")) { 7 sprintf (catalog[0].average_format, "DVO_AVERAGE"); 8 sprintf (catalog[0].measure_format, "DVO_MEASURE"); 9 } else { 10 sprintf (catalog[0].average_format, "DVO_AVERAGE_%s", CATFORMAT); 11 sprintf (catalog[0].measure_format, "DVO_MEASURE_%s", CATFORMAT); 12 } 9 13 10 14 if (!save_catalog (catalog, VERBOSE)) {
Note:
See TracChangeset
for help on using the changeset viewer.
