예제 #1
0
 /**
  * public for debugging
  *
  * @param f put info here
  */
 public void showScaleMissingProxy(Formatter f) {
   f.format("use NaNs = %s%n", scaleMissingProxy.getUseNaNs());
   f.format("has missing = %s%n", scaleMissingProxy.hasMissing());
   if (scaleMissingProxy.hasMissing()) {
     Object mv = scaleMissingProxy.getFillValue(getDataType());
     String mvs =
         (mv instanceof String) ? (String) mv : java.lang.reflect.Array.get(mv, 0).toString();
     f.format(" missing data value = %s%n", mvs);
     f.format(" has missing value = %s%n", scaleMissingProxy.hasMissingValue());
     f.format(" has fill value = %s%n", scaleMissingProxy.hasFillValue());
     f.format(" has invalid value = %s%n", scaleMissingProxy.hasInvalidData());
     if (scaleMissingProxy.hasInvalidData())
       f.format(
           "   valid min/max = [%f,%f]%n",
           scaleMissingProxy.getValidMin(), scaleMissingProxy.getValidMax());
   }
   f.format("%nhas scale/offset = %s%n", scaleMissingProxy.hasScaleOffset());
   if (scaleMissingProxy.hasScaleOffset()) {
     double offset = scaleMissingProxy.convertScaleOffsetMissing(0.0);
     double scale = scaleMissingProxy.convertScaleOffsetMissing(1.0) - offset;
     f.format("   scale_factor = %f add_offset = %f%n", scale, offset);
   }
   f.format("original data type = %s%n", getDataType());
   f.format("converted data type = %s%n", scaleMissingProxy.getConvertedDataType());
 }
예제 #2
0
 public boolean hasMissing() {
   return scaleMissingProxy.hasMissing();
 }