Search in sources :

Example 16 with Variable

use of org.jpl7.Variable in project vcell by virtualcell.

the class NetCDFReader method getExperimentType.

/**
 * Get experiment time.
 * ExpType = 1; This indicates that this NetCDF file is a 'Single model' file.
 * ExpType = 2; This indicates that this NetCDF file is a 'Multi-model' file.
 * @return int, experiment type.
 */
public int getExperimentType() throws IOException {
    Variable v = ncfile.findVariable("ExpType");
    int val = 0;
    try {
        val = v.readScalarInt();
    } catch (IOException ioe) {
        ioe.printStackTrace(System.err);
        throw new IOException("Cannot get proper experiment type from the model.");
    }
    return val;
}
Also used : Variable(ucar.nc2.Variable) IOException(java.io.IOException)

Example 17 with Variable

use of org.jpl7.Variable in project vcell by virtualcell.

the class NetCDFReader method getEndTime.

/**
 * Get ending time. 0 dimenstion
 * @return double, ending time.
 */
public double getEndTime() throws IOException {
    Variable v = ncfile.findVariable("TEnd");
    Double val = 0.0;
    try {
        val = v.readScalarDouble();
    } catch (IOException ioe) {
        ioe.printStackTrace(System.err);
        throw new IOException("Cannot get proper ending time from the model.");
    }
    return val;
}
Also used : Variable(ucar.nc2.Variable) IOException(java.io.IOException) ArrayDouble(ucar.ma2.ArrayDouble)

Example 18 with Variable

use of org.jpl7.Variable in project vcell by virtualcell.

the class NetCDFReader method getCellGrowthTimeSD.

/**
 * Get cell growth time SD, which is the standard deviation of the time between cell divisions.
 * @return double, standard deviation of cell growth time.
 */
public double getCellGrowthTimeSD() throws IOException {
    Variable v = ncfile.findVariable("CellGrowthTimeSD");
    Double val = 0.0;
    try {
        val = v.readScalarDouble();
    } catch (IOException ioe) {
        ioe.printStackTrace(System.err);
        throw new IOException("Cannot get proper standard deviation of the time between cell divisions from the model.");
    }
    return val;
}
Also used : Variable(ucar.nc2.Variable) IOException(java.io.IOException) ArrayDouble(ucar.ma2.ArrayDouble)

Example 19 with Variable

use of org.jpl7.Variable in project vcell by virtualcell.

the class NetCDFReader method getNumModels_Variable.

/**
 * Get Number of Models.
 * @return int. number of models.
 */
public int getNumModels_Variable() throws IOException {
    Variable v = ncfile.findVariable("NumModels");
    int val = 0;
    try {
        val = v.readScalarInt();
    } catch (IOException ioe) {
        ioe.printStackTrace(System.err);
        throw new IOException("Cannot get proper variable of number of models from the file.");
    }
    return val;
}
Also used : Variable(ucar.nc2.Variable) IOException(java.io.IOException)

Example 20 with Variable

use of org.jpl7.Variable in project vcell by virtualcell.

the class NetCDFReader method getCellGrowthTime.

/**
 * Get cell growth time, which is the average amount of time between cell divisions.
 * @return double, cell growth time.
 */
public double getCellGrowthTime() throws IOException {
    Variable v = ncfile.findVariable("CellGrowthTime");
    Double val = 0.0;
    try {
        val = v.readScalarDouble();
    } catch (IOException ioe) {
        ioe.printStackTrace(System.err);
        throw new IOException("Cannot get proper cell growth time from the model.");
    }
    return val;
}
Also used : Variable(ucar.nc2.Variable) IOException(java.io.IOException) ArrayDouble(ucar.ma2.ArrayDouble)

Aggregations

Query (org.jpl7.Query)25 Variable (org.jpl7.Variable)24 Term (org.jpl7.Term)23 Variable (ucar.nc2.Variable)23 IOException (java.io.IOException)20 Compound (org.jpl7.Compound)17 Atom (org.jpl7.Atom)12 ArrayDouble (ucar.ma2.ArrayDouble)11 Map (java.util.Map)9 Attribute (ucar.nc2.Attribute)6 Integer (org.jpl7.Integer)4 org.jpl7.fli.term_t (org.jpl7.fli.term_t)4 BigInteger (java.math.BigInteger)3 Dimension (ucar.nc2.Dimension)3 Group (ucar.nc2.Group)3 DataPoint (net.sf.mzmine.datamodel.DataPoint)2 TikaException (org.apache.tika.exception.TikaException)2 TemporaryResources (org.apache.tika.io.TemporaryResources)2 TikaInputStream (org.apache.tika.io.TikaInputStream)2 Property (org.apache.tika.metadata.Property)2