Changeset 16787
- Timestamp:
- Mar 2, 2008, 2:26:47 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080223/Ohana/src/relastro/src/UpdateObjects.c
r16633 r16787 38 38 } 39 39 40 enum {ERROR_MODE_RA, ERROR_MODE_DEC}; 41 42 float GetAstromError (Measure *measure, int mode) { 43 44 PhotCode *code; 45 float dPobs, dPsys, dPtotal, dM, AS, MS; 46 47 switch (mode) { 48 case ERROR_MODE_RA: 49 dPobs = measure[0].dXccd; // need to redefine this as RAerr 50 break; 51 case ERROR_MODE_DEC: 52 dPobs = measure[0].dYccd; // need to redefine this as RAerr 53 break; 54 default: 55 abort(); 56 } 57 58 /* the astrometric errors are not being carried yet (but should be!) */ 59 /* we use the photometric mag error as a weighting term */ 60 61 code = GetPhotcodebyCode (measure[0].photcode); 62 AS = code[0].astromErrScale; 63 MS = code[0].astromErrMagScale; 64 dPsys = code[0].astromErrSys; 65 dM = measure[0].dM; 66 67 dPtotal = sqrt(SQ(dPsys) + AS*SQ(dPobs) + MS*SQ(dM)); 68 dPtotal = MAX (dPtotal, MIN_ERROR); 69 70 return (dPtotal); 71 } 72 40 73 int UpdateObjects (Catalog *catalog, int Ncatalog) { 41 74 … … 48 81 double Tmin, Tmax; 49 82 float errorScale; 50 PhotCode *code;51 83 52 84 initObjectData (catalog, Ncatalog); … … 96 128 Tmax = MAX(Tmax, T[N]); 97 129 98 /* the astrometric errors are not being carried yet (but should be!) */ 99 /* we use the photometric mag error as a weighting term */ 100 101 code = GetPhotcodebyCode (catalog[0].measure[m].photcode); 102 errorScale = code[0].astromScale; 103 dR[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR) * errorScale; 104 dD[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR) * errorScale; 130 dR[N] = GetAstromError (&catalog[i].measure[m], ERROR_MODE_RA); 131 dD[N] = GetAstromError (&catalog[i].measure[m], ERROR_MODE_DEC); 105 132 dT[N] = catalog[i].measure[m].dt; 106 133
Note:
See TracChangeset
for help on using the changeset viewer.
