Changeset 35002
- Timestamp:
- Jan 20, 2013, 8:59:30 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
GetFileMode.c (modified) (1 diff)
-
mkcmf.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/addstar/src/GetFileMode.c
r34088 r35002 22 22 if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ; 23 23 24 if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) { 24 if (haveNaxis && (Naxis == 2)) { 25 int Nx, Ny; 26 gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 27 gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 28 if ((Nx > 0) && (Ny > 0)) { 29 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 30 return MOSAIC_CMP; 31 } 32 return SIMPLE_CMP; 33 } 34 } 35 36 if (haveNaxis && (TEXTMODE || !simple)) { 25 37 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 26 38 return MOSAIC_CMP; -
branches/eam_branches/ipp-20121219/Ohana/src/addstar/src/mkcmf.c
r34996 r35002 313 313 gfits_modify (ftable.header, "EXTNAME", "%s", 1, "Chip.psf"); 314 314 315 fits = fopen (argv[2], "w"); 315 // open for append (if you want a new file, need to blow the old object) 316 fits = fopen (argv[2], "a+"); 316 317 if (fits == NULL) { 317 318 fprintf (stderr, "ERROR: can't open output file %s\n", argv[2]); 318 319 exit (1); 320 } 321 322 /* position to begining of file to write header */ 323 off_t Nend = ftello (f); 324 325 /* if we are appending, fix up header */ 326 if (Nend > 0) { 327 static char simple[] = "XTENSION= 'IMAGE ' / Image extension"; 328 int Ns, No; 329 Ns = strlen (simple); 330 No = 80 - Ns; 331 strncpy (header.buffer, simple, Ns); 332 memset (&header.buffer[Ns], ' ', No); 319 333 } 320 334
Note:
See TracChangeset
for help on using the changeset viewer.
