Changeset 28214
- Timestamp:
- Jun 4, 2010, 8:00:11 AM (16 years ago)
- Location:
- trunk/Ohana/src/addstar/src
- Files:
-
- 3 edited
-
ConfigInit.c (modified) (2 diffs)
-
FilterStars.c (modified) (1 diff)
-
ReadImageHeader.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/ConfigInit.c
r27435 r28214 7 7 double ZERO_POINT; 8 8 char *config, *file; 9 char RadiusWord[80] ;9 char RadiusWord[80], tmpword[80]; 10 10 char CatdirPhotcodeFile[256]; 11 11 char MasterPhotcodeFile[256]; … … 68 68 ScanConfig (config, "CCDNUM-KEYWORD", "%s", 0, CCDNumKeyword); 69 69 ScanConfig (config, "ST-KEYWORD", "%s", 0, STKeyword); 70 ScanConfig (config, "OBSERVATORY-LATITUDE", "%lf", 0, &Latitude); 71 ScanConfig (config, "OBSERVATORY-LONGITUDE", "%lf", 0, &Longitude); 70 71 ScanConfig (config, "OBSERVATORY-LATITUDE", "%s", 0, tmpword); 72 if (!strcasecmp(tmpword, "NONE")) { 73 fprintf (stderr, "observatory latitude is not set\n"); 74 Latitude = NAN; 75 } else { 76 ScanConfig (config, "OBSERVATORY-LATITUDE", "%lf", 0, &Latitude); 77 } 78 ScanConfig (config, "OBSERVATORY-LONGITUDE", "%s", 0, tmpword); 79 if (!strcasecmp(tmpword, "NONE")) { 80 fprintf (stderr, "observatory longitude is not set\n"); 81 Longitude = NAN; 82 } else { 83 ScanConfig (config, "OBSERVATORY-LONGITUDE", "%lf", 0, &Longitude); 84 } 85 fprintf (stderr, "observatory @ (%f,%f)\n", Longitude, Latitude); 86 87 if (!strcasecmp(STKeyword, "NONE")) { 88 if (isnan(Longitude)) { 89 fprintf (stderr, "WARNING: ST cannot be determined for this image (no ST Keyword, no longitude)\n"); 90 } else { 91 fprintf (stderr, "ST Keyword is not defined, ST will be derived from time & longitude\n"); 92 } 93 } 94 72 95 ScanConfig (config, "SUBPIX_DATAFILE", "%s", 0, SubpixDatafile); 73 96 -
trunk/Ohana/src/addstar/src/FilterStars.c
r27435 r28214 54 54 /* calculate accurate per-star airmass and azimuth */ 55 55 stars[N].measure.airmass = airmass (image[0].secz, stars[N].average.R, stars[N].average.D, image[0].sidtime, image[0].latitude); 56 stars[N].measure.az = azimuth ( image[0].sidtime - stars[N].average.R, stars[N].average.D, image[0].latitude);56 stars[N].measure.az = azimuth (15.0*image[0].sidtime - stars[N].average.R, stars[N].average.D, image[0].latitude); 57 57 stars[N].measure.Mcal = image[0].Mcal; 58 58 stars[N].measure.t = image[0].tzero + 1e-4*stars[N].measure.Yccd*image[0].trate; /* trate is in 0.1 msec / row */ -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r27435 r28214 148 148 image[0].fwhm_y = tmp * 25.0 * image[0].coords.cdelt1 * 3600.0; 149 149 150 if (STKeyword[0] ) {150 if (STKeyword[0] && strcasecmp(STKeyword, "NONE")) { 151 151 /* get ST (used for airmass calculation) */ 152 152 gfits_scan (header, STKeyword, "%s", 1, line);
Note:
See TracChangeset
for help on using the changeset viewer.
