Math Operations

These functions provide a mechanism for performing mathematical operations on specified plotted curves which can be seen with the command list.

Note

< > = Required user input.

[ ] = Optional user input.

[PyDV]: = Python Data Visualizer command-line prompt.

abs

pydv.pdv.Command.do_abs(self, line)

Take the absolute value of the y values of the curves. Modifies the existing curve.

[PyDV]: abs <curve-list>

Ex:
    [PyDV]: abs a
    [PyDV]: abs a:b
    [PyDV]: abs c d

absx

pydv.pdv.Command.do_absx(self, line)

Take the absolute value of the x values of the curves. Modifies the existing curve.

[PyDV]: absx <curve-list>

Ex:
    [PyDV]: absx a
    [PyDV]: absx a:b
    [PyDV]: absx c d

acos

pydv.pdv.Command.do_acos(self, line)

Take arccosine of y values of curves

[PyDV]: acos <curve-list>

Ex:
    [PyDV]: acos a
    [PyDV]: acos a:b
    [PyDV]: acos c d

acosh

pydv.pdv.Command.do_acosh(self, line)

Take hyperbolic arccosine of y values of curves.

[PyDV]: acosh <curve-list>

Ex:
    [PyDV]: acosh a
    [PyDV]: acosh a:b
    [PyDV]: acosh c d

acoshx

pydv.pdv.Command.do_acoshx(self, line)

Take hyperbolic arccosine of x values of curves.

[PyDV]: acoshx <curve-list>

Ex:
    [PyDV]: acoshx a
    [PyDV]: acoshx a:b
    [PyDV]: acoshx c d

acosx

pydv.pdv.Command.do_acosx(self, line)

Take arccosine of x values of curves

[PyDV]: acosx <curve-list>

Ex:
    [PyDV]: acosx a
    [PyDV]: acosx a:b
    [PyDV]: acosx c d

add

pydv.pdv.Command.do_add(self, line)

Take the sum of curves. If the optional value is specified it will add the y-values of the curves by value (equivalent to using the dy command). Shortcut: +

Note

Be sure that the x points are in increasing order as PyDV uses numpy.interp().

Note

Adding curves by a number modifies the curve. If you want to create a new curve then copy the original curve first using the copy command.

[PyDV]: add <curve-list> [value]

Ex:
    [PyDV]: add a
    [PyDV]: add a:b
    [PyDV]: add c d
    [PyDV]: add c d 7

add_h

pydv.pdv.Command.do_add_h(self, line)

Adds curves that have been read from a file but not yet plotted. list-of-menu-numbers are the index values displayed in the first column of the menu command.

[PyDV]: add_h <list-of-menu-numbers>

Ex:
    [PyDV]: add_h 1
    [PyDV]: add_h 1:2
    [PyDV]: add_h 3 4

alpha

pydv.pdv.Command.do_alpha(self, line)

Find the alpha.

[PyDV]: alpha <calculated-a> <calculated-i> <response> [# points]

asin

pydv.pdv.Command.do_asin(self, line)

Take arcsine of y values of curves.

[PyDV]: asin <curve-list>

Ex:
    [PyDV]: asin a
    [PyDV]: asin a:b
    [PyDV]: asin c d

asinx

pydv.pdv.Command.do_asinx(self, line)

Take arcsine of x values of curves.

[PyDV]: asinx <curve-list>

Ex:
    [PyDV]: asinx a
    [PyDV]: asinx a:b
    [PyDV]: asinx c d

asinh

pydv.pdv.Command.do_asinh(self, line)

Take hyperbolic arcsine of y values of curves.

[PyDV]: asinh <curve-list>

Ex:
    [PyDV]: asinh a
    [PyDV]: asinh a:b
    [PyDV]: asinh c d

asinhx

pydv.pdv.Command.do_asinhx(self, line)

Take hyperbolic arcsine of x values of curves.

[PyDV]: asinhx <curve-list>

Ex:
    [PyDV]: asinhx a
    [PyDV]: asinhx a:b
    [PyDV]: asinhx c d

atan

pydv.pdv.Command.do_atan(self, line)

Take arctangent of y values of curves.

[PyDV]: atan <curve-list>

Ex:
    [PyDV]: atan a
    [PyDV]: atan a:b
    [PyDV]: atan c d

atanx

pydv.pdv.Command.do_atanx(self, line)

Take arctangent of x values of curves.

[PyDV]: atanx <curve-list>

Ex:
    [PyDV]: atanx a
    [PyDV]: atanx a:b
    [PyDV]: atanx c d

atan2

pydv.pdv.Command.do_atan2(self, line)

Take atan2 of two curves.

[PyDV]: atan2 <curve1> <curve2>

Ex:
    [PyDV]: atan2 a
    [PyDV]: atan2 a:b
    [PyDV]: atan2 c d

atanh

pydv.pdv.Command.do_atanh(self, line)

Take hyperbolic arctangent of y values of curves.

[PyDV]: atanh <curve-list>

Ex:
    [PyDV]: atanh a
    [PyDV]: atanh a:b
    [PyDV]: atanh c d

atanhx

pydv.pdv.Command.do_atanhx(self, line)

Take hyperbolic arctangent of x values of curves.

[PyDV]: atanhx <curve-list>

Ex:
    [PyDV]: atanhx a
    [PyDV]: atanhx a:b
    [PyDV]: atanhx c d

average

pydv.pdv.Command.do_average(self, line)

Average the specified curvelist over the intersection of their domains.

[PyDV]: average <curve-list>

Ex:
    [PyDV]: average a
    [PyDV]: average a:b
    [PyDV]: average c d

convolve

pydv.pdv.Command.do_convolve(self, line)

Computes the convolution of the two given curves.

THIS IS DEPRECIATED

  • Use convolc for (g*h)(x) = Int(-inf, inf, dt*g(t)*h(x-t))

  • Use convolb for (g*h)(x) = Int(-inf, inf, dt*g(t)*h(x-t)) / Int(-inf, inf, dt*h(t))

convolveb

pydv.pdv.Command.do_convolveb(self, line)

Computes the convolution of the two given curves and normalizes by the area under the second curve.

(g*h)(x) = Int(-inf, inf, dt*g(t)*h(x-t)) / Int(-inf, inf, dt*h(t))

[PyDV]: convolveb <curve1> <curve2> [points] [points_interp]

Ex:
    [PyDV]: convolveb g h
    [PyDV]: convolveb g h 200
    [PyDV]: convolveb g h 200 200

convolvec

pydv.pdv.Command.do_convolvec(self, line)

Computes the convolution of the two given curves with no normalization.

(g*h)(x) = Int(-inf, inf, dt*g(t)*h(x-t))

[PyDV]: convolvec <curve1> <curve2> [points] [points_interp]

Ex:
    [PyDV]: convolvec g h
    [PyDV]: convolvec g h 200
    [PyDV]: convolvec g h 200 200

correl

pydv.pdv.Command.do_correl(self, line)

Computes the cross-correlation of two curves.

[PyDV]: correl <curve1> <curve2>

Ex:
    [PyDV]: correl a b

cos

pydv.pdv.Command.do_cos(self, line)

Take the cosine of the y values of the curves.

[PyDV]: cos <curve-list>

Ex:
    [PyDV]: cos a
    [PyDV]: cos a:b
    [PyDV]: cos c d

cosx

pydv.pdv.Command.do_cosx(self, line)

Take the cosine of the x values of the curves.

[PyDV]: cosx <curve-list>

Ex:
    [PyDV]: cosx a
    [PyDV]: cosx a:b
    [PyDV]: cosx c d

cosh

pydv.pdv.Command.do_cosh(self, line)

Take hyperbolic cosine of y values of curves.

[PyDV]: cosh <curve-list>

Ex:
    [PyDV]: cosh a
    [PyDV]: cosh a:b
    [PyDV]: cosh c d

coshx

pydv.pdv.Command.do_coshx(self, line)

Take hyperbolic cosine of x values of curves.

[PyDV]: coshx <curve-list>

Ex:
    [PyDV]: coshx a
    [PyDV]: coshx a:b
    [PyDV]: coshx c d

cumsum

pydv.pdv.Command.do_cumsum(self, line)

Create new curve which is the cumulative sum of the original curve.

[PyDV]: cumsum <curve-list>

Ex:
    [PyDV]: cumsum a
    [PyDV]: cumsum a:b
    [PyDV]: cumsum c d

dx

pydv.pdv.Command.do_dx(self, line)

Shift x values of curves by a constant.

[PyDV]: dx <curve-list> <value>

Ex:
    [PyDV]: dx a 3
    [PyDV]: dx a:b 3
    [PyDV]: dx c d 3

dy

pydv.pdv.Command.do_dy(self, line)

Shift y values of curves by a constant.

[PyDV]: dy <curve-list> <value>

Ex:
    [PyDV]: dy a 3
    [PyDV]: dy a:b 3
    [PyDV]: dy c d 3

divide

pydv.pdv.Command.do_divide(self, line)

Take quotient of curves. If the optional value is specified it will divide the y-values of the curves by value.

Note

Be sure that the x points are in increasing order as PyDV uses numpy.interp().

Note

Dividing curves by a number modifies the curve. If you want to create a new curve then copy the original curve first using the copy command.

[PyDV]: <divide | / | div> <curve-list> [value]

Ex:
    [PyDV]: divide a
    [PyDV]: divide a:b
    [PyDV]: divide c d
    [PyDV]: divide c d 7

divide_h

pydv.pdv.Command.do_divide_h(self, line)

Divides curves that have been read from a file but not yet plotted. list-of-menu-numbers are the index values displayed in the first column of the menu command.

[PyDV]: divide_h <list-of-menu-numbers>

Ex:
    [PyDV]: divide_h 1
    [PyDV]: divide_h 1:2
    [PyDV]: divide_h 3 4

divx

pydv.pdv.Command.do_divx(self, line)

Divide x values of curves by a constant.

[PyDV]: divx <curve-list> <value>

Ex:
    [PyDV]: divx a 7
    [PyDV]: divx a:b 7
    [PyDV]: divx c d 7
    [PyDV]: divx c d 7

divy

pydv.pdv.Command.do_divy(self, line)

Divide y values of curves by a constant.

[PyDV]: divy <curve-list> <value>

Ex:
    [PyDV]: divy a 7
    [PyDV]: divy a:b 7
    [PyDV]: divy c d 7
    [PyDV]: divy c d 7

errorbar

pydv.pdv.Command.do_errorbar(self, line)

Plot error bars on the given curve.

[PyDV]: errorbar <curve> <y-error-curve> <y+error-curve> [x-error-curve x+error-curve] [point-skip]

Ex:
    [PyDV]: errorbar a 2 3
    [PyDV]: errorbar a 2 3 4 5
    [PyDV]: errorbar a 2 3 4 5 2

errorrange

pydv.pdv.Command.do_errorrange(self, line)

Plot shaded error region on given curve. Note: y-error-curve and y+error-curve are curves and not scalars

[PyDV]: errorrange <curve> <y-error-curve> <y+error-curve>

Ex:
    [PyDV]: errorrannge a b c

exp

pydv.pdv.Command.do_exp(self, line)

Exponentiate y values of curves, e^y.

[PyDV]: exp <curve-list>

Ex:
    [PyDV]: exp a
    [PyDV]: exp a:b
    [PyDV]: exp c d

expx

pydv.pdv.Command.do_expx(self, line)

Exponentiate x values of curves, e^x.

[PyDV]: expx <curve-list>

Ex:
    [PyDV]: expx a
    [PyDV]: expx a:b
    [PyDV]: expx c d

fft

pydv.pdv.Command.do_fft(self, line)

Compute the one-dimensional discrete Fourier Transform for the curves.

[PyDV]: fft <curve-list>

Ex:
    [PyDV]: fft a
    [PyDV]: fft a:b
    [PyDV]: fft c d

gaussian

pydv.pdv.Command.do_gaussian(self, line)

Generate a gaussian function.

[PyDV]: gaussian <amplitude> <width> <center> [<# points> [<# half-widths>]]

Ex:
    [PyDV]: gaussian 5 2 0
    [PyDV]: gaussian 5 2 0 100
    [PyDV]: gaussian 5 2 0 100 2

j0

pydv.pdv.Command.do_j0(self, line)

Take the zeroth order Bessel function of y values of curves

[PyDV]: j0 <curve-list>

Ex:
    [PyDV]: j0 a
    [PyDV]: j0 a:b
    [PyDV]: j0 c d

j0x

pydv.pdv.Command.do_j0x(self, line)

Take the zeroth order Bessel function of x values of curves

[PyDV]: j0x <curve-list>

Ex:
    [PyDV]: j0x a
    [PyDV]: j0x a:b
    [PyDV]: j0x c d

j1

pydv.pdv.Command.do_j1(self, line)

Take the first order Bessel function of y values of curves

[PyDV]: j1 <curve-list>

Ex:
    [PyDV]: j1 a
    [PyDV]: j1 a:b
    [PyDV]: j1 c d

j1x

pydv.pdv.Command.do_j1x(self, line)

Take the first order Bessel function of x values of curves

[PyDV]: j1x <curve-list>

Ex:
    [PyDV]: j1x a
    [PyDV]: j1x a:b
    [PyDV]: j1x c d

jn

pydv.pdv.Command.do_jn(self, line)

Take the nth order Bessel function of y values of curves

[PyDV]: jn <curve-list> <n>

Ex:
    [PyDV]: jn a 4
    [PyDV]: jn a:b 4
    [PyDV]: jn c d 4

jnx

pydv.pdv.Command.do_jnx(self, line)

Take the nth order Bessel function of x values of curves

[PyDV]: jnx <curve-list> <n>

Ex:
    [PyDV]: jnx a 4
    [PyDV]: jnx a:b 4
    [PyDV]: jnx c d 4

L1

pydv.pdv.Command.do_L1(self, line)

Take L1 norm of two curves. The L1 norm is integral( |curve1 - curve2| ) over the interval [xmin,xmax]. Also prints value of integral to command-line.

[PyDV]: L1 <curve1> <curve2> [<xmin> <xmax>]

Ex:
    [PyDV]: L1 a b
    [PyDV]: L1 a b 4 10

L2

pydv.pdv.Command.do_L2(self, line)

Take L2 norm of two curves. The L2 norm is integral( (curve1 - curve2)**2 )**(1/2) over the interval [xmin,xmax]. Also prints value of integral to command-line.

[PyDV]: L2 <curve1> <curve2> [<xmin> <xmax>]

Ex:
    [PyDV]: L2 a b
    [PyDV]: L2 a b 4 10

log

pydv.pdv.Command.do_log(self, line)

Take the natural logarithm of the y values of the curves. If the optional argument keep-neg-vals is set to false, then zero and negative y-values will be discarded. keep-neg-vals is true by default.

[PyDV]: <log | ln> <curve-list> [keep-neg-vals: True | False]

Ex:
    [PyDV]: log a
    [PyDV]: log a:b
    [PyDV]: log c d
    [PyDV]: log c d True

logx

pydv.pdv.Command.do_logx(self, line)

Take the natural logarithm of the x values of the curves. If the optional argument keep-neg-vals is set to false, then zero and negative x-values will be discarded. keep-neg-vals is true by default.

[PyDV]: <logx | lnx> <curve-list> [keep-neg-vals: True | False]

Ex:
    [PyDV]: logx a
    [PyDV]: logx a:b
    [PyDV]: logx c d
    [PyDV]: logx c d True

log10

pydv.pdv.Command.do_log10(self, line)

Take the base 10 logarithm of the y values of the curves. If the optional argument keep-neg-vals is set to false, then zero and negative y-values will be discarded. keep-neg-vals is true by default.

[PyDV]: log10 <curve-list> [keep-neg-vals: True | False]

Ex:
    [PyDV]: log10 a
    [PyDV]: log10 a:b
    [PyDV]: log10 c d
    [PyDV]: log10 c d True

log10x

pydv.pdv.Command.do_log10x(self, line)

Take the base 10 logarithm of the x values of the curves. If the optional argument keep-neg-vals is set to false, then zero and negative y-values will be discarded. keep-neg-vals is true by default.

[PyDV]: log10x <curve-list> [keep-neg-vals: True | False]

Ex:
    [PyDV]: log10x a
    [PyDV]: log10x a:b
    [PyDV]: log10x c d
    [PyDV]: log10x c d True

makeintensive

pydv.pdv.Command.do_makeintensive(self, line)

Set the y-values such that y[i] = y[i] / (x[i+1] - x[i]).

[PyDV]: <makeintensive | mkint> <curve-list>

Ex:
    [PyDV]: makeintensive a
    [PyDV]: makeintensive a:b
    [PyDV]: makeintensive c d

makeextensive

pydv.pdv.Command.do_makeextensive(self, line)

Set the y-values such that y[i] = y[i] * (x[i+1] - x[i]).

[PyDV]: <makeextensive | mkext> <curve-list>

Ex:
    [PyDV]: makeextensive a
    [PyDV]: makeextensive a:b
    [PyDV]: makeextensive c d

max

pydv.pdv.Command.do_max(self, line)

Makes a new curve with max y values of curves passed in curvelist.

[PyDV]: max <curve-list>

Ex:
    [PyDV]: max a
    [PyDV]: max a:b
    [PyDV]: max c d

min

pydv.pdv.Command.do_min(self, line)

Makes a new curve with min y values of curves passed in curvelist.

[PyDV]: min <curve-list>

Ex:
    [PyDV]: min a
    [PyDV]: min a:b
    [PyDV]: min c d

mx

pydv.pdv.Command.do_mx(self, line)

Scale the x values of the curves by a fixed value.

[PyDV]: mx <curve-list> <value>

Ex:
    [PyDV]: mx a 2
    [PyDV]: mx a:b 2
    [PyDV]: mx c d 2

multiply

pydv.pdv.Command.do_multiply(self, line)

Take the product of curves. If the optional value is specified it will multiply the y-values of the curves by value.

Note

Be sure that the x points are in increasing order as PyDV uses numpy.interp().

Note

Multiplying curves by a number modifies the curve. If you want to create a new curve then copy the original curve first using the copy command.

[PyDV]: <multiply | * | mult> <curve-list> [value]

Ex:
    [PyDV]: multiply a
    [PyDV]: multiply a:b
    [PyDV]: multiply c d
    [PyDV]: multiply c d 7

multiply_h

pydv.pdv.Command.do_multiply_h(self, line)

Multiplies curves that have been read from a file but not yet plotted. list-of-menu-numbers are the index values displayed in the first column of the menu command.

[PyDV]: multiply_h <list-of-menu-numbers>

Ex:
    [PyDV]: multiply_h 1
    [PyDV]: multiply_h 1:2
    [PyDV]: multiply_h 3 4

my

pydv.pdv.Command.do_my(self, line)

Multiply the y values of curves by a constant.

[PyDV]: my <curve-list> <value>

Ex:
    [PyDV]: my a 2
    [PyDV]: my a:b 2
    [PyDV]: my c d 2

norm

pydv.pdv.Command.do_norm(self, line)

Makes a new curve that is the norm of two args. Also prints the value of the integral to command line. The p-norm is (integral( (curve1 - curve2)**p )**(1/p) over the interval [xmin, xmax], where p = order.

[PyDV]: norm <curve> <curve> <p> <xmin> <xmax>

Ex:
    [PyDV]: norm a b 2 10 15

powa

pydv.pdv.Command.do_powa(self, line)

Raise a fixed value, a, to the power of the y values of the curves.

[PyDV]: powa <curve-list> <a>

Ex:
    [PyDV]: powa a 2
    [PyDV]: powa a:b 2
    [PyDV]: powa c d 2

powax

pydv.pdv.Command.do_powax(self, line)

Raise a fixed value, a, to the power of the x values of the curves.

[PyDV]: powax <curve-list> <a>

Ex:
    [PyDV]: powax a 2
    [PyDV]: powax a:b 2
    [PyDV]: powax c d 2

powr

pydv.pdv.Command.do_powr(self, line)

Raise the y values of the curves to a fixed power p.

[PyDV]: powr <curve-list> <p>

Ex:
    [PyDV]: powr a 2
    [PyDV]: powr a:b 2
    [PyDV]: powr c d 2

powrx

pydv.pdv.Command.do_powrx(self, line)

Raise the x values of the curves to a fixed power p.

[PyDV]: powrx <curve-list> <p>

Ex:
    [PyDV]: powrx a 2
    [PyDV]: powrx a:b 2
    [PyDV]: powrx c d 2

recip

pydv.pdv.Command.do_recip(self, line)

Take the reciprocal of the y values of the curves.

[PyDV]: recip <curve-list>

Ex:
    [PyDV]: recip a
    [PyDV]: recip a:b
    [PyDV]: recip c d

recipx

pydv.pdv.Command.do_recipx(self, line)

Take the reciprocal of the x values of the curves.

[PyDV]: recipx <curve-list>

Ex:
    [PyDV]: recipx a
    [PyDV]: recipx a:b
    [PyDV]: recipx c d

sin

pydv.pdv.Command.do_sin(self, line)

Take the sine of the y values of the curve.

[PyDV]: sin <curve-list>

Ex:
    [PyDV]: sin a
    [PyDV]: sin a:b
    [PyDV]: sin c d

sinx

pydv.pdv.Command.do_sinx(self, line)

Take the sine of the x values of the curve.

[PyDV]: sinx <curve-list>

Ex:
    [PyDV]: sinx a
    [PyDV]: sinx a:b
    [PyDV]: sinx c d

sinh

pydv.pdv.Command.do_sinh(self, line)

Take the hyperbolic sine of the y values of the curve

[PyDV]: sinh <curve-list>

Ex:
    [PyDV]: sinh a
    [PyDV]: sinh a:b
    [PyDV]: sinh c d

sinhx

pydv.pdv.Command.do_sinhx(self, line)

Take the hyperbolic sine of the x values of the curve

[PyDV]: sinhx <curve-list>

Ex:
    [PyDV]: sinhx a
    [PyDV]: sinhx a:b
    [PyDV]: sinhx c d

smooth

pydv.pdv.Command.do_smooth(self, line)

Smooth the curve to the given degree.

[PyDV]: smooth <curve-list> [smooth-factor]

Ex:
    [PyDV]: sin a
    [PyDV]: sin a:b
    [PyDV]: sin c d
    [PyDV]: sin c d 4

sqr

pydv.pdv.Command.do_sqr(self, line)

Take the square of the y values of the curves.

[PyDV]: sqr <curve-list>

Ex:
    [PyDV]: sqr a
    [PyDV]: sqr a:b
    [PyDV]: sqr c d

sqrx

pydv.pdv.Command.do_sqrx(self, line)

Take the square of the x values of the curves.

[PyDV]: sqrx <curve-list>

Ex:
    [PyDV]: sqrx a
    [PyDV]: sqrx a:b
    [PyDV]: sqrx c d

sqrt

pydv.pdv.Command.do_sqrt(self, line)

Take the square root of the y values of the curves.

[PyDV]: sqrt <curve-list>

Ex:
    [PyDV]: sqrt a
    [PyDV]: sqrt a:b
    [PyDV]: sqrt c d

sqrtx

pydv.pdv.Command.do_sqrtx(self, line)

Take the square root of the x values of the curves.

[PyDV]: sqrtx <curve-list>

Ex:
    [PyDV]: sqrtx a
    [PyDV]: sqrtx a:b
    [PyDV]: sqrtx c d

subtract

pydv.pdv.Command.do_subtract(self, line)

Take the difference of curves. A single curve can be specified, resulting in the negating of its y-values. If the optional value is specified it will subtract the y-values of the curves by value.

Note

Be sure that the x points are in increasing order as PyDV uses numpy.interp().

Note

Subtracting curves by a number modifies the curve. If you want to create a new curve then copy the original curve first using the copy command.

[PyDV]: <subtract | sub | --> <curve-list> [value]

Ex:
    [PyDV]: subtract a
    [PyDV]: subtract a:b
    [PyDV]: subtract c d
    [PyDV]: subtract c d 7

subtract_h

pydv.pdv.Command.do_subtract_h(self, line)

Subtracts curves that have been read from a file but not yet plotted. list-of-menu-numbers are the index values displayed in the first column of the menu command.

[PyDV]: subtract_h <list-of-menu-numbers>

Ex:
    [PyDV]: subtract_h 1
    [PyDV]: subtract_h 1:2
    [PyDV]: subtract_h 3 4

tan

pydv.pdv.Command.do_tan(self, line)

Take the tangent of y values of curves.

[PyDV]: tan <curve-list>

Ex:
    [PyDV]: tan a
    [PyDV]: tan a:b
    [PyDV]: tan c d

tanx

pydv.pdv.Command.do_tanx(self, line)

Take the tangent of x values of curves.

[PyDV]: tanx <curve-list>

Ex:
    [PyDV]: tanx a
    [PyDV]: tanx a:b
    [PyDV]: tanx c d

tanh

pydv.pdv.Command.do_tanh(self, line)

Take the hyperbolic tangent of y values of curves

[PyDV]: tanh <curve-list>

Ex:
    [PyDV]: tanh a
    [PyDV]: tanh a:b
    [PyDV]: tanh c d

tanhx

pydv.pdv.Command.do_tanhx(self, line)

Take the hyperbolic tangent of x values of curves

[PyDV]: tanhx <curve-list>

Ex:
    [PyDV]: tanhx a
    [PyDV]: tanhx a:b
    [PyDV]: tanhx c d

xmax

pydv.pdv.Command.do_xmax(self, line)

Filter out points in curves whose x-values greater than limit.

[PyDV]: xmax <curve-list> <limit>

Ex:
    [PyDV]: xmax a 3
    [PyDV]: xmax a:b 3
    [PyDV]: xmax c d 3

xmin

pydv.pdv.Command.do_xmin(self, line)

Filter out points in curves whose x-values less than limit

[PyDV]: xmin <curve-list> <limit>

Ex:
    [PyDV]: xmin a 3
    [PyDV]: xmin a:b 3
    [PyDV]: xmin c d 3

y0

pydv.pdv.Command.do_y0(self, line)

Take the zeroth order Bessel function of the second kind of the y values of the curves.

[PyDV]: y0 <curve-list>

Ex:
    [PyDV]: y0 a
    [PyDV]: y0 a:b
    [PyDV]: y0 c d

y0x

pydv.pdv.Command.do_y0x(self, line)

Take the zeroth order Bessel function of the second kind of the x values of the curves.

[PyDV]: y0x <curve-list>

Ex:
    [PyDV]: y0x a
    [PyDV]: y0x a:b
    [PyDV]: y0x c d

y1

pydv.pdv.Command.do_y1(self, line)

Take the first order Bessel function of the second kind of the y values of the curves.

[PyDV]: y1 <curve-list>

Ex:
    [PyDV]: y1 a
    [PyDV]: y1 a:b
    [PyDV]: y1 c d

y1x

pydv.pdv.Command.do_y1x(self, line)

Take the first order Bessel function of the second kind of the x values of the curves.

[PyDV]: y1x <curve-list>

Ex:
    [PyDV]: y1x a
    [PyDV]: y1x a:b
    [PyDV]: y1x c d

ymax

pydv.pdv.Command.do_ymax(self, line)

Filter out points in curves whose y-values greater than limit

[PyDV]: ymax <curve-list> <limit>

Ex:
    [PyDV]: ymax a 3
    [PyDV]: ymax a:b 3
    [PyDV]: ymax c d 3

ymin

pydv.pdv.Command.do_ymin(self, line)

Filter out points in curves whose y-values less than limit

[PyDV]: ymin <curve-list> <limit>

Ex:
    [PyDV]: ymin a 3
    [PyDV]: ymin a:b 3
    [PyDV]: ymin c d 3

yminmax

pydv.pdv.Command.do_yminmax(self, line)

Trim the selected curves.

[PyDV]: <yminmax | ymm> <curve-list> <low-limit> <high-lim>

Ex:
    [PyDV]: yminmax a 3 7
    [PyDV]: yminmax a:b 3 7
    [PyDV]: yminmax c d 3 7

yn

pydv.pdv.Command.do_yn(self, line)

Take the nth order Bessel function of the second kind of y values of curves.

[PyDV]: yn <curve-list> <n>

Ex:
    [PyDV]: yn a 3
    [PyDV]: yn a:b 3
    [PyDV]: yn c d 3

ynx

pydv.pdv.Command.do_ynx(self, line)

Take the nth order Bessel function of the second kind of x values of curves.

[PyDV]: ynx <curve-list> <n>

Ex:
    [PyDV]: ynx a 3
    [PyDV]: ynx a:b 3
    [PyDV]: ynx c d 3

derivative

pydv.pdv.Command.do_derivative(self, line)

Take the derivative of curves.

[PyDV]: <derivative | der> <curve-list>

Ex:
    [PyDV]: derivative a
    [PyDV]: derivative a:b
    [PyDV]: derivative c d

diffMeasure

pydv.pdv.Command.do_diffMeasure(self, line)

Compare two curves. For the given curves a fractional difference measure and its average is computed

[PyDV]: diffMeasure <curve1> <curve2> [tolerance]

Ex:
    [PyDV]: diffMeasure a b
    [PyDV]: diffMeasure a b 0.1

fit

pydv.pdv.Command.do_fit(self, line)

Make new curve that is polynomial fit to argument. n=1 by default, logy means take log(y-values) before fitting, logx means take log(x-values) before fitting.

[PyDV]: fit <curve> [n] [logx] [logy]

Ex:
    [PyDV]: fit a
    [PyDV]: fit a 2
    [PyDV]: fit a 2 logx
    [PyDV]: fit a 2 logy

integrate

pydv.pdv.Command.do_integrate(self, line)

Compute the definite integral of each curve in the list over the specified domain.

[PyDV]: <integrate | int> <curve-list> [low-limit high-limit]

Ex:
    [PyDV]: integrate a
    [PyDV]: integrate a:b
    [PyDV]: integrate c d
    [PyDV]: integrate c d 3 7

span

pydv.pdv.Command.do_span(self, line)

Generates straight line of slope 1 and y intercept 0 in the specified domain with an optional number of points.

[PyDV]: span <xmin> <xmax> [points]

Ex:
    [PyDV]: span 1 10
    [PyDV]: span 1 10 200

vs

pydv.pdv.Command.do_vs(self, line)

Plot the range of the first curve against the range of the second curve.

[PyDV]: vs <curve1> <curve2>

Ex:
    [PyDV]: vs a b

deltax

pydv.pdv.Command.do_deltax(self, line)

Create new curve that calculates difference between its own X points. Delta X vs # of points - 1.

[PyDV]: deltax <curve>

Ex:
    [PyDV]: deltax a
    [PyDV]: deltax a:b

deltay

pydv.pdv.Command.do_deltax(self, line)

Create new curve that calculates difference between its own X points. Delta X vs # of points - 1.

[PyDV]: deltax <curve>

Ex:
    [PyDV]: deltax a
    [PyDV]: deltax a:b

filter

pydv.pdv.Command.do_filter(self, line)

Filter out points in the x and y axis.

[PyDV]: filter <curve-list> <x-low-lim> <x-high-lim> <y-low-lim> <y-high-lim>

Ex:
    [PyDV]: filter a 1 2 3 4
    [PyDV]: filter a:b -3 0 -5 10
    [PyDV]: filter c d 0 13 -7 15

theta

pydv.pdv.Command.do_theta(self, line)

Generate a unit step distribution.

[PyDV]: theta <xmin> <x0> <xmax> [# points]

Ex:
    [PyDV]: theta -5 0 5
    [PyDV]: theta -3 3 5 200

delta

pydv.pdv.Command.do_delta(self, line)

Procedure: Generate a Dirac delta distribution such that Int(xmin, xmax, dt*delta(t - x0)) = 1.

[PyDV]: delta <xmin> <x0> <xmax> [<# points>]

Ex:
    [PyDV]: delta -5 0 5
    [PyDV]: delta -3 3 5 200

normalize

pydv.pdv.Command.do_normalize(self, line)

Normalize a curve.

[PyDV]: normalize <curve>

Ex:
    [PyDV]: normalize a

hypot

pydv.pdv.Command.do_hypot(self, line)

Calculate harmonic average of two curves, sqrt(a^2+b^2).

[PyDV]: hypot <curve1> <curve2>

Ex:
    [PyDV]: hypot a b