### Question:
TopoPhase { public void gridData() throws Exception { if (rngAzRatio == 0) { calculateScalingRatio(); } int mlAz = masterMeta.getMlAz(); int mlRg = masterMeta.getMlRg(); int offset = 0; demPhase = TriangleUtils.gridDataLinear(demRadarCode_y, demRadarCode_x, demRadarCode_phase, tileWindow, rngAzRatio, mlAz, mlRg, dem.noDataValue, offset); } TopoPhase(DemTile dem, DemTile demTile, DemTile tile, Window tileWindow);  TopoPhase(SLCImage masterMeta, Orbit masterOrbit, SLCImage slaveMeta, Orbit slaveOrbit, Window window, DemTile demTile); void setMasterOrbit(Orbit masterOrbit); void setMasterMeta(SLCImage masterMeta); void setSlaveOrbit(Orbit slaveOrbit); void setSlaveMeta(SLCImage slaveMeta); void setWindow(Window window); double[][] getDemRadarCode_phase(); double[][] getDemRadarCode_x(); double[][] getDemRadarCode_y(); double getRngAzRatio(); void setRngAzRatio(double rngAzRatio); synchronized void radarCode(); void calculateScalingRatio(); void gridData(); public double[][] demPhase; }### Answer:
@Test public void testGridding() throws Exception { double[][] grd_EXPECTED; String testDataDir = "/d2/etna_test/demTest/"; String bufferFileName; bufferFileName = testDataDir + "output_buffer.r8.swap"; grd_EXPECTED = readDoubleData(bufferFileName, 128, 512).toArray2(); long t0 = System.currentTimeMillis(); topoPhase.gridData(); long t1 = System.currentTimeMillis(); logger.info("Data set gridded in " + (0.001 * (t1 - t0)) + " sec"); for (int i = 0; i < grd_EXPECTED.length; i++) { double[] doubles = grd_EXPECTED[i]; Assert.assertArrayEquals(doubles, topoPhase.demPhase[i], DELTA_04); } }