.. _ch-ref-doc:

Documentation
=============

.. automodule:: myTransmissionCoefficient
    :members:

.. _main:

Usage provided in main function in the module.
----------------------------------------------

.. code-block:: python

    def main():
        # set up output plot font size
        myutil.setup_fonts()
        # set up energy range of interest
        # Note that 0 eV gives a warning -> division by zero
        E = np.linspace(0.01, 1.0, 2000)*nu.eV
        # create an object RTD with N=20 subdivision
        RTD = QuantumTransmissionCoefficientCalculator(20)
        # check configured potential structure described in myStructure.py
        # which is imported at the beginnning of this module
        RTD.plot_structure()
        # compute method gives a transmission coefficient TC
        TC1 = RTD.compute(E)
        # apply bias .2 (V)
        RTD.apply_bias(0.2)
        RTD.plot_structure()
        # recalculate transmission coefficient
        TC2 = RTD.compute(E)
        # Results
        plt.plot(TC1, E/nu.eV, label='0 V')
        plt.plot(TC2, E/nu.eV, label='0.2 V')
        plt.xlabel('Transmission coefficient')
        plt.ylabel('Energy (eV)')
        plt.legend(loc='best')
        plt.grid()
        plt.show()
        return