PMAT Reference
pmat_analysis.r
- module
Precipitable Water Model Analysis Tool: Analysis
- synopsis
This module contains analysis functions
- exp.regression(t=NULL, mean.out)
- Detail
Function includes all of the stuff to generate the exponential regression model with intervals
- Parameters
t (double) – training fraction
mean.out (list) – the output of mean.filter
- Returns
returns the data series and model statistics
- Return type
list
- lin.regression(x, y)
- Detail
Linear regression function
- Parameters
x (double) – the domain of the dataset
y (double) – the range of the dataset
- Returns
returns the data series and model statistics
- Return type
list
- data.partition(x, y, tr.sz=tr.sz)
- Detail
splits the data into a training/testing set
- Parameters
x (double) – domain of the data
y (double) – range of the data
tr.sz (double) – fraction of the data in the testing set
- Returns
a list containing the training and testing sets
- Return type
list
- iterative.analysis(out.bool, mean.out)
- Detail
computes regression statistics and outputs to a yaml file
- Parameters
out.bool (logical) – determine whether to generate new _output.yml
mean.out (list) – output of mean.filter
- Returns
iterative stats and _output.yml
- Return type
list
- lsvm(x, y, l, tr.sz=0.7, seed=sample(1:2^15, 1))
- Detail
Generates a Linear Support Vector Machine and draws the decision hyperplane and support vectors
- Parameters
x (double) – domain of dataset
y (double) – range of dataset
l (double) – labels of the dataset
tr.sz (double) – fraction of data to be used for model training
seed (integer) – the random seed
- Returns
list of data, labels, and the coefficients
- Return type
list
pmat_processing.r
- module
Precipitable Water Model Analysis Tool: Pre-processing
- synopsis
functions for preprocessing
- colscheme(range, set='Set1')
- Detail
a function that generates an array of colors based on the number of elements
- Parameters
range (list) – a list of data series
- Returns
a list of colors
- Return type
list
- nan.filter(stuff)
- Detail
removes nan values from a set of lists
- Parameters
stuff (list) – list of arrays
- Returns
returns list with filtered data and the indices with nans
- Return type
list
- mean.filter(nan.out, n)
- Detail
filters the data based on the comparison of the daily std and the average std of the dataset
- Parameters
nan.out (list) – the output of nan.filter
n (integer) – threshold
- Returns
an array of indices for PWV values to be analyzed
- Return type
list
- dna.filter(filter.res)
- Detail
removes data labels as Do Not Analyze
- Parameters
filter.res (list) – overcast.filter results
- Returns
overcast.filter results with DNA points removed
- Return type
list
- inf.counter(bool, snsr_data, label)
- Detail
identifies the -Inf values
- Parameters
bool (logical) – decides if -Inf is not replaced with NaN
snsr_data (list) – the dataset
label (character) – the identifier for the dataset (e.g. sky, gro, skyo, groo)
- Returns
data set that replaces all -Infs for NaN (If bool == FALSE).
- Return type
list
- index.norm(x)
- Detail
calculates the normalized index of the dataset
- Parameters
x (double) – data range
- Returns
an array of values between 0 and 1
- Return type
double
- overcast.filter(col_con, col_date, col_com, pw_name, snsr_name, cloud.bool)
- Detail
Filters our data with overcast condition
- Parameters
col_con (integer) – column index for condition labels
col_date (integer) – column index for date stamp
col_com (integer) – column index for comments
pw_name (list) – pw measurement labels
snsr_name (list) – sensor labels
cloud_bool (logical) –
- Returns
A list of lists containing either clear-sky/overcast data
- Return type
list
- sky.processing(filter.res)
- Detail
Computes average values and weighted averages
- Parameters
filter.res (list) – results of the overcast.filter function
- Returns
series of arrays including average PWV, RH, etc.
- Return type
list
pmat_products.r
- module
Precipitable Water Model Analysis Tool: Products
- synopsis
plotting functions for PMAT
- time.pwindex(datetime)
- Detail
Normalized PWV index for both clear sky and overcast data
- Parameters
datetime – the datestamp of the data
- time.nth_range(y, title, color, leg.lab, ylab, datetime, over.bool)
- Detail
Multirange Time Series plot series
- Parameters
y (list) – the range of the plot
title (character) – the title/description of the plot
color (character) – the color string for the data range
leg.lab (list) – a list of
ylab (character) – the y-axis label
datetime (double) – the datetime array
over.bool (logical) – the condition of data (clear sky/overcast)
- time.composite(y, title, color, ylab, datetime, over.bool)
- Detail
Time Series composite plot series
- Parameters
y (list) – the range of the plot
title (character) – the title/description of the plot
color (character) – the color string for the data range
ylab (character) – the y-axis label
datetime (double) – the datetime array
over.bool (logical) – the condition of data (clear sky/overcast)
- time.mono_composite(y, title, ylab, datetime, over.bool)
- Detail
Time Series composite plot series
- Parameters
y (list) – the range of the plot
title (character) – the title/description of the plot
ylab (character) – the y-axis label
datetime (double) – the datetime array
overcast (logical) – the condition of data (clear sky/overcast)
- time.multiyear(y, title, color, datetime, ylab, over.bool)
- Detail
Climatology plot
- Parameters
y (list) – the range of the plot
title (character) – the title/description of the plot
color (character) – the color string for the data range
datetime (double) – the datetime array
ylab (character) – the y-axis label
overcast (logical) – the condition of data (clear sky/overcast)
- analysis.nth_range(over.bool, x, y, title, label, color, leg.lab)
- Detail
Comparative analysis plot
- Parameters
overcast (logical) – the condition of data (clear sky/overcast)
x – the domain of the plot
y – the range of the plot
title – the title/description of the plot
label –
color – the color string for the data
leg.lab –
- analysis.regression(over.bool, x, y, title, label, iter)
- Detail
Super Average Plot with Exponential Fit
- Parameters
overcast (bool) – the condition of data (clear sky/overcast)
x (double) – the domain of the plot
y (double) – the range of the plot
title (character) – the title/description of the plot
label (list) – list containing the x-axis and y-axis labels
iter (list) – the output of iter.analysis
- analysis.svm(model)
- Detail
plots SVM
- Parameters
model (list) – output of lsvm
- pac.compare(over.bool, title, x, y, angular, radial)
- Detail
Pac-Man plot of Super Average Plot
- Parameters
overcast (logical) – the condition of data (clear sky/overcast)
title (character) – the title/description of the plot
x (double) – the domain of the plot
y (double) – the range of the plot
angular (character) – the angular axis label and units
radial (character) – the radial axis label and units
- pac.regression(over.bool)
- Detail
Pac-Man residual plot
- Parameters
over.bool (bool) – the condition of data (clear sky/overcast)
- chart.histogram(range, xlabel, title)
- Detail
Histograms of defined quantities
- Parameters
range (double) – the range of the plot
xlabel (list) – the x-axis label of the plot
title (list) – the title/description of the histogram
- poster.plots(over.bool, iter, mean.out)
- Detail
The set of all poster
- Parameters
overcast (bool) – the condition of data (clear sky/overcast)
iter (list) – output of iterative.analysis
mean.out (list) –
- Returns
All available poster plots
- poster1(...)
- poster2(over.bool, iter, mean.out)
- Detail
The analytics poster plot
- Parameters
overcast (logical) – the condition of data (clear sky/overcast)
iter – the output of iterative.analysis
mean.out –
- sensor.chart(...)
- Detail
sensor specific data type distribution charts
- sensor.time(over.bool)
- Detail
Instrumentation time series plots
- Parameters
over.bool (logical) – the condition of data (clear sky/overcast)
- data.gen(over.bool, dir)
- Detail
creates a datafile containing the date, avg temp, and avg pwv for a defined condition
- Parameters
over.bool (bool) – the condition of the data (clear sky/overcast)
dir – directory path
- data.ml(out.dir)
- Detail
creates a datafile containing the machine learning relavant information
- Parameters
out.dir (character) – directory path
- data.step(seed, i, coef, r, S)
- Detail
writes a yaml object that contains the analysis results of each step in the iterative analysis
- Parameters
seed (integer) – the generated seed
i (integer) – the step number
coef (list) – the coefficients of the best-fit
r (double) – the RSME value
S (double) – the standard deviation
- Returns
a yaml object
- Return type
list
- data.final(out.dir, lengths, frac.kept, coef, std, rmse, over.bool=args$overcast)
- Detail
writes the final results of iterative.analysi
- Parameters
out.dir (character) – the output directory
lengths (list) – list of lengths
coef (list) – the average coefficients of the best-fit
std (double) – the average standard deviation
rmse (double) – the average rsme values
over.bool (logical) – the condition of data (clear sky/overcast)
- visual.products(set, mean.out, datetime=datetime, over.bool=args$overcast)
- Detail
saves plot sets
- Parameters
set (character) – the –set parameter
mean.out – output of mean.filter
datetime – the datetime range of the data
over.bool (logical) – the condition of data (clear sky/overcast)
pmat_run.r
- module
Precipitable-Water Model Analysis Tool
- synopsis
The main file for PMAT. Documentation available at <https://docs.pmat.app>.
pmat_utility.r
- module
Precipitable Water Model Analysis Tool: Utility
- synopsis
general functions for PMAT
- logg(msglevel, msg, dir=out.dir, lev='INFO')
- Detail
creates log entries for _log.txt
- Parameters
msglevel (character) – log level of the message
msg (character) – the message itself
dir (character) – directory that stores the log file
lev (character) – the log level of the user
- aloha.first()
- Detail
shows first time user information
- aloha.startup()
- Detail
shows title banner for program
- aloha.closing()
- Detail
cleans up files and ends the program
- reset_time(datetime)
- Detail
A function that sets the time to 00:00:00
- Parameters
datetime (character) – a Date or datetime object
- Returns
A datetime object with time 00:00:00
- Return type
double
- time_axis_init(date)
- Detail
A function that calculates the min, max, and position of the tick marks for
- Parameters
date (double) – A date or datetime object
- Returns
The max, min, and tick mark positions
- Return type
list
- time_axis(datetime)
- Detail
A function that sets the x-axis format for time series plots
- Parameters
datetime (double) – A date or datetime object
- stnd_title(des, overcast)
- Detail
A function that generates the title based on
- Parameters
des (character) – the description of the plot
overcast (logical) – the sky condition
- Returns
a title string
- Return type
character