Changeset 16781
- Timestamp:
- Mar 2, 2008, 2:21:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080223/Ohana/src/libdvo/src/LoadPhotcodesText.c
r15694 r16781 27 27 char *c; 28 28 char line[256], **c1_names, **c2_names, **eq_names; 29 char name[32], type[32], Zero[32], Airmass[32], Offset[32], 30 C1[32], C2[32], Slope[32], Color[32], Primary[32]; 29 char name[32], type[32], Zero[32], Airmass[32], Offset[32]; 30 char C1[32], C2[32], Slope[32], Color[32], Primary[32]; 31 char astromErrSys[32], astromErrScale[32], astromErrMagScale[32], photomErrSys[32]; 31 32 32 33 table = GetPhotcodeTable (); … … 60 61 for (c = line; isspace (*c); c++); 61 62 if (*c == '#') continue; 62 Nfield = sscanf (c, "%d %s %s %s %s %s %s %s %s %s %s", 63 &code, name, type, Zero, Airmass, Offset, C1, C2, Slope, Color, Primary); 64 65 // XXX to add the AstromError (and PhotError) terms, we need to add them to the photcode structure, and 66 // define methods to read (at least) the old and the new photcode versions. 67 68 if (Nfield != 11) { continue; } 69 63 Nfield = sscanf (c, "%d %s %s %s %s %s %s %s %s %s %s %s %s %s %s", 64 &code, name, type, Zero, Airmass, Offset, C1, C2, Slope, Color, Primary, astromErrSys, astromErrScale, astromErrMagScale, photomErrSys); 65 66 switch (Nfield) { 67 case 11: 68 // minimum number of fields : original elixir layout 69 strcpy (astromErrSys, "0.0"); 70 strcpy (astromErrScale, "0.0"); 71 strcpy (astromErrMagScale, "0.0"); 72 strcpy (photomErrSys, "0.0"); 73 break; 74 case 14: 75 // allow only astrom elements 76 strcpy (photomErrSys, "0.0"); 77 break; 78 case 15: 79 // all fields defined 80 break; 81 default: 82 // skip unknown layouts 83 continue; 84 } 85 70 86 if (!code) { 71 87 fprintf (stderr, "photcode values may not be 0: fix %s\n", name); … … 95 111 photcode[Ncode].type = PHOT_ALT; 96 112 } 113 114 photcode[Ncode].astromErrSys = atof (astromErrSys); 115 photcode[Ncode].astromErrScale = atof (astromErrScale); 116 photcode[Ncode].astromErrMagScale = atof (astromErrMagScale); 117 photcode[Ncode].photomErrSys = atof (photomErrSys); 97 118 98 119 switch (photcode[Ncode].type) {
Note:
See TracChangeset
for help on using the changeset viewer.
