Changeset 4852 for trunk/Ohana/src/opihi/dvo/cmatch.c
- Timestamp:
- Aug 21, 2005, 2:54:58 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/cmatch.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/cmatch.c
r4844 r4852 3 3 int cmatch (int argc, char **argv) { 4 4 5 FILE *f;6 5 Catalog catalog1, catalog2; 7 int i, Nbytes, nbytes, Nitems, nitems; 8 char *tbuffer, filename[128]; 9 int nstar, NSTARS; 10 double R, D, M, radius; 6 char filename[128]; 7 double radius; 11 8 char catdir[256], gscdir[256]; 12 9 Vector *rvec, *dvec, *mvec, *drvec, *ddvec, *dmvec; … … 14 11 VarConfig ("GSCDIR", "%s", gscdir); 15 12 VarConfig ("CATDIR", "%s", catdir); 16 if (VarConfig ("CATMODE", "%s", catalog .catmode) == NULL)17 strcpy (catalog .catmode, "RAW");13 if (VarConfig ("CATMODE", "%s", catalog1.catmode) == NULL) 14 strcpy (catalog1.catmode, "RAW"); 18 15 19 16 if (argc != 9) { … … 39 36 sprintf (filename, "%s/%s", catdir, argv[1]); 40 37 catalog1.filename = filename; 41 switch (lock_catalog (&catalog , LCK_SOFT)) {38 switch (lock_catalog (&catalog1, LCK_SOFT)) { 42 39 case 2: 43 unlock_catalog (&catalog );40 unlock_catalog (&catalog1); 44 41 case 0: 45 42 return (FALSE); 46 43 } 47 if (!load_catalog (&catalog , LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) {48 unlock_catalog (&catalog );44 if (!load_catalog (&catalog1, LOAD_AVES | LOAD_MEAS | LOAD_SECF, TRUE)) { 45 unlock_catalog (&catalog1); 49 46 return (FALSE); 50 47 } 51 unlock_catalog (&catalog );48 unlock_catalog (&catalog1); 52 49 fprintf (stderr, "read %d stars from phot catalog file %s\n", catalog1.Naverage, filename); 53 50 51 /* this is for loading from a text file, presumably hstgsc or usno 52 replace this with references to the ra and dec vectors? 54 53 nstar = 0; 55 54 NSTARS = DNSTARS; … … 76 75 catalog2.Naverage = nstar; 77 76 fclose (f); 77 */ 78 78 79 79 /* sort data in order of RA */
Note:
See TracChangeset
for help on using the changeset viewer.
