AlphaDist

class bin.alphaDist. PlotCurve ( thermal = None , turbulent = None , distmin = - 1 , distmax = 1 , distsep = 0.1 , xmin = None , xmax = None , output = None ) [source]

Plot chi-square curves.

Parameters
thermal str

Directory path of thermal model

turbulent str

Directory path of turbulent model

distmin float

Minimum slope to compute. Default is -1.

distmax float

Maximum slope to compute. Default is 1.

distsep float

Interval between consecutive slope values. Default is 0.1.

xmin float

Minimum slope of fitting range

xmax float

Maximum slope of fitting range

output str

Output figure filename

Examples

From executable:

>>> alphaDist --curve --output curve --thermal thermal/ --turbulent turbulent/ --distmin -1.5 --distmax 1 --distsep 0.1 --xmin -0.5 --xmax0.5 --output plot_curves

From python script:

>>> import alpha
>>> alpha.PlotCurve(thermal='thermal/',turbulent='turbulent/',distmin=-1.5,distmax=1,distsep=0.1,xmin=-0.5,xmax=0.5)

Methods Summary

extract_results (thermal, turbulent, distlist)

Extract chi-square from results

readfort26 (model, fortpath)

Extract fitting results from fort.18 output.

order_list (x, y[, yerr])

Order distortion results in slope order and remove duplicate

plot_curves (fitres, xmin, xmax, output, …)

Do scatter plot of both chi-square and da/a results versus distortion slope

fit_parabola (x, y, xmin, xmax, ymin, ymax, …)

Fit parabola to the chi-square curves.

fit_linear (x, y, yerr, xmin, xmax, ymin, …)

Do linear fit to da/a vs.

Methods Documentation

extract_results ( thermal , turbulent , distlist ) [source]

Extract chi-square from results

readfort26 ( model , fortpath ) [source]

Extract fitting results from fort.18 output.

order_list ( x , y , yerr = None ) [source]

Order distortion results in slope order and remove duplicate

plot_curves ( fitres , xmin , xmax , output , plot_range ) [source]

Do scatter plot of both chi-square and da/a results versus distortion slope

fit_parabola ( x , y , xmin , xmax , ymin , ymax , plot_range ) [source]

Fit parabola to the chi-square curves.

fit_linear ( x , y , yerr , xmin , xmax , ymin , ymax , plot_range ) [source]

Do linear fit to da/a vs. distortion slope curves.