net.simplace.client.simulation.lap.util.DataTransformHelper




public class DataTransformHelper {
// Public Constructors
public DataTransformHelper();


// Class Methods
public static HashMap AstronomicParameters(int doy, double latitude);

Calculates day length and other parameters from DOY and latitude
returns HashMap with values for DAYL, DDLP, SC, SINLD, DSINB, DSINBE
public static HashMap AstronomicParameters(int doy, double latitude, double
inclination);

Calculates day length and other parameters from DOY, latitude and sun inclination
returns HashMap with values for DAYL, DDLP, SC, SINLD, DSINB, DSINBE
public static double[] NormalizeCurve(double[] xs, double[] ys);

Normalizes the y-values of an x-y-curve so that the area under the curve is 1.
returns new y values
public static double[] NormalizeCurve(double[] xs, double[] ys, double area);

Normalizes the y-values of an x-y-curve so that the area under the curve has given value.
returns new y values
public static double[] RescaleValues(double min, double max, double[] vs);

Rescales an array of values proportionally from new mininimum to new maximum.
returns the rescaled values
public static double Interpolate(double x, double[] xs, double[] ys, boolean
extrapolate);

Linear interpolation of a piecewise linear curve
returns the interpolated value
public static double Integral(double[] xs, double[] ys);

Calculates the area under the curve defined by arrays of x and y values
returns the area
public static double IntegralFromTo(double t1, double t2, double[] xs,
double[] ys);

Calculates the area under the curve defined by arrays of x and y values between the points t1 and t2
returns the area
public static double RadiationIntensitySine(double t, double radiation,
double daylength);

Calculates the radiation intensity [radiation per hour] at a specified hour
returns radiation intensity [J m^-2 h^-1, kJ m^-2 h^-1 or MJ m^-2 h^-1]
public static double RadiationSine(double t, double radiation, double
daylength);

Calculates the radiation accumulated from beginning of day till a specified hour
returns radiation from begin of day until hour t [J m^-2, kJ m^-2 or MJ m^-2]
public static double RadiationSineFromTo(double t1, double t2, double
radiation, double daylength);

Calculates the radiation that is accumulated within the time span from t1 to t2
returns radiation accumulated during time span from t1 to t2
public static double RadiationIntensitySinBeta(double t, double radiation,
double daylength, int doy, double a, double b, double integral);

Calculates the radiation intensity [radiation per hour] at a specified hour
returns radiation intensity [J m^-2 h^-1, kJ m^-2 h^-1 or MJ m^-2 h^-1]
public static double RadiationSinBeta(double t, double radiation, double
daylength, int doy, double a, double b, double integral);

Calculates the radiation accumulated from beginning of day till a specified hour
returns radiation from begin of day until hour t [J m^-2, kJ m^-2 or MJ m^-2]
public static double RadiationSinBetaFromTo(double t1, double t2, double
radiation, double daylength, int doy, double a, double b, double
integral);

Calculates the radiation that is accumulated within the time span from a to b
returns radiation accumulated during time span from a to b
public static double Temperature(double t, double ptmax, double tmin, double
tmax, double ntmin, double daylength, double p, double tc);



}



Extended by: net.simplace.client.simulation.lap.test.model.DataTransformHelperTest