home RPC:

uRPC micro Remote Procedure Calls - 0.97

» news | search | translate
Email Facebook Linkedin Pinterest Reddit Telegram Tumblr Whatsapp X

calc

 performs numerical recipes, like polynomial fit, FFT, etc...
Input: a sequence of steps (max 10), separated by semicolons; line feed; the data (max 90000 values).
Three variables x y z, the input is assigned to x. Each step is in the form
    var = fn(var)
Output: the result of the last assignment.
References: NumPy SciPy

Arguments:
input                 steps LF data
fmt                   input: format: separator | json | msgpack | raw...
fmt_out               output: format; optional; default fmt_out = fmt
See the documentation on data formats

Endpoint:
http[s]://saltlake71.eu/urpc?function=calc

Operations:
print(var)            print a variable
decimals = int        set the number of decimal digits for print() and the final output
var2 = var1           assign var1 to var2

Functions:
abs(array)
convolve(array, array, mode: {'full', 'same', 'valid'})
diff(array, int)
digitize(array, array)
filtfilt(array, float | array, array)
fft_real(array)
firwin(int, int, int, pass: {'bandpass', 'bandstop', 'lowpass', 'highpass'},
window: {'barthann', 'bartlett', 'blackman', 'blackmanharris', 'bohman', 'boxcar', 'cosine', 'exponential', 'flattop', 'hamming', 'hann', 'lanczos', 'nuttall', 'parzen', 'taylor', 'triang', 'tukey'})
goertzel(array, float)
float: freq (Hz)
hampel(array, int, float)
int: half_window; float: n_sigma
hilbert(array)
histogram(array, int)
interp(float, array, array)
lfilter(array, float | array, array)
linspace(float, float, int, endpoint: {False, True})
mean(array)
median(array)
ones(int)
percentile(array, float | array)
polyfit(array, array, int)
output: RMSE, polynomial coefficients
power(array, float)
reshape2(array, int, int, order: {'C', 'F'})
reshape3(array, int, int, int, order: {'C', 'F'})
sin(array)
std(array)
transpose(array)
trapezoid(array, float)
var(array)
zeros(int)

Examples with fmt = json
input
	y = reshape2(x, 3, 2, 'C'); z = transpose(y)
	[1, 2, 3, 4, 5, 6]
output
	[[1.0, 3.0, 5.0], [2.0, 4.0, 6.0]]

input
	y = power(x, 2); z = polyfit(x, y, 2); decimals = 12
	[1, 2, 3, 4, 5, 6]
output
	[ 0.0, 0.0, -0.0, 1.0]

input
	z = firwin(31, 44100, 8000, 'lowpass', 'blackman'); y = lfilter(z, 1.0, x)
	[... samples ...]