Changeset 37376
- Timestamp:
- Sep 8, 2014, 2:41:16 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/libautocode
- Files:
-
- 19 edited
-
Makefile.Targets (modified) (4 diffs)
-
def/common.h (modified) (1 diff)
-
def/coords.d (modified) (1 diff)
-
def/image-elixir.d (modified) (1 diff)
-
def/image-loneos.d (modified) (1 diff)
-
def/image-panstarrs-dev-0.d (modified) (1 diff)
-
def/image-panstarrs-dev-1.d (modified) (1 diff)
-
def/image-ps1-dev-1.d (modified) (1 diff)
-
def/image-ps1-dev-2.d (modified) (1 diff)
-
def/image-ps1-dev-3.d (modified) (1 diff)
-
def/image-ps1-ref.d (modified) (1 diff)
-
def/image-ps1-v1.d (modified) (1 diff)
-
def/image-ps1-v2.d (modified) (1 diff)
-
def/image-ps1-v3.d (modified) (1 diff)
-
def/image-ps1-v4.d (modified) (1 diff)
-
def/image-ps1-v5.d (modified) (1 diff)
-
def/image.d (modified) (4 diffs)
-
doc/autocode.txt (modified) (2 diffs)
-
generate (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/Makefile.Targets
r37034 r37376 1 1 AOBJS = \ 2 $(ASRC)/coords .$(ARCH).o \2 $(ASRC)/coords-disk.$(ARCH).o \ 3 3 $(ASRC)/average.$(ARCH).o \ 4 4 $(ASRC)/average-loneos.$(ARCH).o \ … … 56 56 $(ASRC)/photcode-ps1-v5.$(ARCH).o \ 57 57 $(ASRC)/photcode-ps1-ref.$(ARCH).o \ 58 $(ASRC)/image.$(ARCH).o \59 58 $(ASRC)/image-loneos.$(ARCH).o \ 60 59 $(ASRC)/image-elixir.$(ARCH).o \ … … 98 97 99 98 AINCS = \ 100 $(AINC)/coords .h \99 $(AINC)/coords-disk.h \ 101 100 $(AINC)/average.h \ 102 101 $(AINC)/average-loneos.h \ … … 154 153 $(AINC)/photcode-ps1-v5.h \ 155 154 $(AINC)/photcode-ps1-ref.h \ 156 $(AINC)/image.h \157 155 $(AINC)/image-loneos.h \ 158 156 $(AINC)/image-elixir.h \ -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/common.h
r37034 r37376 34 34 # define DVO_IMAGE_NAME_LEN 117 35 35 36 typedef struct { 37 int Nx; 38 int Ny; 39 float *value; 40 float dX; 41 float dY; 42 float Xo; 43 float Yo; 44 } ImageMap; 45 46 /* Internal version of Coords (see CoordsDisk in libautocode/def/coords-disk.d) */ 47 typedef struct Coords { 48 double crval1; // coordinate at reference pixel 49 double crval2; // coordinate at reference pixel 50 float crpix1; // coordinate of reference pixel 51 float crpix2; // coordinate of reference pixel 52 float cdelt1; // degrees per pixel 53 float cdelt2; // degrees per pixel 54 float pc1_1; // rotation matrix 55 float pc1_2; // rotation matrix 56 float pc2_1; // rotation matrix 57 float pc2_2; // rotation matrix 58 float polyterms[7][2]; // higher order warping terms 59 char ctype[15]; // coordinate type 60 char Npolyterms; // order of polynomial 61 struct Coords *mosaic; // pointer to parent mosaic 62 ImageMap *imageMap; // pointer to image map transformation 63 } Coords; 64 65 typedef struct Image { 66 Coords coords; // astrometric data 67 e_time tzero; // readout time (row 0) 68 unsigned int nstar; // number of stars on image 69 float secz; // airmass (mag) 70 unsigned short NX; // image width 71 unsigned short NY; // image height 72 float apmifit; // aperture correction (mag) 73 float dapmifit; // apmifit error (mag) 74 float Mcal; // calibration mag (mag) 75 float dMcal; // error on Mcal (mag) 76 short Xm; // image chisq (10*log(value)) 77 short photcode; // identifier for CCD, 78 float exptime; // exposure time (seconds) 79 float sidtime; // sidereal time of exposure 80 float latitude; // observatory latitude (degrees) 81 float RAo; // image center (degrees) 82 float DECo; // image center (degrees) 83 float Radius; // image radius (degrees) 84 float refColorBlue; // median astrometry ref color 85 float refColorRed; // median astrometry ref color 86 char name[117]; // name of original image 87 unsigned char detection_limit; // detection limit (10*mag) 88 unsigned char saturation_limit; // saturation limit (10*mag) 89 unsigned char cerror; // astrometric error (50*arcsec) 90 unsigned char fwhm_x; // PSF x width (25*arcsec) 91 unsigned char fwhm_y; // PSF y width (25*arcsec) 92 unsigned char trate; // scan rate (100 usec/pixel) 93 unsigned char ccdnum; // CCD ID number 94 unsigned int flags; // image quality flags 95 unsigned int imageID; // internal image ID 96 unsigned int parentID; // associated ref image 97 unsigned int externID; // external image ID 98 unsigned short sourceID; // analysis source ID 99 short nLinkAstrom; // mean number of matched measurements for astrometry 100 short nLinkPhotom; // mean number of matched measurements for astrometry 101 short ubercalDist; // distance to nearest ubercal image 102 float dXpixSys; // systematic astrometry error in X 103 float dYpixSys; // systematic astrometry error in Y 104 float dMagSys; // systematic photometry error 105 unsigned short nFitAstrom; // number of stars used for astrometry cal 106 unsigned short nFitPhotom; // number of stars used for photometry cal 107 unsigned int photom_map_id; // reference to 2D zero point map 108 unsigned int astrom_map_id; // reference to 2D astrometry map 109 struct Image *parent; // pointer to parent mosaic (not save to disk) 110 } Image; 111 36 112 /*** rawshort is used to handle the broken pre-autocode photreg tables 37 113 fix the tables and remove this -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/coords.d
r6454 r37376 17 17 FIELD pc2_2, PC2_2, float, rotation matrix 18 18 FIELD polyterms, POLYTERMS, float[7][2], higher order warping terms 19 FIELD ctype, CTYPE, char[15], coordinate type19 FIELD ctype, CTYPE, char[15], coordinate type 20 20 FIELD Npolyterms, NPOLYTERMS, char, order of polynomial 21 FIELD astrom_map_id, ASTROM_MAP_ID, unsigned int, reference to 2D astrometry map -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-elixir.d
r30604 r37376 6 6 # elements of the image structure 7 7 8 SUBSTRUCT coords, COORDS, Coords ,astrometric data8 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 9 9 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 10 10 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-loneos.d
r30604 r37376 6 6 # elements of the image structure 7 7 8 SUBSTRUCT coords, COORDS, Coords ,astrometric data8 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 9 9 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 10 10 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-panstarrs-dev-0.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-panstarrs-dev-1.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-dev-1.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-dev-2.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-dev-3.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-ref.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-v1.d
r30604 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-v2.d
r36833 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-v3.d
r36833 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-v4.d
r36833 r37376 7 7 # elements of the image structure 8 8 9 SUBSTRUCT coords, COORDS, Coords ,astrometric data9 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 10 10 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 11 11 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image-ps1-v5.d
r37034 r37376 8 8 # careful of 8-byte boundaries 9 9 10 SUBSTRUCT coords, COORDS, Coords ,astrometric data10 SUBSTRUCT coords, COORDS, CoordsDisk, astrometric data 11 11 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel 12 12 SUBFIELD crval2, CRVAL2, double, coordinate at reference pixel -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/image.d
r37034 r37376 2 2 EXTNAME DVO_IMAGE 3 3 TYPE BINTABLE 4 SIZE 3 604 SIZE 384 5 5 DESCRIPTION DVO Image Table 6 6 … … 8 8 # careful of 8-byte boundaries 9 9 10 # Coords is an internal structure defined in def/common.h 10 11 SUBSTRUCT coords, COORDS, Coords, astrometric data 11 12 SUBFIELD crval1, CRVAL1, double, coordinate at reference pixel … … 22 23 SUBFIELD ctype, CTYPE, char[15], coordinate type 23 24 SUBFIELD Npolyterms, NPOLYTERMS, char, order of polynomial 24 # 120 bytes 25 SUBFIELD mosaic, MOSAIC, e_void, pointer to parent mosaic 26 SUBFIELD imageMap, IMAGE_MAP, e_void, pointer to image map 27 # 136 bytes 25 28 26 29 # change this to a double? … … 76 79 FIELD photom_map_id, PHOTOM_MAP_ID, unsigned int, reference to 2D zero point map 77 80 FIELD astrom_map_id, ASTROM_MAP_ID, unsigned int, reference to 2D astrometry map 81 82 FIELD *parent, PARENT, e_void, pointer to parent mosaic (not save to disk) 78 83 # nFitPhotom lands on the old location of Mxxxx, which was used to mean nFitPhotom in some cases 79 84 -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/doc/autocode.txt
r21508 r37376 35 35 36 36 - the element name 37 - the element FITS field (in FITS table) 37 38 - the element data type 38 39 - the element description 39 40 - the element physical unit 41 42 SUBFIELD / SUBSTRUCT keywords allows the user to define elements of a 43 structure which are themselves structures. These fields are used as 44 follow: 45 46 Binary / ASCII FITS tables write out the SUBFIELD entries as if they 47 were regular table rows (substructure distinction not visible in FITS 48 table). SUBSTRUCT rows are NOT added to the FITS table. 49 50 In a C-structure, the SUBFIELD rows are skipped and only the SUBSTRUCT 51 row is saved. The definition of the substructure is assumed to be 52 defined elsewhere in the C code. 40 53 41 54 Template File … … 43 56 The template file is a source code in whatever language is desired. 44 57 Within the template, the defined keywords may be used as desired, 45 wherever needed. In addition, there are special directives which 46 invoke additional special behavior. All special directives have the 47 form of comments within their target language. They are replaced with 48 a block of code in that target language, normally one which iterates 49 over the FIELD elements of the schema file. As such, the directive 50 appropriate for one language should not be used within code for a 51 different language. Here is a list of existing special directives: 58 wherever needed. 59 60 In addition, there are special directives which invoke additional 61 special behavior. All special directives have the form of comments 62 within their target language. They are replaced with a block of code 63 in that target language, normally one which iterates over the FIELD 64 elements of the schema file. As such, the directive appropriate for 65 one language should not be used within code for a different language. 66 Here is a list of existing special directives: 52 67 53 68 /** STRUCT DEFINITION **/ -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/generate
r26384 r37376 144 144 if ($type eq "e_time") { $pt1 = "J"; } 145 145 if ($type eq "e_void") { $pt1 = "B"; $Np = 8*$Np; } 146 # if ($type eq "Image") { $pt1 = "B"; $Np = 8*$Np; } 146 147 # e_void is a 64 bit pointer, cast to size_t. its value is not loaded 147 148 # from the table. … … 248 249 if ($type eq "e_time") { $pt1 = sprintf "I%s", $length; } 249 250 if ($type eq "e_void") { $pt1 = sprintf "I%s", $length; } 251 # if ($type eq "Image") { $pt1 = sprintf "I%s", $length; } 250 252 251 253 if (!$pt1) { die "unknown type $type"; } … … 331 333 if ($type eq "e_time") { $T = "WORD"; $n = 4; } 332 334 if ($type eq "e_void") { $T = "DBLE"; $n = 8; } 335 # if ($type eq "Image") { $T = "DBLE"; $n = 8; } 333 336 334 337 if (!$n) { die "unknown type $type"; } … … 375 378 if ($type eq "e_time") { $Nbytes += 4*$Np; $valid = 1; } 376 379 if ($type eq "e_void") { $Nbytes += 8*$Np; $valid = 1; } 380 # if ($type eq "Image") { $Nbytes += 8*$Np; $valid = 1; } 377 381 if (!$valid) { die "unknown type $type"; } 378 382 }
Note:
See TracChangeset
for help on using the changeset viewer.
