Attachments (3)
Change History (8)
by , 21 years ago
comment:1 by , 21 years ago
| Owner: | changed from to |
|---|
comment:2 by , 21 years ago
I'm not convinced that the problem lies in MetadataConfigFormat...
I've altered your code to just simply print out the element types that are
stored in the metadata. This doesn't require a call to MetadataConfigFormat.
The test code says that there are 80 elements, but when it reaches number 79 it
seg faults. I looked at the sample fits file you provided and it appeared to be
corrupt or at least incoherent for many lines at the end. This seems to
indicate to me that we may need better error handling in either the MetadataAdd
functions or the psFitsReadHeader function or both.
I'll attach the revised code I'm talking about and you can take a look if you
want. If you can also take a look at your fits file and let me know if the
format is correct, I'd appreciate it. Either way, the behavior of these
functions needs updating, but it will help to narrow the scope if possible.
thanks.
comment:3 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I think it's fixed... to verify, is this the output you would expect?
XTENSION STR BINTABLE
BITPIX S32 8
NAXIS S32 2
NAXIS1 S32 108
NAXIS2 S32 2112
PCOUNT S32 0
GCOUNT S32 1
TFIELDS S32 14
EXTNAME STR ZERO_POINTS_3.0
TTYPE1 STR ZP_OBS #measured zero point
TUNIT1 STR mag
TFORM1 STR E
TSCAL1 F64 1.000000
TZERO1 F64 0.000000
TTYPE2 STR ZP_REF #nominal zero point
TUNIT2 STR mag
TFORM2 STR E
TSCAL2 F64 1.000000
TZERO2 F64 0.000000
TTYPE3 STR ZP_ERR #error on zero point
TUNIT3 STR mag
TFORM3 STR E
TSCAL3 F64 1.000000
TZERO3 F64 0.000000
TTYPE4 STR C_AIRMASS #airmass coeff
TUNIT4 STR mag per airmass
TFORM4 STR E
TSCAL4 F64 1.000000
TZERO4 F64 0.000000
TTYPE5 STR C_COLOR #color coeff
TUNIT5 STR mag per mag
TFORM5 STR E
TSCAL5 F64 1.000000
TZERO5 F64 0.000000
TTYPE6 STR START_TIME #start time of measurement
TUNIT6 STR seconds since Jan 1, 1970 UT
TFORM6 STR J
TSCAL6 F64 1.000000
TZERO6 F64 0.000000
TTYPE7 STR STOP_TIME #stop time of measurement
TUNIT7 STR seconds since Jan 1, 1970 UT
TFORM7 STR J
TSCAL7 F64 1.000000
TZERO7 F64 0.000000
TTYPE8 STR C1_CODE #code 1 for color
TUNIT8 STR photcode
TFORM8 STR I
TSCAL8 F64 1.000000
TZERO8 F64 0.000000
TTYPE9 STR C2_CODE #code 2 for color
TUNIT9 STR photcode
TFORM9 STR I
TSCAL9 F64 1.000000
TZERO9 F64 0.000000
TTYPE10 STR PHOTCODE #photcode
TUNIT10 STR photcode
TFORM10 STR I
TSCAL10 F64 1.000000
TZERO10 F64 0.000000
TTYPE11 STR LABEL #data label
TUNIT11 STR
TFORM11 STR 64A
TSCAL11 F64 1.000000
TZERO11 F64 0.000000
TTYPE12 STR REFCODE #photcode
TUNIT12 STR photcode
TFORM12 STR I
TSCAL12 F64 1.000000
TZERO12 F64 0.000000
TTYPE13 STR N_TIME #number of times
TUNIT13 STR
TFORM13 STR J
TSCAL13 F64 1.000000
TZERO13 F64 0.000000
TTYPE14 STR N_MEAS #number of measurements
TUNIT14 STR
TFORM14 STR J
TSCAL14 F64 1.000000
TZERO14 F64 0.000000

example fits file