Beispiel #1
0
    scan = {}
    scan['\\gamma_s'] = gamma
    scan['k_{24}'] = k24
    scan['\\Lambda'] = Lambda
    scan['\\omega'] = omega





    psistuff = PsiData(scan=scan,loadsuf=loadsuf,savesuf=savesuf,name=f"psivsr",
                       sfile_format="pdf")

    rs = psistuff.r()
    psis = psistuff.psi()

    ax1.plot(rs/rs[-1],psis,markertypes[i],label=rf'$\gamma={gamma}$',lw=2)

ax1.set_xlabel(r'$r/R$',fontsize=10)
ax1.set_ylabel(r'$\psi(r)$',fontsize=10)
ax1.set_xlim(left=0)
ax1.set_ylim(bottom=0)
ax1.legend(frameon=False,fontsize=10)


fig.subplots_adjust(left=0.2,bottom=0.2)

fig.savefig(psistuff.psivsr_sname())

                          name="hermite-psivsr")

    fig = plt.figure()
    fig.set_size_inches(width, 3 * height)

    ax1 = fig.add_subplot(3, 1, 1)

    ax2 = fig.add_subplot(3, 1, 2)

    ax3 = fig.add_subplot(3, 1, 3)

    ax1.plot(psidata.r(), psidata.psi(), '.', label='actual')
    ax1.plot(hermitedata.r(), hermitedata.psi(), '-', label='fit')
    ax1.set_ylabel(r'$\psi(r)$')

    ax2.plot(psidata.r(), psidata.psiprime(), '.', label='actual')
    ax2.plot(hermitedata.r(), hermitedata.psiprime(), '-', label='fit')
    ax2.set_ylabel(r'$\frac{d\psi}{dr}$')

    ax3.plot(psidata.r(), psidata.rf_fibril(), '.', label='actual')
    ax3.plot(hermitedata.r(), hermitedata.rf_fibril(), '-', label='fit')
    ax3.legend(frameon=False)
    ax3.set_ylabel(r'$r\times f_{\mathrm{fibril}}(r)$')
    ax3.set_xlabel(r'$r$')

    fig.subplots_adjust(left=0.2)

    fig.savefig(psidata.psivsr_sname())

    plt.show()
        rs = psistuff.r() / q
        psis = psistuff.psi()

        if type == 'frustrated':
            label = 'C'
        else:
            label = 'L'

        ax.plot(rs, psis, markertypes[i], label=f'{label}', lw=2)

        print("Radius = ", rs[-1], " nm.")

        print("surface twist = ", psis[-1], " rad.")

        ax.set_xlabel(r'$\tilde{r}$' + ' (' + r'$\si{\nano\meter}$' + ')',
                      fontsize=10)
        ax.set_ylabel(r'$\psi(\tilde{r})$' + ' (' + r'$\si{\radian}$' + ')',
                      fontsize=10)
        ax.set_xlim(0, 120)
        ax.set_ylim(0, 0.1)

    ax.xaxis.set_minor_locator(AutoMinorLocator())
    ax.yaxis.set_minor_locator(AutoMinorLocator())
    ax.legend(frameon=False, loc='lower right', fontsize=10)
    ax.tick_params(which='minor', length=2)
    ax.annotate("(b)", xy=(-0.3, 1.1), xycoords="axes fraction")
    fig.subplots_adjust(left=0.23, right=0.83, bottom=0.2, top=0.8)
    plt.show()

    fig.savefig(psistuff.psivsr_sname(f"psi-vs-r"))
Beispiel #4
0
                strain = str(u)

            psi = PsiData(scan=scan,
                          loadsuf=loadsuf,
                          savesuf=savesuf,
                          strain=strain,
                          name=names_for[type])

            ax[j].plot(psi.r() / q * 1000,
                       psi.psi(),
                       '-',
                       color=colors[i],
                       label=rf"$\tilde{{\sigma}}=\num{{{stresses[j]:.2e}}}$")

    for i, stress in enumerate(stresses):

        ax[i].legend(frameon=False)
        ax[i].set_ylabel(r'$\psi(\tilde{r})$' + ' (' + r'$\si{\radian}$' + ')')
        if (i == 3):
            ax[i].set_xlabel(r'$\tilde{r}$' + ' (' + r'$\si{\nano\meter}$' +
                             ')')
        else:
            plt.setp(ax[i].get_xticklabels(), visible=False)

    psi.strain = None

    fig.subplots_adjust(left=0.2, right=0.8, bottom=0.1, top=0.95, hspace=0.05)
    fig.savefig(psi.psivsr_sname(name="psivsr_specific_stresses"))

    plt.show()