- Timestamp:
- May 28, 2016, 5:06:23 PM (10 years ago)
- Location:
- trunk/Ohana/src/libdvo
- Files:
-
- 2 edited
-
include/dvo.h (modified) (3 diffs)
-
src/galaxy_model.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/include/dvo.h
r39531 r39588 205 205 ID_OBJ_GOOD = 0x02000000, // good-quality measurement in our data (eg,PS) 206 206 ID_OBJ_GOOD_ALT = 0x04000000, // good-quality measurement in external data (eg, 2MASS) 207 ID_OBJ_GOOD_STACK = 0x08000000, // good-quality object in the stack (> =1 good stack)207 ID_OBJ_GOOD_STACK = 0x08000000, // good-quality object in the stack (> 1 good stack) 208 208 ID_OBJ_BEST_STACK = 0x10000000, // the primary stack measurement are the best measurements 209 209 ID_OBJ_SUSPECT_STACK = 0x20000000, // suspect object in the stack (> 1 good or suspect stack, < 2 good) … … 226 226 ID_SECF_RANK_3 = 0x00000800, // average magnitude uses rank 3 values 227 227 ID_SECF_RANK_4 = 0x00001000, // average magnitude uses rank 4 values 228 ID_SECF_OBJ_EXT_PSPS = 0x00002000, // In PSPS ID_SECF_OBJ_EXT is moved here so it fits within 16 bits 228 ID_SECF_OBJ_EXT_PSPS = 0x00002000, // In PSPS ID_SECF_OBJ_EXT is moved here so it fits within 16 bits 229 229 ID_SECF_STACK_PRIMARY = 0x00004000, // PS1 stack photometry comes from primary skycell 230 230 ID_SECF_OBJ_EXT = 0x01000000, // extended in this band … … 1192 1192 // galaxy_model: 1193 1193 int TransformProperMotion_radians (double *uR, double *uD, double uL, double uB, double Rrad, double Drad, CoordTransform *transform); 1194 int TransformProperMotion (double *uR, double *uD, double uL, double uB, double R, double D, CoordTransform *transform); 1194 int TransformProperMotionForewards (double *uL, double *uB, double uR, double uD, double R, double D, CoordTransform *transform); 1195 int TransformProperMotionBackwards (double *uR, double *uD, double uL, double uB, double R, double D, CoordTransform *transform); 1195 1196 int SolarMotionModel_radians (double *uL_sol, double *uB_sol, double Lrad, double Brad, double distance); 1196 1197 int SolarMotionModel (double *uL_sol, double *uB_sol, double L, double B, double distance); -
trunk/Ohana/src/libdvo/src/galaxy_model.c
r37807 r39588 61 61 } 62 62 63 // Use the inverse transform: CELESTIAL->GALACTIC for uL,uB -> uR,uD 64 int TransformProperMotion (double *uR, double *uD, double uL, double uB, double R, double D, CoordTransform *transform) { 63 // Use with the forward transformation: CELESTIAL->GALACTIC for uR,uD -> uL,uB 64 int TransformProperMotionForewards (double *uL, double *uB, double uR, double uD, double R, double D, CoordTransform *transform) { 65 66 double Rrad = R*RAD_DEG; 67 double Drad = D*RAD_DEG; 68 69 // C1, C2 are from http://arxiv.org/pdf/1306.2945v2.pdf 70 double C1 = 71 cos(Drad)*transform->cos_phi + 72 sin(Drad)*cos(Rrad)*transform->sin_phi_sin_Xo - 73 sin(Drad)*sin(Rrad)*transform->sin_phi_cos_Xo; 74 75 double C2 = 76 - cos(Rrad)*transform->sin_phi_cos_Xo 77 - sin(Rrad)*transform->sin_phi_sin_Xo; 78 79 double cosBinv = 1.0 / sqrt(C1*C1 + C2*C2); 80 81 // XXX add errors : I need to be able to choose the stars based on the error distribution 82 *uL = cosBinv * (C1 * uR + C2 * uD); 83 *uB = cosBinv * (C1 * uD - C2 * uR); 84 85 return TRUE; 86 } 87 88 // Use with the forward transformation: CELESTIAL->GALACTIC for uL,uB -> uR,uD 89 int TransformProperMotionBackwards (double *uR, double *uD, double uL, double uB, double R, double D, CoordTransform *transform) { 65 90 66 91 double Rrad = R*RAD_DEG; … … 85 110 return TRUE; 86 111 } 112 87 113 int TransformProperMotion_radians (double *uR, double *uD, double uL, double uB, double Rrad, double Drad, CoordTransform *transform) { 88 114
Note:
See TracChangeset
for help on using the changeset viewer.
