Analyzer

This page is for the Analyzer base class and AnalyzerResult. For the implemented Analyzers see Analyzers.

class triqs_maxent.analyzers.analyzer.Analyzer(name=None, **kwargs)[source]

Bases: object

Analyzer base class

The base class for analyzing the values \(A_{\alpha}\) and getting the one true (\(\alpha\)-independent) solution from the data.

Methods

analyze

class triqs_maxent.analyzers.analyzer.AnalyzerResult[source]

Bases: dict

Keep the result of the analyzer

An analyzer gets the results of the MaxEnt optimization for different values of \(\alpha\) and outputs one single \(A(\omega)\). This inherits from dict, the most important keys are:

  • A_out : the output spectral function

  • name : the name of the analyzer

  • info : human-readable info about what the analyzer did

  • alpha_index : if applicable, the index of the best \(A(\omega)\)

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

plot_A_out([maxent_result])

Plot the spectral function

plot_curvature([maxent_result])

Plot the curvature of \(\log \chi^2\) vs \(\log \alpha\)

plot_dS_dalpha([maxent_result])

Plot the derivative of the entropy with respect to \(\alpha\)

plot_linefit([maxent_result, element])

Plot the fitted lines of \(\log \chi^2\) vs \(\log \alpha\)

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

plot_A_out(maxent_result=None, **kwargs)[source]

Plot the spectral function

Parameters:
maxent_resultMaxEntResult

the corresponding MaxEntResult, where the omega mesh etc. are saved. If None, AnalyzerResult.maxent_result has to be set.

labelstr

the label of the curve (for a legend)

x_labelstr

the label of the x-axis

y_labelstr

the label of the y-axis

log_xbool

whether the x-axis should be log-scaled (default: False)

log_ybool

whether the y-axis should be log-scaled (default: False)

plot_curvature(maxent_result=None, **kwargs)[source]

Plot the curvature of \(\log \chi^2\) vs \(\log \alpha\)

This is not available for all analyzers.

Parameters:
maxent_resultMaxEntResult

the corresponding MaxEntResult, where the omega mesh etc. are saved. If None, AnalyzerResult.maxent_result has to be set.

labelstr

the label of the curve (for a legend)

x_labelstr

the label of the x-axis

y_labelstr

the label of the y-axis

log_xbool

whether the x-axis should be log-scaled (default: False)

log_ybool

whether the y-axis should be log-scaled (default: False)

plot_dS_dalpha(maxent_result=None, **kwargs)[source]

Plot the derivative of the entropy with respect to \(\alpha\)

This is not available for all analyzers.

Parameters:
maxent_resultMaxEntResult

the corresponding MaxEntResult, where the omega mesh etc. are saved. If None, AnalyzerResult.maxent_result has to be set.

labelstr

the label of the curve (for a legend)

x_labelstr

the label of the x-axis

y_labelstr

the label of the y-axis

log_xbool

whether the x-axis should be log-scaled (default: True)

log_ybool

whether the y-axis should be log-scaled (default: False)

plot_linefit(maxent_result=None, element=None, **kwargs)[source]

Plot the fitted lines of \(\log \chi^2\) vs \(\log \alpha\)

This is not available for all analyzers.

Parameters:
maxent_resultMaxEntResult

the corresponding MaxEntResult, where the omega mesh etc. are saved. If None, AnalyzerResult.maxent_result has to be set.

labelstr

the label of the curve (for a legend)

x_labelstr

the label of the x-axis

y_labelstr

the label of the y-axis

log_xbool

whether the x-axis should be log-scaled (default: True)

log_ybool

whether the y-axis should be log-scaled (default: True)