Changeset 4852
- Timestamp:
- Aug 21, 2005, 2:54:58 PM (21 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 4 edited
-
Makefile (modified) (2 diffs)
-
src/imregister/src/convertimreg.c (modified) (2 diffs)
-
src/misc/src/ftable.c (modified) (3 diffs)
-
src/opihi/dvo/cmatch.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/Makefile
r3524 r4852 44 44 opihi \ 45 45 perl \ 46 photdbc \47 46 relphot \ 48 47 shell \ … … 61 60 lightcurve \ 62 61 markrock \ 62 photdbc \ 63 63 markstar \ 64 64 mosastro.v1 \ -
trunk/Ohana/src/imregister/src/convertimreg.c
r4849 r4852 1 1 # include "imregister.h" 2 2 # include "imreg.h" 3 static char *version = "convertimreg $Revision: 3. 2$";3 static char *version = "convertimreg $Revision: 3.3 $"; 4 4 5 5 int main (int argc, char **argv) { … … 50 50 } 51 51 fclearlockfile (argv[1], f, lockstate, &dbstate); 52 fits_convert_RegImage ( regimage, sizeof (RegImage), Nregimage);52 fits_convert_RegImage (pimage, sizeof (RegImage), Nimage); 53 53 54 54 /* create complete subset */ -
trunk/Ohana/src/misc/src/ftable.c
r4772 r4852 202 202 FILE *f; 203 203 204 /* find extension of interest */205 if (!Nextend && (Extname == (char *) NULL)) Nextend = 1;206 207 204 /* open file */ 208 205 f = fopen (file, "r"); … … 230 227 231 228 /* search for extension of interest */ 232 for (i = 1; fits_fread_Theader (f, header); i++) {233 if ( Nextend&& (Nextend == i)) return (f);229 for (i = 0; fits_fread_Theader (f, header); i++) { 230 if ((Extname == NULL) && (Nextend == i)) return (f); 234 231 235 232 fits_scan (header, "EXTNAME", "%s", 1, extname); 236 if ((Extname != (char *)NULL) && (!strcmp (Extname, extname))) return (f);233 if ((Extname != NULL) && (!strcmp (Extname, extname))) return (f); 237 234 238 235 Nbytes = fits_matrix_size (header); … … 357 354 fits_scan (header, field, "%s", 1, unit); 358 355 sprintf (field, "TNULL%d", i); 359 fits_scan (header, field, "%s", 1, null);356 if (!fits_scan (header, field, "%s", 1, null)) strcpy (null, "none"); 360 357 sprintf (field, "TNVAL%d", i); 361 fits_scan (header, field, "%s", 1, nval);358 if (!fits_scan (header, field, "%s", 1, nval)) strcpy (nval, "none"); 362 359 363 360 fprintf (stdout, "%-18s %-32s %-18s %-6s %-8s %-8s\n", -
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.
