IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2005, 4:57:00 PM (21 years ago)
Author:
eugene
Message:

moving to autocode on imregister

Location:
trunk/Ohana/src/libautocode
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libautocode/Makefile

    r3593 r3609  
    2929# remember to add entries here to libohana/Makefile:AOBJ as well
    3030LIBOBJ = \
     31$(SRC)/regimage.$(ARCH).o \
    3132$(SRC)/detreg.$(ARCH).o \
    3233$(SRC)/photreg.$(ARCH).o \
     
    3738
    3839LIBINC = \
     40$(INC)/regimage.h \
    3941$(INC)/detreg.h \
    4042$(INC)/photreg.h \
     
    4446$(INC)/spectrum-ascii.h
    4547
    46 COMINC = \
    47 $(DEF)/common.h
    48 
    4948$(LIBOBJ): $(INC)/autocode.h
    5049
    5150$(INC)/autocode.h: $(LIBINC)
    52         cat $(COMINC) $(LIBINC) > $(INC)/autocode.h
     51        cat $(DEF)/common.h >  $(INC)/autocode.h
     52        cat $(LIBINC)       >> $(INC)/autocode.h
     53        @echo "# endif"     >> $(INC)/autocode.h
    5354        @echo done with libautocode.a:
    5455
  • trunk/Ohana/src/libautocode/def/common.h

    r3536 r3609  
    1 # include <stdio.h>
    2 # include <stdarg.h>
    3 # include <fitsio.h>
     1# include <ohana.h>
     2
     3# ifndef AUTOCODE_H
     4# define AUTOCODE_H
     5/* matched endif is added by Makefile */
    46
    57# ifndef TRUE
     
    3234
    3335# define e_time unsigned int
     36# define rawshort short
     37
     38/*** rawshort is used to handle the broken pre-autocode photreg tables
     39     fix the tables and remove this
     40***/
    3441
    3542/*** this file uses data types which must have fixed sizes regardless
  • trunk/Ohana/src/libautocode/def/photreg.d

    r3536 r3609  
    1717FIELD photcode,   PHOTCODE,   short,       photcode,                  photcode
    1818FIELD label,      LABEL,      char[64],    data label
    19 FIELD refcode,    REFCODE,    short,       photcode,                  photcode
     19FIELD refcode,    REFCODE,    rawshort,    photcode,                  photcode
    2020FIELD Ntime,      N_TIME,     int,         number of times
    2121FIELD Nmeas,      N_MEAS,     int,         number of measurements
  • trunk/Ohana/src/libautocode/generate

    r3536 r3609  
    4141        # not a simple key/value entry
    4242        if ($key eq "FIELD") {
    43             ($element, $field, $format, $comment, $unit) = split (/,\s+/, $value);
     43            ($element, $field, $format, $comment, $unit) = split (/,\s+/, $value, 5);
     44#           print "$element : $field : $format : $comment : $unit\n";
    4445            push @element, $element;
    4546            push @field,   $field;
     
    106107        if ($type eq "float")  { $pt1 = "E"; }
    107108        if ($type eq "double") { $pt1 = "D"; }
     109
     110        if ($type eq "rawshort") { $pt1 = "I"; }
    108111
    109112        printf FILE "  fits_define_bintable_column (header, ";
     
    130133        if ($type eq "double") { $pt1 = sprintf "F%s", $length; }
    131134
     135        if ($type eq "rawshort")  { $pt1 = sprintf "I%s", $length; }
     136
    132137        printf FILE "  fits_define_table_column (header, ";
    133138        printf FILE "\"%s\", ",   $pt1;
     
    179184            next;
    180185        }
     186        # this is a patch for old photreg tables: provide a fix for the tables
     187        if ($type eq "rawshort")  {
     188            $N +=2;
     189            next;
     190        }
    181191        if ($type eq "short")  {
    182192            $T = "BYTE";
     
    229239        if ($type eq "float")  { $Nbytes += 4; }
    230240        if ($type eq "double") { $Nbytes += 8; }
     241
     242        if ($type eq "rawshort")  { $Nbytes += 2; }
    231243    }
    232244    return ($Nbytes);
Note: See TracChangeset for help on using the changeset viewer.