@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
private void writeRecordData(ucar.nc2.Structure s, Section section, ArrayStructure structureArray) throws java.io.IOException, ucar.ma2.InvalidRangeException { int countSrcRecnum = 0; Range recordRange = section.getRange(0); for (int recnum : recordRange) { StructureData sdata = structureArray.getStructureData(countSrcRecnum); writeRecordData(s, recnum, sdata); countSrcRecnum++; } }
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { Vgroup vgroup = (Vgroup) v2.getSPobject(); Range scanRange = section.getRange(0); Range radialRange = section.getRange(1); Range gateRange = section.getRange(2); Array data = Array.factory(v2.getDataType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); for (int scanIdx : scanRange) { Level2Record[] mapScan = vgroup.map[scanIdx]; readOneScan(mapScan, radialRange, gateRange, vgroup.datatype, ii); } return data; }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { Vgroup vgroup = (Vgroup) v2.getSPobject(); Range scanRange = section.getRange(0); Range radialRange = section.getRange(1); Range gateRange = section.getRange(2); Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); for (int i=scanRange.first(); i<=scanRange.last(); i+= scanRange.stride()) { Level2Record[] mapScan = vgroup.map[i]; readOneScan(mapScan, radialRange, gateRange, vgroup.datatype, ii); } return data; }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { Vgroup vgroup = (Vgroup) v2.getSPobject(); Range scanRange = section.getRange(0); Range radialRange = section.getRange(1); Range gateRange = section.getRange(2); Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); for (int i=scanRange.first(); i<=scanRange.last(); i+= scanRange.stride()) { Level2Record[] mapScan = vgroup.map[i]; readOneScan(mapScan, radialRange, gateRange, vgroup.datatype, ii); } return data; }
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { Vgroup vgroup = (Vgroup) v2.getSPobject(); Range scanRange = section.getRange(0); Range radialRange = section.getRange(1); Range gateRange = section.getRange(2); Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); for (int i = scanRange.first(); i <= scanRange.last(); i += scanRange.stride()) { Ray[] mapScan = vgroup.map[i]; readOneScan(mapScan, radialRange, gateRange, vgroup.abbrev, ii); } return data; }
private void incr() { int digit = getRank() - 1; while (digit >= 0) { Range r = getRange(digit); odo[digit] += r.stride(); if (odo[digit] <= r.last()) break; // normal exit odo[digit] = r.first(); // else, carry digit--; assert digit >= 0; // catch screw-ups } }
Iterator(int[] shape) { int ss = 1; for (int i = getRank() - 1; i >= 0; i--) { odo[i] = getRange(i).first(); stride[i] = ss; ss *= shape[i]; } done = 0; total = Index.computeSize(getShape()); // total in the section }
Iterator(int[] shape) { int ss = 1; for (int i = getRank() - 1; i >= 0; i--) { odo[i] = getRange(i).first(); stride[i] = ss; ss *= shape[i]; } done = 0; total = Index.computeSize(getShape()); // total in the section }
private void incr() { int digit = getRank() - 1; while (digit >= 0) { Range r = getRange(digit); odo[digit] += r.stride(); if (odo[digit] <= r.last()) break; // normal exit odo[digit] = r.first(); // else, carry digit--; assert digit >= 0; // catch screw-ups } }
private void writeRecordData(ucar.nc2.Structure s, Section section, ArrayStructure structureArray) throws java.io.IOException, ucar.ma2.InvalidRangeException { int countSrcRecnum = 0; Range recordRange = section.getRange(0); for (int recnum = recordRange.first(); recnum <= recordRange.last(); recnum += recordRange.stride()) { StructureData sdata = structureArray.getStructureData(countSrcRecnum); writeRecordData(s, recnum, sdata); countSrcRecnum++; } }
public Array readData1(Variable v2, Section section, float[] values) { Array data = Array.factory(v2.getDataType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); // radial range can also be gate range for (int radialIdx : radialRange) { ii.setFloatNext(values[radialIdx]); } return data; }
public Array readData2(Variable v2, Section section, double[] values) { Array data = Array.factory(v2.getDataType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); for (int radialIdx : radialRange) { ii.setDoubleNext(values[radialIdx]); } return data; }
public Array readData1(Variable v2, Section section, float[] values) { Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); // radial range can also be gate range for (int r = radialRange.first(); r <= radialRange.last(); r += radialRange.stride()) { ii.setFloatNext(values[r]); } return data; }
public Array readData2(Variable v2, Section section, double[] values) { Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); for (int r = radialRange.first(); r <= radialRange.last(); r += radialRange.stride()) { ii.setDoubleNext(values[r]); } return data; }
public Array readData2(Variable v2, Section section, double[] values) { Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); for (int r = radialRange.first(); r <= radialRange.last(); r += radialRange.stride()) { ii.setDoubleNext(values[r]); } return data; }
public Array readData1(Variable v2, Section section, float[] values) { Array data = Array.factory(v2.getDataType().getPrimitiveClassType(), section.getShape()); IndexIterator ii = data.getIndexIterator(); Range radialRange = section.getRange(0); // radial range can also be gate range for (int r = radialRange.first(); r <= radialRange.last(); r += radialRange.stride()) { ii.setFloatNext(values[r]); } return data; }