Expand pype parameter string.
Allowed formats for parameter string (see ptable.py):
- X+-Y -- uniform dist'd number: [X-Y, X+Y]
- X+-Y% -- uniform dist'd number: [X-(X*Y/100), X+(X*Y/100)]
- U[min,max] -- uniform dist'd number between min and max
- N[mu,sigma] -- normally dist'd number from N(mu, sigma)
- G[mu,sigma] -- same as N (Gaussian)
- E[mu] -- exponential of mean mu
- TE[mu,{max | min,max}] -- exponential of mean mu; values are constrained
to be within min:max (by resampling). If only max is specified, min
is assumed to be zero
- ITE[mu,{max | min,max}] -- integer exponential -- like TE[], but
discretized to integer values
- EDC[mu,min,max,nbins] -- discrete exponential of mean mu, contrained
to min:max (by resampling). 'nbins' specifies number of discrete points
in distribution (edc = exponential dirac comb)
- start:step[:stride] -- generate non-inclusive range (python
style) and pick one at random (default stride is 1)
- =start:step[:stride] -- generate inclusive range (matlab
style) and pick one at random (default stride is 1)
- [#,#,#,#] -- pick one of these numbers
- X -- just X
- Parameters:
s - (string) parameter specification string
integer - (boolean) if true, return nearest integer
- Returns:
- (float or int) number from specified distirbution
|