Changeset 39926 for trunk/Ohana/src/opihi/cmd.astro
- Timestamp:
- Jan 6, 2017, 11:30:10 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/opihi/cmd.astro/csystem.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro/fitplx_irls.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/spex1dgas.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro/spex2dgas.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro/spexseq.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/czw_branch/20160809 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana
-
trunk/Ohana/src/opihi/cmd.astro/csystem.c
r39591 r39926 125 125 opihi_flt *yptr = yvec[0].elements.Flt; 126 126 127 opihi_flt *uxptr = uxvec ? xvec[0].elements.Flt : NULL;128 opihi_flt *uyptr = uyvec ? yvec[0].elements.Flt : NULL;127 opihi_flt *uxptr = uxvec ? uxvec[0].elements.Flt : NULL; 128 opihi_flt *uyptr = uyvec ? uyvec[0].elements.Flt : NULL; 129 129 130 130 for (i = 0; i < xvec[0].Nelements; i++, xptr++, yptr++) { -
trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
r39610 r39926 158 158 // now that the mask has been updated, we need to recalculate mean epoch and positions 159 159 // XXX make this conditional on actually masking unmasked points above 160 PlxSetMeanEpoch (R, D, T, &Rmean, &Dmean, &Tmean, mask, Ntotal);161 PlxSetEpochPosition (&fitdata, R, D, dR, dD, T, mask, Ntotal, &coords, Tmean);160 // PlxSetMeanEpoch (R, D, T, &Rmean, &Dmean, &Tmean, mask, Ntotal); 161 // PlxSetEpochPosition (&fitdata, R, D, dR, dD, T, mask, Ntotal, &coords, Tmean); 162 162 163 163 PlxFitData sample; … … 218 218 // fprintf (stderr, "%f +/- %f | %f %f\n", fit.p, fit.dp, fit.uR, fit.uD); 219 219 220 /* 221 FILE *f = fopen ("test.pf.dat", "w"); 220 Vector *dRresPMP, *dDresPMP, *dRresPLX, *dDresPLX; 221 222 // save fit residuals (with only pm removed, and pm and plx removed) 223 if ((dRresPMP = SelectVector ("dRresPMP", ANYVECTOR, TRUE)) == NULL) ESCAPE ("cannot generate vector %s\n", "dRresPMP"); 224 if ((dDresPMP = SelectVector ("dDresPMP", ANYVECTOR, TRUE)) == NULL) ESCAPE ("cannot generate vector %s\n", "dDresPMP"); 225 if ((dRresPLX = SelectVector ("dRresPLX", ANYVECTOR, TRUE)) == NULL) ESCAPE ("cannot generate vector %s\n", "dRresPLX"); 226 if ((dDresPLX = SelectVector ("dDresPLX", ANYVECTOR, TRUE)) == NULL) ESCAPE ("cannot generate vector %s\n", "dDresPLX"); 227 228 ResetVector (dRresPMP, OPIHI_FLT, Ntotal); 229 ResetVector (dDresPMP, OPIHI_FLT, Ntotal); 230 ResetVector (dRresPLX, OPIHI_FLT, Ntotal); 231 ResetVector (dDresPLX, OPIHI_FLT, Ntotal); 232 222 233 for (i = 0; i < Ntotal; i++) { 223 double Xf = fit.Ro + fit.uR*fitdata.t[i] + fit.p*fitdata.pX[i]; 224 double Yf = fit.Do + fit.uD*fitdata.t[i] + fit.p*fitdata.pY[i]; 225 fprintf (f, "%f : %f %f : %f %f : %f : %f %f : %f %f\n", T[i], R[i], D[i], Xf, Yf, fitdata.t[i], fitdata.X[i], fitdata.Y[i], fitdata.pX[i], fitdata.pY[i]); 226 } 227 fclose (f); 228 */ 234 235 double x0, y0; 236 RD_to_XY (&x0, &y0, R[i], D[i], &coords); 237 238 double pX0, pY0; 239 ParFactor (&pX0, &pY0, R[i], D[i], T[i]); 240 241 double t0 = (T[i] - Tmean)/365.25; 242 243 double Xpmp = fit.Ro + fit.uR*t0 + fit.p*pX0; 244 double Ypmp = fit.Do + fit.uD*t0 + fit.p*pY0; 245 double Xplx = fit.Ro + fit.uR*t0; 246 double Yplx = fit.Do + fit.uD*t0; 247 248 dRresPMP->elements.Flt[i] = x0 - Xpmp; 249 dDresPMP->elements.Flt[i] = y0 - Ypmp; 250 dRresPLX->elements.Flt[i] = x0 - Xplx; 251 dDresPLX->elements.Flt[i] = y0 - Yplx; 252 } 229 253 230 254 // fprintf (stderr, "Roff, Doff: %f, %f; dRo, dDo: %f, %f\n", fit.Ro, fit.Do, fit.dRo, fit.dDo); -
trunk/Ohana/src/opihi/cmd.astro/spex1dgas.c
r33662 r39926 108 108 IDList = NULL; 109 109 XoList = NULL; 110 {111 // init random numbers112 long A, B;113 A = time(NULL);114 for (B = 0; A == time(NULL); B++);115 srand48(B);116 }117 110 111 // srand48() is called by startup.c 112 118 113 if (argc != 11) goto usage; 119 114 -
trunk/Ohana/src/opihi/cmd.astro/spex2dgas.c
r33662 r39926 120 120 float XoMax, YoMax; 121 121 122 { 123 // init random numbers 124 long A, B; 125 A = time(NULL); 126 for (B = 0; A == time(NULL); B++); 127 srand48(B); 128 } 129 122 // srand48() is called by startup.c 123 130 124 if (argc != 9) goto usage; 131 125 -
trunk/Ohana/src/opihi/cmd.astro/spexseq.c
r39457 r39926 90 90 int Nobject = 0; 91 91 92 {93 // init random numbers94 long A, B;95 A = time(NULL);96 for (B = 0; A == time(NULL); B++);97 srand48(B);98 }99 100 92 if (argc != 6) goto usage; 93 94 // srand48() is called by startup.c 101 95 102 96 // XXX enforce matching lengths on the three vectors
Note:
See TracChangeset
for help on using the changeset viewer.
