Skip to content

Commit

Permalink
PVcircuit v0.0.6
Browse files Browse the repository at this point in the history
docs:
- Add comments for Meteo class
- Note regarding array format of EQE

fix:
- path in init
- fix data path in notebooks
- paths for pvcircuit data
- sigmas for EY
- add array method for EQE
- filter negative and 0 phi
- fix pn direction

update:
- gitignore for bash and slurm files
- notebooks data to notebook_data dir
- gitignore
- comments for all files
- types for all function

remove:
- deprecated EY
- bandgap shifts

create:
- test cases for EY, QE, and IV3T
- conversion.py for physics conversions
- EQET
- Temperature model for bandgap, sigma, and Jsc(Phi,T) fits
- spectral response

iv3T.py:
-fix linting
junction.py:
- fix paths
-add sigma for Jdb calculation
multi2T.py
-fix linting
tandem3T.py
-fix setter
-fix -0.0 num format
-add default lnout for no data

qe.py:
- fix Jint
- refractoring code
- fix sr calc

fix:
- min max plot for multijunciton
- spectral response

EY.py:
- fix Carry over date on reindex
  • Loading branch information
Robert W committed Jan 11, 2025
1 parent b7dc52f commit 433e563
Show file tree
Hide file tree
Showing 52 changed files with 2,936 additions and 1,683 deletions.
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Bash scripts
*.sh

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -6,6 +9,9 @@ __pycache__/
# C extensions
*.so

# DS store files
*.DS_Store

# Distribution / packaging
.Python
build/
Expand Down Expand Up @@ -37,6 +43,10 @@ MANIFEST
pip-log.txt
pip-delete-this-directory.txt

# internal data
/internal_data/
*/internal/*

# Unit test / coverage reports
htmlcov/
.tox/
Expand Down Expand Up @@ -71,6 +81,9 @@ instance/
# Sphinx documentation
docs/_build/

# Slurm stuff:
slurm*

# PyBuilder
target/

Expand Down Expand Up @@ -134,4 +147,7 @@ dmypy.json
.pyre/

# other folders
Share/
Share/

# out files
*.out
Binary file removed data/.DS_Store
Binary file not shown.
43 changes: 18 additions & 25 deletions notebooks/4J IMM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "d316a12a-7ca5-4352-ad21-b81eaf1abfcc",
"metadata": {},
"outputs": [],
"source": [
"# data MM927\n",
"path = pvc.datapath\n",
"path = pvc.notebook_datapath\n",
"ELcsv = 'MM927Bn10EL.csv'\n",
"JVscv = 'MM927Bn10JV.csv'\n",
"dfEL = pd.read_csv(path+ELcsv, index_col=0)\n",
"dfJV = pd.read_csv(path+JVscv, index_col=0)\n",
"dfEL = pd.read_csv(path / ELcsv, index_col=0)\n",
"dfJV = pd.read_csv(path / JVscv, index_col=0)\n",
"#parse\n",
"data_I0=np.array(dfEL['J0'])/1000. #->A\n",
"data_V0=np.array(dfEL['V0'])\n",
Expand All @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"id": "72fbdbdb-eee9-41f8-8662-b7158c884e37",
"metadata": {},
"outputs": [],
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"id": "9ac045cc-f893-4f9a-a7f6-f82caeb74c7d",
"metadata": {},
"outputs": [],
Expand All @@ -102,17 +102,17 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "fc908aa2-60a8-405f-ae73-42cb9e5e7f30",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x2f0beaa6500>]"
"[<matplotlib.lines.Line2D at 0x7f1c61a96240>]"
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -133,7 +133,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"id": "b1ef0475-afe7-417d-a4a0-a4e63d09e62c",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -189,7 +189,7 @@
"RBB_dict: {'method': 'JFG', 'mrb': 43.0, 'J0rb': 0.3, 'Vrb': 0.0}"
]
},
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -200,41 +200,34 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"id": "5dd5e423-b857-4f03-8153-0746f5f58dfd",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5d0fc313cc7b416190deb395c2d3164d",
"model_id": "ff7f233c88db4bbd9fb52731e2a53cb7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Output(outputs=({'output_type': 'display_data', 'data': {'text/plain': \"Canvas(t"
"VBox(children=(HBox(children=(Output(), Output()), layout=Layout(display='flex', flex_flow='row', justify_cont"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
"ui"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0c84652a-d63e-40e3-8615-b47a129d61c8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -248,7 +241,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
87 changes: 53 additions & 34 deletions notebooks/MS874_3T.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 5,
"id": "aadb3f93",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
Expand All @@ -22,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 6,
"id": "fcd04291",
"metadata": {},
"outputs": [],
Expand All @@ -41,15 +50,15 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"id": "3d7dd5f8-2a35-461c-a5d7-81bceee9093e",
"metadata": {},
"outputs": [],
"source": [
"A=0.25\n",
"Aratio=0.89\n",
"# data iv3T vs V\n",
"path = pvc.datapath\n",
"path = pvc.notebook_datapath\n",
"fileA = 'MS874n4papy_C_CZ_JA.csv'\n",
"fileB = 'MS874n4papy_C_CZ_JB.csv'\n",
"MS874_V_dataiv = pvc.IV3T.from_csv('MS874_V_dataiv',path,fileA,fileB,'V','CZ', area=A) #Iscale=1000./A)\n",
Expand All @@ -65,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"id": "f471637c-4313-4988-8f8c-1683e5ddf91c",
"metadata": {},
"outputs": [],
Expand All @@ -86,37 +95,55 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 12,
"id": "8f62fafb-eeaa-4ea1-91a6-01102d3518a4",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9852946ea74f427082b7a2cb04e96325",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Output(), Output()), layout=Layout(display='flex', flex_flow='row', justify_cont…"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# ui, Vax, Iax = MS874dev3T.controls(MS874_V_dataiv, MS874_I_dataiv, MS874dark_dataiv, hex=False)\n",
"# ui\n",
"\n",
"pwc = PlotsWithControls(MS874dev3T,MS874_V_dataiv, MS874_I_dataiv, MS874dark_dataiv, hex=False)\n",
"ui = pwc.ui"
"ui = pwc.ui\n",
"ui"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"id": "179a3a24-50f6-4f39-bbef-493f44c54d04",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9c1f15b3795949c8aeca8fa0765fe2b1",
"model_id": "62417a76272e4c2097f9dfdcf7940efe",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Output(), Output()))"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -137,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"id": "1484973f-fe1a-44fa-8018-0a8899ecce1c",
"metadata": {},
"outputs": [
Expand All @@ -148,19 +175,19 @@
"{'name': 'MS874dev3T SpecialPoints', 'meastype': 'CZ', 'area': 0.25, 'shape': (9,)}\n",
"sizes(9, 9)\n",
"\n",
" # mIro mIzo mIto Vzt Vrz Vtr mIA mIB VA VB mPtot mIxhex mIyhex Vxhex Vyhex \n",
" Voc3 0.00 0.00 0.00 1.431 -1.029 -0.402 0.00 0.00 -1.029 -1.431 0.00 0.00 0.00 1.296 -1.189 \n",
" Isc3 2.82 -6.68 3.81 0.000 0.000 -0.000 2.82 3.81 0.000 0.000 -0.00 -0.70 -7.69 0.000 0.000 \n",
" VrzIto 3.24 -3.24 0.00 1.427 0.000 -1.427 3.24 0.00 0.000 -1.427 -0.00 2.29 -3.74 2.018 0.000 \n",
" VztIro 0.00 -3.81 3.81 0.686 -1.021 0.335 0.00 3.81 -1.021 -0.686 2.62 -2.70 -4.40 0.249 -1.179 \n",
" VtrIzo nan nan nan nan nan nan nan nan nan nan -100000.00 nan nan nan nan \n",
" MPP 2.73 -6.46 3.69 1.302 -0.906 -0.396 2.73 3.69 -0.906 -1.302 7.27 -0.67 -7.43 1.201 -1.046 \n",
"MPPVM32 2.79 -6.50 3.67 1.306 -0.871 -0.435 2.79 3.67 -0.871 -1.306 7.22 -0.62 -7.49 1.231 -1.005 \n",
"MPPVM43 2.59 -6.41 3.78 1.248 -0.936 -0.312 2.59 3.78 -0.936 -1.248 7.14 -0.84 -7.38 1.103 -1.081 \n",
" MPPCM -3.40 0.00 3.40 1.350 -1.057 -0.294 -3.40 3.40 -1.057 -1.350 1.00 -4.81 0.00 1.162 -1.220 "
" # mIro mIzo mIto Vzt Vrz Vtr mIA mIB VA VB mPtot mIxhex mIyhex Vxhex Vyhex \n",
" Voc3 0.00 0.00 0.00 1.431 -1.029 -0.402 0.00 0.00 -1.029 -1.431 0.00 0.00 0.00 1.296 -1.189 \n",
" Isc3 2.82 -6.68 3.81 0.000 0.000 0.000 2.82 3.81 0.000 0.000 0.00 -0.70 -7.69 0.000 0.000 \n",
" VrzIto 3.24 -3.24 0.00 1.427 0.000 -1.427 3.24 0.00 0.000 -1.427 0.00 2.29 -3.74 2.018 0.000 \n",
" VztIro 0.00 -3.81 3.81 0.686 -1.021 0.335 0.00 3.81 -1.021 -0.686 2.62 -2.70 -4.40 0.249 -1.179 \n",
" VtrIzo nan nan nan nan nan nan nan nan nan nan -100000.00 nan nan nan nan \n",
" MPP 2.73 -6.46 3.69 1.302 -0.906 -0.396 2.73 3.69 -0.906 -1.302 7.27 -0.67 -7.43 1.201 -1.046 \n",
" MPPVM32 2.79 -6.50 3.67 1.306 -0.871 -0.435 2.79 3.67 -0.871 -1.306 7.22 -0.62 -7.49 1.231 -1.005 \n",
" MPPVM43 2.59 -6.41 3.78 1.248 -0.936 -0.312 2.59 3.78 -0.936 -1.248 7.14 -0.84 -7.38 1.103 -1.081 \n",
" MPPCM -3.40 0.00 3.40 1.350 -1.057 -0.294 -3.40 3.40 -1.057 -1.350 1.00 -4.81 0.00 1.162 -1.220 "
]
},
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -175,19 +202,11 @@
"sp.append(MPPCM)\n",
"sp"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "291e9998-5196-4a44-95ee-15f144336c1a",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -201,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 433e563

Please sign in to comment.