IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 6, 2007, 5:09:52 PM (19 years ago)
Author:
eugene
Message:

merging changes from eam_branch_20071015 (read compressed images, clean addstar I/O, other minor issues)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/table/F_table_format.c

    r15038 r15487  
    2525  if (*Fchar == 'E') { *Nbytes = 4;  strcpy (type, "float");  *Nval = Nv;               }
    2626  if (*Fchar == 'D') { *Nbytes = 8;  strcpy (type, "double"); *Nval = Nv;               }
    27   if (*Fchar == 'P') { *Nbytes = 8;  strcpy (type, "float");  *Nval = 2*Nv;             }
     27  if (*Fchar == 'P') { *Nbytes = 8;  strcpy (type, "var");    *Nval = 2*Nv;             }
    2828  if (*Fchar == 'C') { *Nbytes = 8;  strcpy (type, "float");  *Nval = 2*Nv;             }
    2929  if (*Fchar == 'M') { *Nbytes = 16; strcpy (type, "double"); *Nval = 2*Nv;             }
     
    194194  int i, j, n, Nx, Ny, Nfields;
    195195  int off, Nchar, Nval, Nbytes, status;
    196   char *line, format[64], field[16], type[16];
     196  char format[64], field[16], type[16];
    197197  double tzero, tscale;
    198198  char *tmpChar;
     
    233233      for (j = 0; j < Ny; j++) {
    234234        for (n = 0; n < Nval; n++) {
    235           tmpChar = (int *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
     235          tmpChar = (char *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
    236236          *tmpChar = *tmpChar * tscale + tzero;
    237237        }
     
    241241      for (j = 0; j < Ny; j++) {
    242242        for (n = 0; n < Nval; n++) {
    243           tmpShort = (int *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
     243          tmpShort = (short *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
    244244          *tmpShort = *tmpShort * tscale + tzero;
    245245        }
     
    264264  int i, j, n, Nx, Ny, Nfields;
    265265  int off, Nchar, Nval, Nbytes, status;
    266   char *line, format[64], field[16], type[16];
     266  char format[64], field[16], type[16];
    267267  double tzero, tscale;
    268268  char *tmpChar;
     
    303303      for (j = 0; j < Ny; j++) {
    304304        for (n = 0; n < Nval; n++) {
    305           tmpChar = (int *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
     305          tmpChar = (char *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
    306306          *tmpChar = (*tmpChar - tzero) / tscale;
    307307        }
     
    311311      for (j = 0; j < Ny; j++) {
    312312        for (n = 0; n < Nval; n++) {
    313           tmpShort = (int *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
     313          tmpShort = (short *)&ftable[0].buffer[j*Nx + n*Nbytes + off];
    314314          *tmpShort = (*tmpShort - tzero) / tscale;
    315315        }
Note: See TracChangeset for help on using the changeset viewer.