diff --git a/doc/source/tutorial/kernel_polynomial_method.py b/doc/source/tutorial/kernel_polynomial_method.py index 74fb09d18274c4110a29500a8e454c8eb4d69d4b..7e8aa16d2d11f1b3b116ccf76b8d16b0b2a50b34 100644 --- a/doc/source/tutorial/kernel_polynomial_method.py +++ b/doc/source/tutorial/kernel_polynomial_method.py @@ -106,7 +106,7 @@ def increasing_accuracy_example(fsyst): original_dos = spectrum() # get unaltered DoS #HIDDEN_BEGIN_acc1 - spectrum.increase_energy_resolution(tol=0.03) + spectrum.add_moments(energy_resolution=0.03) #HIDDEN_END_acc1 increased_resolution_dos = spectrum() @@ -117,8 +117,8 @@ def increasing_accuracy_example(fsyst): ]) #HIDDEN_BEGIN_acc2 - # we supply the *total* number of moments and sampling points - spectrum.increase_accuracy(num_moments=200, num_rand_vecs=5) + spectrum.add_moments(100) + spectrum.add_vectors(5) #HIDDEN_END_acc2 increased_moments_dos = spectrum() diff --git a/doc/source/tutorial/tutorial7.rst b/doc/source/tutorial/tutorial7.rst index a9d8b7145531cd0391de2151df844fa43b837b48..3ac75ba8936c8214ed2488246e045ef09d965263 100644 --- a/doc/source/tutorial/tutorial7.rst +++ b/doc/source/tutorial/tutorial7.rst @@ -160,21 +160,20 @@ of the method, each of which offers different levels of control over what exactly is changed. The simplest way to obtain a more accurate solution is to use the -``increase_energy_resolution`` method: +``add_moments`` method: .. literalinclude:: kernel_polynomial_method.py :start-after: #HIDDEN_BEGIN_acc1 :end-before: #HIDDEN_END_acc1 -This will update the number of calculated moments and also the default +This will update the number of calculated moments and also the number of sampling points such that the maximum distance between successive -energy points is ``tol`` (see notes on accuracy_). +energy points is ``energy_resolution`` (see notes on accuracy_). .. image:: ../images/kpm_dos_acc.* -Alternatively, you can directly increase (or decrease) the number of moments, -random vectors and sampling points with the method -`~kwant.kpm.SpectralDensity.increase_accuracy`. +Alternatively, you can directly increase the number of moments +with ``add_moments``, or the number of random vectors with ``add_vectors``. .. literalinclude:: kernel_polynomial_method.py :start-after: #HIDDEN_BEGIN_acc2 @@ -182,11 +181,6 @@ random vectors and sampling points with the method .. image:: ../images/kpm_dos_r.* -In the above example we only increased the number of moments and decreased the -number of random vectors. The keyword argument ``num_sampling_points`` can -be also specified by passing the keyword argument to -`~kwant.kpm.SpectralDensity.increase_accuracy`. - .. _operator_spectral_density: