Beispiel #1
0
 /**
  * Computes time shifts between PP and PS2 images, here referred to as 'U2' time shifts.
  *
  * @param s1
  * @param u1
  * @param sS
  * @param uS
  * @return
  */
 public static float[] computeU2(Sampling s1, float[] u1, Sampling sS, float[] uS) {
   int n1 = u1.length;
   float[] x1 = getValues(s1);
   CubicInterpolator ci = new CubicInterpolator(Method.LINEAR, getValues(sS), uS);
   float[] u2 = new float[n1];
   for (int i1 = 0; i1 < n1; i1++) u2[i1] = u1[i1] + ci.interpolate(x1[i1] + u1[i1]);
   return u2;
 }
Beispiel #2
0
 public static float[] interpUS(Sampling sf, float[] u1, float[] ust) {
   int n1 = ust.length;
   float[] us = new float[n1];
   float[] xf = getValues(sf);
   float[] xu = new float[n1];
   for (int i1 = 0; i1 < n1; i1++) xu[i1] = xf[i1] + u1[i1];
   CubicInterpolator ci = new CubicInterpolator(Method.MONOTONIC, xu, ust);
   for (int i1 = 0; i1 < n1; i1++) us[i1] = ci.interpolate(xf[i1]);
   return us;
 }
Beispiel #3
0
 public static float[] ps1ToPpTime(Sampling sf, float[] u1, Sampling sg, float[] g) {
   int n1 = u1.length;
   int ng = g.length;
   float[] xg = new float[ng];
   for (int ig = 0; ig < ng; ig++) xg[ig] = (float) sg.getValue(ig);
   CubicInterpolator ci = new CubicInterpolator(Method.LINEAR, xg, g);
   float[] gp = new float[n1];
   for (int i1 = 0; i1 < n1; i1++) gp[i1] = ci.interpolate((float) (sf.getValue(i1) + u1[i1]));
   return gp;
 }
Beispiel #4
0
 private static float[] compositeShifts(int n1, float[] x, float[] u1, float[] u2) {
   float[] uc = new float[n1];
   CubicInterpolator ci = new CubicInterpolator(Method.LINEAR, x, u2);
   for (int i1 = 0; i1 < n1; i1++) uc[i1] = u1[i1] + ci.interpolate(x[i1] + u1[i1]);
   return uc;
 }