// do not call directly @Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { // see if its really a full read if ((null == section) || section.computeSize() == getSize()) return reallyRead(client, cancelTask); if (orgVar == null) return getMissingDataArray(section.getShape()); return orgVar.read(section); }
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()) { Cinrad2Record[] mapScan = vgroup.map[i]; readOneScan(mapScan, radialRange, gateRange, vgroup.datatype, ii); } return data; }
// section of regular Variable @Override protected Array _read(Section section) throws IOException, InvalidRangeException { // really a full read if ((null == section) || section.computeSize() == getSize()) return _read(); Array result; if (hasCachedData()) result = super._read(section); else result = proxyReader.reallyRead(this, section, null); if (needScaleOffsetMissing) return convertScaleOffsetMissing(result); else if (needEnumConversion) return convertEnums(result); else return result; }