@Override public void setDataToZero() { float[] data = (float[]) dataArray.get1DJavaArray(dataArray.getDataType()); Arrays.fill(data, 0.0f); }
public float[] readAllData() throws IOException { Array allData; Array hrData = null; RadialDatasetSweep.Sweep spn = (RadialDatasetSweep.Sweep)sweeps.get(sweeps.size()-1); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Array hrData = null; RadialDatasetSweep.Sweep spn = (RadialDatasetSweep.Sweep)sweeps.get(sweeps.size()-1); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Array hrData = null; RadialDatasetSweep.Sweep spn = (RadialDatasetSweep.Sweep)sweeps.get(sweeps.size()-1); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Sweep spn = (Sweep) sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float[]) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Sweep spn = (Sweep)sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws java.io.IOException { Array allData; Sweep spn = (Sweep)sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(Float.TYPE); }
public float[] readAllData() throws IOException { Array allData; Sweep spn = (Sweep)sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float []) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Sweep spn = (Sweep) sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float[]) allData.get1DJavaArray(float.class); }
public float[] readAllData() throws IOException { Array allData; Sweep spn = (Sweep) sweeps.get(0); Variable v = spn.getsweepVar(); try { allData = v.read(); } catch (IOException e) { throw new IOException(e.getMessage()); } return (float[]) allData.get1DJavaArray(float.class); }
public float[] getAzimuth() throws IOException { Array aziData = null; try{ Variable azi = ds.findVariable("Azimuth"); aziData = azi.read(); } catch (IOException e) { e.printStackTrace(); meanElevation = 0.0; } return (float [])aziData.get1DJavaArray(float.class); }
/** * @deprecated use get1DJavaArray(DataType wantType) */ public Object get1DJavaArray(Class wantType) { DataType want = DataType.getType(wantType, isUnsigned()); return get1DJavaArray(want); }
public float[] getElevation() throws IOException { float[] spArray = null; try { Variable sp = ds.findVariable("elevation"); Array spData = sp.read(); sp.setCachedData(spData, false); spArray = (float[]) spData.get1DJavaArray(float.class); } catch (IOException e) { e.printStackTrace(); } return spArray; }
public float[] getElevation() throws IOException { float[] spArray = null; try { Variable sp = ds.findVariable("elevation"); Array spData = sp.read(); sp.setCachedData(spData, false); spArray = (float[]) spData.get1DJavaArray(float.class); } catch (IOException e) { e.printStackTrace(); } return spArray; }
public float getRadialDistance(int gate) throws IOException { float gateStart = getRangeToFirstGate(); Variable gateSize = ds.findVariable("GateWidth"); float [] data = (float [])gateSize.read().get1DJavaArray(float.class); float dist = gateStart + gate*data[0]; return dist; }
public float[] getAzimuth() throws IOException { Variable sp = ds.findVariable("azimuth"); Array spData = sp.read(); sp.setCachedData(spData, false); return (float[]) spData.get1DJavaArray(float.class); }
public float getRadialDistance(int gate) throws IOException { float gateStart = getRangeToFirstGate(); Variable gateSize = ds.findVariable("GateWidth"); float [] data = (float [])gateSize.read().get1DJavaArray(float.class); float dist = (float)(gateStart + gate*data[0]); return dist; }
public float[] getAzimuth() throws IOException { Variable sp = ds.findVariable("azimuth"); Array spData = sp.read(); sp.setCachedData(spData, false); return (float[]) spData.get1DJavaArray(float.class); }
public float[] readData() throws IOException { Array allData = null; int[] shape = sweepVar.getShape(); int[] origind = new int[sweepVar.getRank()]; try { allData = sweepVar.read(origind, shape); } catch (InvalidRangeException e) { throw new IOException(e.getMessage()); } return (float[]) allData.get1DJavaArray(float.class); }
/** * Reads all the data for this variable and returns them as an array of a Java primitive type. * Multi-dimensional variables are flattened as a one-dimensional array (wrapped in a vector). * This method may cache the returned vector, at UCAR library choice. */ @Override public Vector read() throws IOException { final Array array = variable.read(); // May be cached by the UCAR library. return Vector.create(array.get1DJavaArray(array.getElementType()), variable.isUnsigned()); }