sknrf.utilities.numeric module

Numeric Input/Output Utility Functions

sknrf.utilities.numeric.camel2underscore(camel)
class sknrf.utilities.numeric.bounded_property(fget=None, fset=None, fdel=None, doc=None)

Bases: property

Emulate PyProperty_Type() in Objects/descrobject.c

getter(fget)

Descriptor to obtain a copy of the property with a different getter.

setter(fset)

Descriptor to obtain a copy of the property with a different setter.

deleter(fdel)

Descriptor to obtain a copy of the property with a different deleter.

class sknrf.utilities.numeric.Info(name, read=True, write=False, check=False, label='', scale=Scale._, precision=16, unit='', pk_avg=PkAvg.PK, rms=True, format_=Format.RE, step=1, min_=2.220446049250313e-16, max_=1e+100, abs_tol=2.220446049250313e-16, rel_tol=2.220446049250313e-16, domain=Domain.TH)

Bases: object

Container of Object Property information.

Parameters:
namestr

Name of attribute.

readbool

Read permission flag, default is True.

writebool

Write permission flag, default is False.

checkbool

Check permission flag, default is False.

labelstr

Display name of attribute, default is name.

scaleScale

SI scale unit prefix, default is “ “.

precisionint

number of significant digits, default is 3.

unitstr

SI unit, default is “” (unitless).

pk_avgPkAvg

peak/average signal value, default is PkAvg.PK.

format_Format

complex number format, default is Format.RE_IM.

stepfloat

incremental step, default is 1.

min_float

minimum limit, default is 0.

max_float

maximum limit, default is 1e100.

abs_tolfloat

absolute numerical tolerance, default is sys.float_info.epsilon.

rel_tolfloat

absolute numerical tolerance, default is sys.float_info.epsilon.

See also

AttributeInfo
property label
copy()
class sknrf.utilities.numeric.AttributeInfo

Bases: OrderedDict

OrderedDict of Object Property information.

See also

Info
classmethod initialize(parent, key_order=())
static search_base_dict(dict_, base_classes)
sknrf.utilities.numeric.num2str_re(num, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.num2str_re_im(num, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.num2str_lin_deg(num, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.num2str_log_deg(num, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.num2str(num, info=<sknrf.utilities.numeric.Info object>)

Converts a complex number in scientific mode (shortest representation) to a string representation

sknrf.utilities.numeric.str2num_re(str_, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.str2num_re_im(str_, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.str2num_lin_deg(str_, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.str2num_log_deg(str_, info=<sknrf.utilities.numeric.Info object>)
sknrf.utilities.numeric.str2num(str_, info=<sknrf.utilities.numeric.Info object>)

Converts a string representation to a complex number in scientific notation (shortest representation)

sknrf.utilities.numeric.re_im2re_im(re_im)
sknrf.utilities.numeric.re_im2lin_deg(re_im)
sknrf.utilities.numeric.re_im2log_deg(re_im)
sknrf.utilities.numeric.lin_deg2re_im(lin_deg)
sknrf.utilities.numeric.lin_deg2log_deg(lin_deg)
sknrf.utilities.numeric.log_deg2re_im(log_deg)
sknrf.utilities.numeric.log_deg2lin_deg(log_deg)
sknrf.utilities.numeric.factors(n)
sknrf.utilities.numeric.diff(x, axis=0)
sknrf.utilities.numeric.gradient(f, *X, axis=None)
sknrf.utilities.numeric.jacobian(F, *X, axis=None)
sknrf.utilities.numeric.hessian(f, *X, axis=None)
sknrf.utilities.numeric.gaussian2tol(mean, std, n=1)
sknrf.utilities.numeric.unravel_index(index, shape)