public void ForwardPropagation(Mirror1D.Coord1D Opt1,ref Mirror1D.Coord1D Opt2) { Complex[] _u; ForwardPropagation(Opt1.x, Opt1.y, Opt1.u, Opt2.x, Opt2.y, out _u); Opt2.u = _u; InP(ref Opt2); _u = null; }
public static void InP(ref Mirror1D.Coord1D coord) { double[] _Intensity; double[] _Phase; InP(coord.u, out _Intensity, out _Phase); coord.Intensity = _Intensity; coord.Phase = _Phase; }
//FWHM計算 public static double FWHM(Mirror1D.Coord1D f) { int div = f.Intensity.Length; double[] PosX = new double[div]; double max = 0.0; double iMax = 0; for (int i = 0; i < div; i++) { if (f.Intensity[i] > max) { max = f.Intensity[i]; iMax = i; } PosX[i] = Math.Sqrt(Math.Pow(f.y[i] - f.y[0], 2.0) + Math.Pow(f.x[i] - f.x[0], 2.0)); } double dblePos1 = 0.0; double dblePos2 = 0.0; for (int i = 1; i < iMax; i++) if (max / 2.0 < f.Intensity[i]) { dblePos1 = (PosX[i] - PosX[i - 1]) / (f.Intensity[i] - f.Intensity[i - 1]) * (max / 2.0 - f.Intensity[i]) + PosX[i]; break; } for (int i = div - 2; i > iMax; i--) if (max / 2.0 < f.Intensity[i]) { dblePos2 = (PosX[i] - PosX[i + 1]) / (f.Intensity[i] - f.Intensity[i + 1]) * (max / 2.0 - f.Intensity[i]) + PosX[i]; break; } return dblePos2 - dblePos1; }