Changeset 34888
- Timestamp:
- Jan 7, 2013, 4:20:21 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src/relphot
- Files:
-
- 3 edited
-
include/relphot.h (modified) (1 diff)
-
src/ImageOps.c (modified) (2 diffs)
-
src/ImageSubset.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/relphot/include/relphot.h
r34844 r34888 107 107 unsigned int tzero; 108 108 unsigned char trate; 109 short ubercalDist; 109 110 } ImageSubset; 110 111 -
branches/eam_branches/ipp-20121219/Ohana/src/relphot/src/ImageOps.c
r34844 r34888 96 96 image[i].tzero = input[i].tzero ; 97 97 image[i].trate = input[i].trate ; 98 image[i].ubercalDist = input[i].ubercalDist ; 98 99 } 99 100 LineNumber = line_number; … … 128 129 subset[i].tzero = image[i].tzero ; 129 130 subset[i].trate = image[i].trate ; 131 subset[i].ubercalDist = image[i].ubercalDist ; 130 132 } 131 133 return subset; -
branches/eam_branches/ipp-20121219/Ohana/src/relphot/src/ImageSubset.c
r33963 r34888 65 65 GET_COLUMN (tzero, "TZERO", int); 66 66 GET_COLUMN (trate, "TRATE", short); 67 GET_COLUMN (ucdist, "UBERCAL_DIST", short); 67 68 68 69 // XXX free the fits table data here … … 77 78 image[i].tzero = tzero[i]; 78 79 image[i].trate = trate[i]; 80 image[i].ubercalDist = ucdist[i]; 79 81 } 80 82 fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow); … … 87 89 free (tzero); 88 90 free (trate); 91 free (ucdist); 89 92 90 93 *nimage = Nrow; … … 124 127 gfits_define_bintable_column (&theader, "I", "TRATE", "tti rate", NULL, 1.0, 0.0); 125 128 129 gfits_define_bintable_column (&theader, "I", "UBERCAL_DIST", "ubercal distance", NULL, 1.0, 1.0*0x80); 130 126 131 // generate the output array that carries the data 127 132 gfits_create_table (&theader, &ftable); … … 130 135 unsigned int *imageID, *map, *flags, *tzero; 131 136 unsigned short *trate; 137 short *ucdist; 132 138 133 139 // create intermediate storage arrays … … 139 145 ALLOCATE (tzero, unsigned int, Nimage); 140 146 ALLOCATE (trate, unsigned short, Nimage); 147 ALLOCATE (ucdist, short, Nimage); 141 148 142 149 // assign the storage arrays … … 149 156 tzero[i] = image[i].tzero; 150 157 trate[i] = image[i].trate; 158 ucdist[i] = image[i].ubercalDist; 151 159 } 152 160 153 161 // add the columns to the output array 154 gfits_set_bintable_column (&theader, &ftable, "MCAL", Mcal, Nimage); 155 gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR", dMcal, Nimage); 156 gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID", imageID, Nimage); 157 gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map, Nimage); 158 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, Nimage); 159 gfits_set_bintable_column (&theader, &ftable, "TZERO", tzero, Nimage); 160 gfits_set_bintable_column (&theader, &ftable, "TRATE", trate, Nimage); 162 gfits_set_bintable_column (&theader, &ftable, "MCAL", Mcal, Nimage); 163 gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR", dMcal, Nimage); 164 gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID", imageID, Nimage); 165 gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map, Nimage); 166 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, Nimage); 167 gfits_set_bintable_column (&theader, &ftable, "TZERO", tzero, Nimage); 168 gfits_set_bintable_column (&theader, &ftable, "TRATE", trate, Nimage); 169 gfits_set_bintable_column (&theader, &ftable, "UBERCAL_DIST", ucdist, Nimage); 161 170 162 171 free (Mcal); … … 167 176 free (tzero); 168 177 free (trate); 178 free (ucdist); 169 179 170 180 FILE *f = fopen (filename, "w");
Note:
See TracChangeset
for help on using the changeset viewer.
