fpraktikum/SZ/auswertung/b.ipynb
2019-11-23 17:08:05 +01:00

449 lines
10 KiB
Text

{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from importlib import reload\n",
"import utility\n",
"\n",
"reload(utility)\n",
"from utility import *\n",
"\n",
"from scipy.optimize import curve_fit\n",
"from SecondaryValue import SecondaryValue"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"org_compliance = 0.0098\n",
"a_an = 26 # cm^2\n",
"a_org = 6.4e-2 # cm^2\n",
"a_fol = 25 # cm^2\n",
"i_ein = 100e-3 # watt/cm^2\n",
"u_ref = 32.2e-3 # volt"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"intensity = SecondaryValue('u/u_ref*i0', defaults=dict(i0=i_ein, u_ref=u_ref))"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"intensities, d_intensites = intensity(u=([.011, 0.017, .021, .026, .032], 2e-3))"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"array([0.00621118, 0.00621118, 0.00621118, 0.00621118, 0.00621118])"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"d_intensites"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"ccurves = [parse_ccurve(f'../messungen/191114_OM_VB/2_{point}.dat') \\\n",
" for point in ['a', 'b', 'c', 'd', 'e']]\n",
"\n",
"ccurve_specs = [(intsy, analyze_ccurve(curve, a_an, intsy)) \\\n",
" for curve, intsy in zip(ccurves, intensities)]"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"%matplotlib qt5\n",
"fig, ax = plot_ccurve(ccurves[0], label=f'I={intensities[0]*1000:.2f}', area=a_an)\n",
"\n",
"for ccurve, intsy in zip(ccurves[1:], intensities[1:]):\n",
" plot_ccurve_line(ax, ccurve, label=f'I={intsy*1000:.2f}', area=a_an)\n",
"\n",
"ax.legend()\n",
"save_fig(fig, 'B/all.pdf')\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 168,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"array([0.04347826, 0.05279503, 0.06521739, 0.08074534, 0.09937888])"
]
},
"execution_count": 168,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"intensities"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"plt.clf()\n",
"plt.errorbar(*np.array([[intsy*1000, params['j_c']] \\\n",
" for intsy, params in ccurve_specs]).T, xerr=d_intensites*1000, marker='*', yerr=0.000005/a_an)\n",
"plt.xlabel('Intensitaet [$mW/cm^2$]')\n",
"plt.ylabel('$j_{SC}$ [$A/cm^2$]')\n",
"plt.grid(which='both')\n",
"plt.savefig('./figs/B/j_sc.pdf', dpi=300)\n",
"#plt.xscale('log')\n",
"#plt.yscale('log')\n"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"plt.clf()\n",
"plt.errorbar(*np.array([[(intsy*1000), params['u_cc']] \\\n",
" for intsy, params in ccurve_specs]).T, xerr=d_intensites*1000, yerr=0.001, marker='*')\n",
"plt.xlabel('Intensitaet [$mW/cm^2$]')\n",
"plt.ylabel('$V_{OC}$ [$V$]')\n",
"plt.xscale('log')\n",
"plt.grid(which='both')\n",
"plt.savefig('./figs/B/u_cc.pdf', dpi=300)\n",
"#plt.yscale('log')\n"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"0.0168614765323676"
]
},
"execution_count": 103,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"0.011 * (.032/.011)**(2/5)"
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"[(0.034161490683229816,\n",
" {'j_c': 0.0025912392307692305,\n",
" 'u_cc': 0.5086008577882963,\n",
" 'u_mlp': 0.3977111360504424,\n",
" 'p_mlp': 0.022268705563519103,\n",
" 'ff': 0.6498857684076272,\n",
" 'eta': 0.025071759410675354}),\n",
" (0.052795031055900624,\n",
" {'j_c': 0.01341955,\n",
" 'u_cc': 0.5600084576663334,\n",
" 'u_mlp': 0.37999930322896436,\n",
" 'p_mlp': 0.11432399757691399,\n",
" 'ff': 0.585101909146971,\n",
" 'eta': 0.08328580818951652}),\n",
" (0.06521739130434784,\n",
" {'j_c': 0.016769280769230767,\n",
" 'u_cc': 0.5613136094311547,\n",
" 'u_mlp': 0.36000019842026715,\n",
" 'p_mlp': 0.13293315750161686,\n",
" 'ff': 0.5431752390708393,\n",
" 'eta': 0.07839647750095351}),\n",
" (0.08074534161490683,\n",
" {'j_c': 0.02099583076923077,\n",
" 'u_cc': 0.5641834857878043,\n",
" 'u_mlp': 0.3399999063957519,\n",
" 'p_mlp': 0.1534276805047185,\n",
" 'ff': 0.4981692745272282,\n",
" 'eta': 0.07308241586171502}),\n",
" (0.09937888198757765,\n",
" {'j_c': 0.025274496153846155,\n",
" 'u_cc': 0.5675239554252917,\n",
" 'u_mlp': 0.32765580118957827,\n",
" 'p_mlp': 0.17174272136274898,\n",
" 'ff': 0.4605091752711381,\n",
" 'eta': 0.06646773591202546})]"
]
},
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ccurve_specs"
]
},
{
"cell_type": "code",
"execution_count": 161,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7f0eb414d940>,\n",
" <matplotlib.lines.Line2D at 0x7f0eb414dc50>]"
]
},
"execution_count": 161,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plt.clf()\n",
"points = np.arange(0,6)\n",
"ints = .011 * (.032/.011)**(points/5)\n",
"plt.plot(np.arange(1,6), intensities, ints)"
]
},
{
"cell_type": "code",
"execution_count": 162,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"array([0.03416149, 0.05279503, 0.06521739, 0.08074534, 0.09937888])"
]
},
"execution_count": 162,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"intensities"
]
},
{
"cell_type": "code",
"execution_count": 163,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"data": {
"text/plain": [
"array([0.011 , 0.01361897, 0.01686148, 0.02087599, 0.02584631,\n",
" 0.032 ])"
]
},
"execution_count": 163,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ints"
]
}
],
"metadata": {
"kernelspec": {
"argv": [
"/usr/bin/python3",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"env": null,
"interrupt_mode": "signal",
"language": "python",
"metadata": null,
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
},
"name": "b.ipynb"
},
"nbformat": 4,
"nbformat_minor": 2
}