/** * Debug info for this object. */ public String toStringDebug(Object o) { if (o instanceof Variable) { Variable v = (Variable) o; H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); return vinfo.toString(); } return null; }
public String toStringDebug(Object o) { if (o instanceof Variable) { Variable v = (Variable) o; H4header.Vinfo vinfo = (H4header.Vinfo) v.getSPobject(); return (vinfo != null) ? vinfo.toString() : ""; } return null; }
public void deflate(Formatter f, Variable v) throws IOException { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); DataBTree btree = vinfo.btree; if (btree == null || vinfo.useFillValue) { f.format("%s not chunked%n", v.getShortName()); return; } }
@Override public String toStringDebug(Object o) { if (o instanceof Variable) { Variable v = (Variable) o; H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); return vinfo.toString(); } return null; }
public void deflate(Formatter f, Variable v) throws IOException { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); DataBTree btree = vinfo.btree; if (btree == null || vinfo.useFillValue) { f.format("%s not chunked%n", v.getShortName()); return; } }
public String toStringDebug(Object o) { if (o instanceof Variable) { Variable v = (Variable) o; H4header.Vinfo vinfo = (H4header.Vinfo) v.getSPobject(); return (vinfo != null) ? vinfo.toString() : ""; } return null; }
public void deflate(Formatter f, Variable v) throws IOException { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); DataBTree btree = vinfo.btree; if (btree == null || vinfo.useFillValue) { f.format("%s not chunked%n", v.getShortName()); return; } }
public Array readData(ucar.nc2.Variable v2, Section section) throws IOException, InvalidRangeException { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debugRead) System.out.printf("%s read %s%n", v2.getFullName(), section); return readData(v2, vinfo.dataPos, section); }
public Array readData(ucar.nc2.Variable v2, Section section) throws IOException, InvalidRangeException { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debugRead) System.out.printf("%s read %s%n", v2.getFullName(), section); return readData(v2, vinfo.dataPos, section); }
@Override public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) v2.getSPobject(); return new ArraySequence( vinfo.sm, new SeqIter(vinfo), vinfo.nelems); }
private StructureData readStructure(Structure s, ArrayStructureW asw, long dataPos) throws IOException, InvalidRangeException { StructureDataW sdata = new StructureDataW(asw.getStructureMembers()); if (debug) System.out.println(" readStructure " + s.getFullName() + " dataPos = " + dataPos); for (Variable v2 : s.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); if (debug) System.out.println(" readStructureMember " + v2.getFullName() + " vinfo = " + vinfo); Array dataArray = readData(v2, dataPos + vinfo.dataPos, v2.getShapeAsSection()); sdata.setMemberData(v2.getShortName(), dataArray); } return sdata; }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
@Override public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { Vinfo vinfo = (Vinfo) v2.getSPobject(); int vlen = (int) v2.getSize(); int len = (int) section.computeSize(); if (vlen == len) // entire array return readDataAll(vinfo.g4.grpid, vinfo.varid, vinfo.typeid, v2.getShapeAsSection()); //if(!section.isStrided()) // optimisation for unstrided section // return readUnstrided(vinfo.grpid, vinfo.varid, vinfo.typeid, section); return readDataSection(vinfo.g4.grpid, vinfo.varid, vinfo.typeid, section); }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
CatIterator(Entry[] entries, Structure useStructure) { this.entries = entries; members = useStructure.makeStructureMembers(); for (Variable v2 : useStructure.getVariables()) { Vinfo vinfo = (Vinfo) v2.getSPobject(); StructureMembers.Member m = members.findMember(v2.getShortName()); m.setDataParam(vinfo.offset); } }
@Override public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) v2.getSPobject(); if (stationId != null) return new ArraySequence(vinfo.sm, new SingleStationSeqIter(vinfo), vinfo.nelems); else return new ArraySequence(vinfo.sm, new StationSeqIter(vinfo), vinfo.nelems); }
@Override public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) v2.getSPobject(); if (stationId != null) return new ArraySequence(vinfo.sm, new SingleStationSeqIter(vinfo), vinfo.nelems); else return new ArraySequence(vinfo.sm, new StationSeqIter(vinfo), vinfo.nelems); }
private ucar.ma2.Array readNestedData(ucar.nc2.Variable v2, Section section) throws java.io.IOException, ucar.ma2.InvalidRangeException { N3header.Vinfo vinfo = (N3header.Vinfo) v2.getSPobject(); DataType dataType = v2.getDataType(); // construct the full shape for use by RegularIndexer int[] fullShape = new int[v2.getRank() + 1]; fullShape[0] = header.numrecs; // the first dimension System.arraycopy(v2.getShape(), 0, fullShape, 1, v2.getRank()); // the remaining dimensions Layout layout = new LayoutRegularSegmented(vinfo.begin, v2.getElementSize(), header.recsize, fullShape, section); Object dataObject = readData(layout, dataType); return Array.factory(dataType.getPrimitiveClassType(), section.getShape(), dataObject); }
@Override public long readToByteChannel(ucar.nc2.Variable v2, Section section, WritableByteChannel channel) throws java.io.IOException, ucar.ma2.InvalidRangeException { if (v2 instanceof Structure) return readRecordData((Structure) v2, section, channel); N3header.Vinfo vinfo = (N3header.Vinfo) v2.getSPobject(); DataType dataType = v2.getDataType(); Layout layout = (!v2.isUnlimited()) ? new LayoutRegular(vinfo.begin, v2.getElementSize(), v2.getShape(), section) : new LayoutRegularSegmented(vinfo.begin, v2.getElementSize(), header.recsize, v2.getShape(), section); return readData(layout, dataType, channel); }
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; }