diff --git a/.coveragerc b/.coveragerc
index 0fac5cf7..ab937b2a 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,2 +1,2 @@
[run]
-omit=PVDegradationTools/_version.py
\ No newline at end of file
+omit=pvdeg/_version.py
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
index c574020b..dedc1c36 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-PVDegradationTools/_version.py export-subst
+pvdeg/_version.py export-subst
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index f3b4508d..8c4843ee 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -40,4 +40,4 @@ jobs:
pytest
- name: Collect coverage
run: |
- pytest --cov=PVDegradationTools tests/
+ pytest --cov=pvdeg tests/
diff --git a/MANIFEST.in b/MANIFEST.in
index 9e78e945..ddbe3dd7 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,2 @@
include versioneer.py
-include PVDegradationTools/_version.py
+include pvdeg/_version.py
diff --git a/README.md b/README.md
index a249d8b8..d44dfcc9 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
License |
-
+
|
@@ -17,8 +17,8 @@
Documentation |
-
-
+
+
|
@@ -35,9 +35,9 @@ This repository contains functions for calculating degradation of photovoltaic m
Documentation
=============
-[Tutorials](https://github.com/NREL/PVDegradationTools/tree/main/docs/tutorials) on the usage of functions are located in the "docs > Tutorials" folder.
+[Tutorials](https://github.com/NREL/pvdeg/tree/main/docs/tutorials) on the usage of functions are located in the "docs > Tutorials" folder.
-We also have documentation in [ReadTheDocs](https://pvdegradationtools.readthedocs.io) where you can find more details on the API functions.
+We also have documentation in [ReadTheDocs](https://pvdeg.readthedocs.io) where you can find more details on the API functions.
Installation
@@ -47,7 +47,7 @@ Relative Humidity and Acceleration Factors for Solar Modules releases may be ins
Install with:
- pip install PVDegradationTools
+ pip install pvdeg
For developer installation, download the repository, navigate to the folder location and install as:
@@ -70,8 +70,8 @@ Getting support
===============
If you suspect that you may have discovered a bug or if you'd like to
-change something about PVDegradationTools, then please make an issue on our
-[GitHub issues page](hhttps://github.com/NREL/PVDegradationTools/issues).
+change something about pvdeg, then please make an issue on our
+[GitHub issues page](hhttps://github.com/NREL/pvdeg/issues).
Citing
diff --git a/cla-1.0.md b/cla-1.0.md
index c4ece034..a5763c22 100644
--- a/cla-1.0.md
+++ b/cla-1.0.md
@@ -3,24 +3,24 @@ The Contributors License Agreement
Version 1.0
-----------
-I agree to contribute to PVDegradationTools.
+I agree to contribute to pvdeg.
I agree to the following terms and conditions for my contributions:
First, I agree that I am licensing the copyright to my contributions
-under the terms of the current PVDegradationTools license.
+under the terms of the current pvdeg license.
Second, I agree that, in order to conform to any future open source
-software license(s) under which PVDegradationTools may be provided, the terms of
+software license(s) under which pvdeg may be provided, the terms of
my copyright license may be modified without any notice to me and
without my consent.
Third, I hereby grant to Alliance for Sustainable Energy, LLC,
-to any successor manager and distributor of PVDegradationTools appointed by
+to any successor manager and distributor of pvdeg appointed by
the U.S. Department of Energy, and to all recipients of
-a version of PVDegradationTools that includes my contributions, a non-exclusive,
+a version of pvdeg that includes my contributions, a non-exclusive,
worldwide, royalty-free, irrevocable patent license under any patent
claims owned by me, or owned by my employer and known to me, that
are or will be, necessarily infringed upon by my contributions alone,
-or by combination of my contributions with the version of PVDegradationTools
+or by combination of my contributions with the version of pvdeg
to which they are contributed, to make, have made, use, offer to sell,
-sell, import, and otherwise transfer any version of PVDegradationTools that
+sell, import, and otherwise transfer any version of pvdeg that
includes my contributions, in source code and object code form.
Fourth, I represent and warrant that I am authorized to make the
contributions and grant the foregoing license(s).
diff --git a/demo/PVD_AWS_Single_Location.ipynb b/demo/PVD_AWS_Single_Location.ipynb
index 63c65e97..d30578e8 100644
--- a/demo/PVD_AWS_Single_Location.ipynb
+++ b/demo/PVD_AWS_Single_Location.ipynb
@@ -123,7 +123,7 @@
"source": [
"#Import required packages\n",
"from rex import NSRDBX, WindX\n",
- "from PVDegradationTools.standards import calc_standoff\n",
+ "from pvdeg.standards import calc_standoff\n",
"\n",
"#Define NSRDB weather data - freely accesible through AWS\n",
"nsrdb_fp = '/nrel/nsrdb/current/nsrdb_tmy-2021.h5'\n",
diff --git a/demo/demo_status.json b/demo/demo_status.json
index 9f227165..e6abb2b8 100644
--- a/demo/demo_status.json
+++ b/demo/demo_status.json
@@ -14,7 +14,7 @@
"l": 0.5,
"max_workers": null,
"mount_type": "open_rack_glass_glass",
- "out_dir": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo",
+ "out_dir": "/home/mspringe/projects/degtools/github/pvdeg/demo",
"sky_model": "isotropic",
"tag": "_j0",
"temp_model": "sapm",
@@ -24,7 +24,7 @@
"weather_names": "TMY",
"weather_satellite": "Americas",
"wind_speed_factor": 1,
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_rel_humidity_j0.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_rel_humidity_j0.h5",
"runtime_seconds": 9.521851,
"time_end": "21-Apr-2023 13:57:11",
"total_runtime": "0:00:09"
@@ -42,7 +42,7 @@
"l": 0.5,
"max_workers": null,
"mount_type": "open_rack_glass_glass",
- "out_dir": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo",
+ "out_dir": "/home/mspringe/projects/degtools/github/pvdeg/demo",
"sky_model": "isotropic",
"tag": "_j1",
"temp_model": "sapm",
@@ -52,7 +52,7 @@
"weather_names": "TMY",
"weather_satellite": "Americas",
"wind_speed_factor": 1,
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_rel_humidity_j1.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_rel_humidity_j1.h5",
"runtime_seconds": 9.398299,
"time_end": "21-Apr-2023 13:57:11",
"total_runtime": "0:00:09"
@@ -69,7 +69,7 @@
"level": 1,
"max_workers": null,
"module_type": "glass_polymer",
- "out_dir": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo",
+ "out_dir": "/home/mspringe/projects/degtools/github/pvdeg/demo",
"sky_model": "isotropic",
"tag": "_j0",
"temp_model": "sapm",
@@ -80,7 +80,7 @@
"weather_satellite": "Americas",
"wind_speed_factor": 1.71,
"x_0": 6.1,
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_standoff_j0.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_standoff_j0.h5",
"runtime_seconds": 8.855118,
"time_end": "21-Apr-2023 13:46:45",
"total_runtime": "0:00:08"
@@ -94,7 +94,7 @@
"level": 1,
"max_workers": null,
"module_type": "glass_polymer",
- "out_dir": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo",
+ "out_dir": "/home/mspringe/projects/degtools/github/pvdeg/demo",
"sky_model": "isotropic",
"tag": "_j1",
"temp_model": "sapm",
@@ -105,7 +105,7 @@
"weather_satellite": "Americas",
"wind_speed_factor": 1.71,
"x_0": 6.1,
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_standoff_j1.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_standoff_j1.h5",
"runtime_seconds": 8.662029,
"time_end": "21-Apr-2023 13:46:45",
"total_runtime": "0:00:08"
@@ -119,11 +119,11 @@
"job_status": "successful",
"time_submitted": "21-Apr-2023 13:57:18",
"collect_pattern": [
- "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_rel_humidity.h5",
- "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_rel_humidity*.h5"
+ "/home/mspringe/projects/degtools/github/pvdeg/demo/out_rel_humidity.h5",
+ "/home/mspringe/projects/degtools/github/pvdeg/demo/out_rel_humidity*.h5"
],
"datasets": null,
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_rel_humidity.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_rel_humidity.h5",
"purge_chunks": false,
"runtime_seconds": 2.521077,
"time_end": "21-Apr-2023 13:57:39",
@@ -139,13 +139,13 @@
"job_status": "successful",
"time_submitted": "21-Apr-2023 13:46:50",
"collect_pattern": [
- "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_standoff.h5",
- "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_standoff*.h5"
+ "/home/mspringe/projects/degtools/github/pvdeg/demo/out_standoff.h5",
+ "/home/mspringe/projects/degtools/github/pvdeg/demo/out_standoff*.h5"
],
"datasets": null,
"purge_chunks": false,
"time_start": "21-Apr-2023 13:47:12",
- "out_file": "/home/mspringe/projects/degtools/github/PVDegradationTools/demo/out_standoff.h5",
+ "out_file": "/home/mspringe/projects/degtools/github/pvdeg/demo/out_standoff.h5",
"runtime_seconds": 1.785692,
"time_end": "21-Apr-2023 13:47:13",
"total_runtime": "0:00:01"
diff --git a/demo/eagle_install_pvd.sh b/demo/eagle_install_pvd.sh
index 25a06a8c..583413c9 100755
--- a/demo/eagle_install_pvd.sh
+++ b/demo/eagle_install_pvd.sh
@@ -56,7 +56,7 @@ fi
conda install -c pvlib pvlib
# Clone the necessary repositories
-git clone https://github.com/NREL/PVDegradationTools.git ./$1/pvd
+git clone https://github.com/NREL/pvdeg.git ./$1/pvd
git clone https://github.com/NREL/gaps.git ./$1/gaps
git clone https://github.com/NREL/reV.git ./$1/reV
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.collection.rst b/docs/sphinx/source/_autosummary/pvdeg.collection.rst
similarity index 67%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.collection.rst
rename to docs/sphinx/source/_autosummary/pvdeg.collection.rst
index a1d0e0d6..f3df6bd5 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.collection.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.collection.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.collection
-=============================
+pvdeg.collection
+================
-.. automodule:: PVDegradationTools.collection
+.. automodule:: pvdeg.collection
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.humidity.rst b/docs/sphinx/source/_autosummary/pvdeg.humidity.rst
similarity index 74%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.humidity.rst
rename to docs/sphinx/source/_autosummary/pvdeg.humidity.rst
index b1270bbb..f42ce31a 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.humidity.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.humidity.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.humidity
-===========================
+pvdeg.humidity
+==============
-.. automodule:: PVDegradationTools.humidity
+.. automodule:: pvdeg.humidity
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.letid.rst b/docs/sphinx/source/_autosummary/pvdeg.letid.rst
similarity index 80%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.letid.rst
rename to docs/sphinx/source/_autosummary/pvdeg.letid.rst
index 3eee3d58..1af36859 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.letid.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.letid.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.letid
-========================
+pvdeg.letid
+===========
-.. automodule:: PVDegradationTools.letid
+.. automodule:: pvdeg.letid
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.main.rst b/docs/sphinx/source/_autosummary/pvdeg.main.rst
similarity index 63%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.main.rst
rename to docs/sphinx/source/_autosummary/pvdeg.main.rst
index 43f683c9..d63e3c64 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.main.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.main.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.main
-=======================
+pvdeg.main
+==========
-.. automodule:: PVDegradationTools.main
+.. automodule:: pvdeg.main
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.spectral.rst b/docs/sphinx/source/_autosummary/pvdeg.spectral.rst
similarity index 59%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.spectral.rst
rename to docs/sphinx/source/_autosummary/pvdeg.spectral.rst
index 411b8bde..8e843413 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.spectral.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.spectral.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.spectral
-===========================
+pvdeg.spectral
+==============
-.. automodule:: PVDegradationTools.spectral
+.. automodule:: pvdeg.spectral
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.standards.rst b/docs/sphinx/source/_autosummary/pvdeg.standards.rst
similarity index 61%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.standards.rst
rename to docs/sphinx/source/_autosummary/pvdeg.standards.rst
index 84e548bd..4ce3d217 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.standards.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.standards.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.standards
-============================
+pvdeg.standards
+===============
-.. automodule:: PVDegradationTools.standards
+.. automodule:: pvdeg.standards
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.temperature.rst b/docs/sphinx/source/_autosummary/pvdeg.temperature.rst
similarity index 52%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.temperature.rst
rename to docs/sphinx/source/_autosummary/pvdeg.temperature.rst
index 208e57b6..51774b36 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.temperature.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.temperature.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.temperature
-==============================
+pvdeg.temperature
+=================
-.. automodule:: PVDegradationTools.temperature
+.. automodule:: pvdeg.temperature
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.utilities.rst b/docs/sphinx/source/_autosummary/pvdeg.utilities.rst
similarity index 67%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.utilities.rst
rename to docs/sphinx/source/_autosummary/pvdeg.utilities.rst
index 08e3ae4b..f9c1fd4e 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.utilities.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.utilities.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.utilities
-============================
+pvdeg.utilities
+===============
-.. automodule:: PVDegradationTools.utilities
+.. automodule:: pvdeg.utilities
diff --git a/docs/sphinx/source/_autosummary/PVDegradationTools.weather.rst b/docs/sphinx/source/_autosummary/pvdeg.weather.rst
similarity index 65%
rename from docs/sphinx/source/_autosummary/PVDegradationTools.weather.rst
rename to docs/sphinx/source/_autosummary/pvdeg.weather.rst
index 08ad6a87..280757c3 100644
--- a/docs/sphinx/source/_autosummary/PVDegradationTools.weather.rst
+++ b/docs/sphinx/source/_autosummary/pvdeg.weather.rst
@@ -1,7 +1,7 @@
-PVDegradationTools.weather
-==========================
+pvdeg.weather
+=============
-.. automodule:: PVDegradationTools.weather
+.. automodule:: pvdeg.weather
diff --git a/docs/sphinx/source/api.rst b/docs/sphinx/source/api.rst
index 4806b895..3c769607 100644
--- a/docs/sphinx/source/api.rst
+++ b/docs/sphinx/source/api.rst
@@ -4,7 +4,7 @@ API
===
Modules, methods, classes and attributes are explained here.
-.. automodule:: PVDegradationTools
+.. automodule:: pvdeg
:members:
.. autosummary::
diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py
index 3232854e..aa51f199 100644
--- a/docs/sphinx/source/conf.py
+++ b/docs/sphinx/source/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# PVDegradationTools documentation build configuration file, Jan 2023
+# PVDegradationTools (pvdeg) documentation build configuration file, Jan 2023
#
# Configuration file for the Sphinx documentation builder.
#
@@ -77,7 +77,7 @@ def __getattr__(cls, name):
# Document Python Code
#autodoc_mock_imports = ['bs4', 'requests']
#autoapi_type = 'python'
-#autoapi_dirs = '../../../PVDegradationTools'
+#autoapi_dirs = '../../../pvdeg'
napoleon_use_rtype = False # group rtype on same line together with return
@@ -140,7 +140,7 @@ def __getattr__(cls, name):
html_show_copyright = True
# Output file base name for HTML help builder.
-htmlhelp_basename = 'PVDegradationToolsdoc'
+htmlhelp_basename = 'pvdegdoc'
# A workaround for the responsive tables always having annoying scrollbars.
def setup(app):
@@ -164,7 +164,7 @@ def setup(app):
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('index', 'PVDegradationTools.tex', u'PVDegradationTools\\_Python Documentation',
+ ('index', 'pvdeg.tex', u'pvdeg\\_Python Documentation',
u'NREL, github contributors', 'manual'),
]
@@ -189,9 +189,9 @@ def setup(app):
#latex_domain_indices = True
"""
# extlinks alias #TODO: check if those are working
-extlinks = {'issue': ('https://github.com/NREL/PVDegradationTools/issues/%s', '%s. GH'),
- 'pull': ('https://github.com/NREL/PVDegradationTools/pull/%s', '%s. GH'),
- 'wiki': ('https://github.com/NREL/PVDegradationTools/wiki/%s', '%s. wiki '),
+extlinks = {'issue': ('https://github.com/NREL/pvdeg/issues/%s', '%s. GH'),
+ 'pull': ('https://github.com/NREL/pvdeg/pull/%s', '%s. GH'),
+ 'wiki': ('https://github.com/NREL/pvdeg/wiki/%s', '%s. wiki '),
'doi': ('http://dx.doi.org/%s', '%s. DOI: '),
'ghuser': ('https://github.com/%s', '%s. @')}
"""
@@ -200,7 +200,7 @@ def setup(app):
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'PVDegradationTools', u'PVDegradationTools Documentation',
+ ('index', 'pvdeg', u'pvdeg Documentation',
[u'NREL, github contributors'], 1)
]
@@ -214,8 +214,8 @@ def setup(app):
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'PVDegradationTools', u'PVDegradationTools Documentation',
- u'NREL, github contributors', 'PVDegradationTools', 'One line description of project.',
+ ('index', 'pvdeg', u'pvdeg Documentation',
+ u'NREL, github contributors', 'pvdeg', 'One line description of project.',
'Miscellaneous'),
]
diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst
index 17dfb065..d06e6508 100644
--- a/docs/sphinx/source/index.rst
+++ b/docs/sphinx/source/index.rst
@@ -1,14 +1,14 @@
-Welcome to PVDegradationTools!
+Welcome to pvdeg!
==============================================================
This PVDegradation Tools Model is a first-of-its-kind detailed spatio-temporal modeling assessment tool that empowers users to calcualte various PV degradation modes, with various PV technology and materials databases.
-NREL developed the PVDegradationTools model to help PV Researchers, Module manufacturesrs, and ohter PV stakeholders assess different materials and technologies for different degradation modes in all locations through the world. Available as open source since January 2023, the PVDegradation model currently supports PV energy calculations for water vapor pressure, ingres rate, edge seal widht, Van Hofft Irradiance Degradation, Weighted Average Irradiance, Arrehnius Acceleration Factor, relative humidity in the outside, front and back encapsulant and backsheet,spectral degradation, and solder fatigue. More functions for standards and other degradation profiles are in the works.
+NREL developed the pvdeg model to help PV Researchers, Module manufacturesrs, and ohter PV stakeholders assess different materials and technologies for different degradation modes in all locations through the world. Available as open source since January 2023, the PVDegradation model currently supports PV energy calculations for water vapor pressure, ingres rate, edge seal widht, Van Hofft Irradiance Degradation, Weighted Average Irradiance, Arrehnius Acceleration Factor, relative humidity in the outside, front and back encapsulant and backsheet,spectral degradation, and solder fatigue. More functions for standards and other degradation profiles are in the works.
-The source code for PVDegradationTools is hosted on `github
-`_.
+The source code for pvdeg is hosted on `github
+`_.
Please see the :ref:`installation` page for installation help.
@@ -16,7 +16,7 @@ How the Model Works
===================
Coupled with pvlib for module performan and weather/irradiance calculations, the PVDegradation Tool estiamtes degradations, and accelerated factors on user-defined parameters including [working on long list here]
-The PVDegradationTool simulatineously reads tens of terabytes of time-series solar data from state-of-art resource data set National Solar Radiation Database (NSRDB), publicly avialable no the cloud, enabling the execution of PVDegradationTools beyond the confines of NREL's high-performance computing capabilities.
+The PVDegradationTool simulatineously reads tens of terabytes of time-series solar data from state-of-art resource data set National Solar Radiation Database (NSRDB), publicly avialable no the cloud, enabling the execution of pvdeg beyond the confines of NREL's high-performance computing capabilities.
Citing PVDegradation Tools
diff --git a/docs/sphinx/source/installation.rst b/docs/sphinx/source/installation.rst
index 9133f2c6..e5811fba 100644
--- a/docs/sphinx/source/installation.rst
+++ b/docs/sphinx/source/installation.rst
@@ -3,13 +3,13 @@
Installation
============
-PVDegradationTools releases may be installed using the pip and conda tools.
+pvdeg releases may be installed using the pip and conda tools.
Install with:
.. code::
- pip install PVDegradationTools
+ pip install pvdeg
For developer installation, download the repository, navigate to the folder location and install as:
diff --git a/docs/sphinx/source/package_overview.rst b/docs/sphinx/source/package_overview.rst
index 3cbc4b66..191d755f 100644
--- a/docs/sphinx/source/package_overview.rst
+++ b/docs/sphinx/source/package_overview.rst
@@ -3,7 +3,7 @@
Package Overview
================
-PVDegradationTools provides a python library of common degradation modes for fielded photovoltaics and accelerated testing.
+pvdeg provides a python library of common degradation modes for fielded photovoltaics and accelerated testing.
It currently offers functions to calculate test-chamber irradiance settings, the humidity of PV materials, the spectral degradation in backsheets, and more. Generally,
you will only need a .psm3 weather file, which can be retrieved from NREL's `National Solar Radiation Database `_ (NSRDB).
diff --git a/docs/tutorials/1 - Energy Calcs and Relative Humidity.ipynb b/docs/tutorials/1 - Energy Calcs and Relative Humidity.ipynb
index 5f78a6d7..c22e3efd 100644
--- a/docs/tutorials/1 - Energy Calcs and Relative Humidity.ipynb
+++ b/docs/tutorials/1 - Energy Calcs and Relative Humidity.ipynb
@@ -41,7 +41,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"\n",
- "import PVDegradationTools as PVD"
+ "import pvdeg "
]
},
{
@@ -88,7 +88,7 @@
"source": [
"### 2.\n",
"\n",
- "We will use `pvlib` to generate data necessary for PVD Tools. For help with these functions, see https://pvlib-python.readthedocs.io/en/stable/index.html"
+ "We will use `pvlib` to generate data necessary for pvdeg Tools. For help with these functions, see https://pvlib-python.readthedocs.io/en/stable/index.html"
]
},
{
@@ -114,7 +114,7 @@
"source": [
"### 3. Water Vapor Pressure & Edge Seal Width\n",
"\n",
- "From here on, PVD Tools "
+ "From here on, pvdeg Tools "
]
},
{
@@ -133,19 +133,19 @@
}
],
"source": [
- "water_vapor_pressure = PVD.StressFactors.water_vapor_pressure(data['Dew Point'])\n",
+ "water_vapor_pressure = pvdeg.StressFactors.water_vapor_pressure(data['Dew Point'])\n",
"\n",
"avg_wvp = water_vapor_pressure.mean()\n",
- "k = PVD.StressFactors.k(avg_wvp=avg_wvp)\n",
+ "k = pvdeg.StressFactors.k(avg_wvp=avg_wvp)\n",
"\n",
- "edge_seal_width = PVD.StressFactors.edge_seal_width(k)\n",
+ "edge_seal_width = pvdeg.StressFactors.edge_seal_width(k)\n",
"\n",
"print(avg_wvp)\n",
"print(k)\n",
"print(edge_seal_width)\n",
"\n",
"# Currently No Data: Cloud Cover\n",
- "# dew_yield = PVD.EnergyCalcs.dew_yield(elevation=meta['Elevation'], dew_point=data['Dew Point']\n",
+ "# dew_yield = pvdeg.EnergyCalcs.dew_yield(elevation=meta['Elevation'], dew_point=data['Dew Point']\n",
"# dry_bulb=data['Temperature'],\n",
"# wind_speed=data['Wind Speed'],\n",
"# n=)"
@@ -177,11 +177,11 @@
" wind_speed=data['Wind Speed'], **cell_params)\n",
"\n",
"# calculate the VantHoff Acceleration factor\n",
- "vantHoff_deg = PVD.Degradation.vantHoff_deg(I_chamber=I_chamber, poa_global=poa_global,\n",
+ "vantHoff_deg = pvdeg.Degradation.vantHoff_deg(I_chamber=I_chamber, poa_global=poa_global,\n",
" temp_cell=temp_cell, temp_chamber=temp_chamber)\n",
"\n",
"# calculate the VantHoff weighted irradiance\n",
- "irr_weighted_avg_v = PVD.Degradation.IwaVantHoff(poa_global=poa_global, temp_cell=temp_cell)"
+ "irr_weighted_avg_v = pvdeg.Degradation.IwaVantHoff(poa_global=poa_global, temp_cell=temp_cell)"
]
},
{
@@ -227,16 +227,16 @@
" wind_speed=data['Wind Speed'], a=cell_params['a'],\n",
" b=cell_params['b'])\n",
"\n",
- "rh_surface = PVD.StressFactors.rh_surface_outside(rh_ambient=data['Relative Humidity'],\n",
+ "rh_surface = pvdeg.StressFactors.rh_surface_outside(rh_ambient=data['Relative Humidity'],\n",
" temp_ambient=data['Temperature'],\n",
" temp_module=temp_module)\n",
"\n",
- "arrhenius_deg = PVD.Degradation.arrhenius_deg(I_chamber=I_chamber, rh_chamber=rh_chamber,\n",
+ "arrhenius_deg = pvdeg.Degradation.arrhenius_deg(I_chamber=I_chamber, rh_chamber=rh_chamber,\n",
" rh_outdoor=rh_surface, poa_global=poa_global,\n",
" temp_chamber=temp_chamber, temp_cell=temp_cell,\n",
" Ea=Ea)\n",
"\n",
- "irr_weighted_avg_a = PVD.Degradation.IwaArrhenius(poa_global=poa_global, \n",
+ "irr_weighted_avg_a = pvdeg.Degradation.IwaArrhenius(poa_global=poa_global, \n",
" rh_outdoor=data['Relative Humidity'],\n",
" temp_cell=temp_cell, Ea=Ea)"
]
@@ -276,15 +276,15 @@
"metadata": {},
"outputs": [],
"source": [
- "rh_front_encap = PVD.StressFactors.rh_front_encap(rh_ambient=data['Relative Humidity'],\n",
+ "rh_front_encap = pvdeg.StressFactors.rh_front_encap(rh_ambient=data['Relative Humidity'],\n",
" temp_ambient=data['Temperature'],\n",
" temp_module=temp_module)\n",
"\n",
- "rh_back_encap = PVD.StressFactors.rh_back_encap(rh_ambient=data['Relative Humidity'],\n",
+ "rh_back_encap = pvdeg.StressFactors.rh_back_encap(rh_ambient=data['Relative Humidity'],\n",
" temp_ambient=data['Temperature'],\n",
" temp_module=temp_module)\n",
"\n",
- "rh_backsheet = PVD.StressFactors.rh_backsheet_from_encap(rh_back_encap=rh_back_encap,\n",
+ "rh_backsheet = pvdeg.StressFactors.rh_backsheet_from_encap(rh_back_encap=rh_back_encap,\n",
" rh_surface_outside=data['Relative Humidity'])"
]
},
diff --git a/docs/tutorials/2 - Degradation.ipynb b/docs/tutorials/2 - Degradation.ipynb
index 56f4694a..dfdc5c52 100644
--- a/docs/tutorials/2 - Degradation.ipynb
+++ b/docs/tutorials/2 - Degradation.ipynb
@@ -37,7 +37,7 @@
"import pvlib\n",
"import pandas as pd\n",
"import numpy as np\n",
- "import PVDegradationTools as PVD"
+ "import pvdeg "
]
},
{
@@ -172,7 +172,7 @@
"source": [
"### 2. Calculate Degradation\n",
"\n",
- "Normally, we'd have to find the module temperature (with PVLIB) and the module RH (with PVD) but we'll assume the dataset above is providing that data."
+ "Normally, we'd have to find the module temperature (with PVLIB) and the module RH (with pvdeg) but we'll assume the dataset above is providing that data."
]
},
{
@@ -190,7 +190,7 @@
],
"source": [
"wavelengths = np.array(range(280,420,20))\n",
- "degradation = PVD.Degradation.degradation(spectra=input_df['Spectra'], rh_module=input_df['RH'],\n",
+ "degradation = pvdeg.Degradation.degradation(spectra=input_df['Spectra'], rh_module=input_df['RH'],\n",
" temp_module=input_df['Temperature'],\n",
" wavelengths=wavelengths)"
]
@@ -251,7 +251,7 @@
"temp_cell = pvlib.temperature.sapm_cell(poa_global=0, temp_air=data['Temperature'],\n",
" wind_speed=data['Wind Speed'], **cell_params)\n",
"\n",
- "damage = PVD.Degradation.solder_fatigue(time_range=time_range, temp_cell=temp_cell)"
+ "damage = pvdeg.Degradation.solder_fatigue(time_range=time_range, temp_cell=temp_cell)"
]
}
],
diff --git a/docs/tutorials/3 - ScenarioObjects.ipynb b/docs/tutorials/3 - ScenarioObjects.ipynb
index 4a36f4be..1d757709 100644
--- a/docs/tutorials/3 - ScenarioObjects.ipynb
+++ b/docs/tutorials/3 - ScenarioObjects.ipynb
@@ -7,8 +7,8 @@
"source": [
"# 3 - Scenario Objects\n",
"***\n",
- "Scenario Objects are an container for all parameters required to run a PVD job. The object is meant\n",
- "to be your initial step in running a PVD operation as it is capable of initializing your gids,\n",
+ "Scenario Objects are an container for all parameters required to run a pvdeg job. The object is meant\n",
+ "to be your initial step in running a pvdeg operation as it is capable of initializing your gids,\n",
"module material, mounting type, and other parameters.\n",
"\n",
"Usage:\n",
@@ -27,7 +27,7 @@
"2. add location data\n",
"3. add module data\n",
"4. View Scenario Dictionaries\n",
- "5. Running a PVD Job with a scenario\n",
+ "5. Running a pvdeg Job with a scenario\n",
"\n",
"### This is a **work in progress**"
]
@@ -38,7 +38,7 @@
"metadata": {},
"outputs": [],
"source": [
- "import PVDegradationTools as PVD"
+ "import pvdeg "
]
},
{
@@ -59,7 +59,7 @@
"metadata": {},
"outputs": [],
"source": [
- "test_case = PVD.Scenario(name='test_01')"
+ "test_case = pvdeg.Scenario(name='test_01')"
]
},
{
@@ -69,7 +69,7 @@
"source": [
"### 2. Add Location Data\n",
"Currently, the `Scenario.addLocation` function is intended to generate the gids and gids.csv\n",
- "file used in the PVD job running with GAPs. By default, it will use the HPC's NSRDB file.\n",
+ "file used in the pvdeg job running with GAPs. By default, it will use the HPC's NSRDB file.\n",
"\n",
"Only one location file may be added to a scenario using one of the 3 following methods\n",
"\n",
@@ -161,11 +161,11 @@
"metadata": {},
"source": [
"### 3.a. Add test modules\n",
- "Add a module to test in the PVD job for all specified locaiton in the project_points file.\n",
+ "Add a module to test in the pvdeg job for all specified locaiton in the project_points file.\n",
"This requires a module name, and racking type (see PVLIB SAPM Temperature Model Params)\n",
"\n",
"`Scenario.addModule` currently accepts 1 module at a time, though it can be used to add several\n",
- "modules to the Scenario Object. The intent is to have each module type tested in the PVD Job.\n",
+ "modules to the Scenario Object. The intent is to have each module type tested in the pvdeg Job.\n",
"\n",
"If one attempts to add a module with name already in the Scenario instance, it will warn the user,\n",
"then replace the module parameters."
@@ -323,7 +323,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 5. Running a PVD job with scenario objects"
+ "## 5. Running a pvdeg job with scenario objects"
]
},
{
diff --git a/docs/tutorials/B-O LID - Accelerated Test.ipynb b/docs/tutorials/B-O LID - Accelerated Test.ipynb
index 1ceb2cf0..e0872baa 100644
--- a/docs/tutorials/B-O LID - Accelerated Test.ipynb
+++ b/docs/tutorials/B-O LID - Accelerated Test.ipynb
@@ -45,7 +45,7 @@
}
],
"source": [
- "from PVDegradationTools import letid, collection, utilities\n",
+ "from pvdeg import letid, collection, utilities\n",
"\n",
"import pandas as pd\n",
"import numpy as np\n",
@@ -87,7 +87,7 @@
"metadata": {},
"outputs": [],
"source": [
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
diff --git a/docs/tutorials/Demo - Relative Humidity.ipynb b/docs/tutorials/Demo - Relative Humidity.ipynb
index f5eb1ed0..1c5c5d3e 100644
--- a/docs/tutorials/Demo - Relative Humidity.ipynb
+++ b/docs/tutorials/Demo - Relative Humidity.ipynb
@@ -34,10 +34,10 @@
"source": [
"import pandas as pd\n",
"#import Relative_Humidity_for_Solar_Modules\n",
- "import PVDegradationTools as PVD\n",
+ "import pvdeg \n",
"import os\n",
"\n",
- "path = os.path.join('..','..','PVDegradationTools','data','722024TYA.pickle')\n",
+ "path = os.path.join('..','..','pvdeg','data','722024TYA.pickle')\n",
"#import data\n",
"locationData , processedData_df = pd.read_pickle( path )\n",
"\n",
@@ -75,7 +75,7 @@
"#Ead : Encapsulant diffusivity activation energy in (kJ/mol) The suggested value for EVA is 38.14(kJ/mol).\n",
"Ead = 38.14\n",
"#SDW: Diffusivity weighted water content \n",
- "SDw = PVD.relativeHumidity.SDw( rH_ambient , ambient_temp , surface_temp, So , Eas , Ead)\n",
+ "SDw = pvdeg.relativeHumidity.SDw( rH_ambient , ambient_temp , surface_temp, So , Eas , Ead)\n",
"#WVTRo : Water Vapor Transfer Rate prefactor (g/m2/day). The suggested value for EVA is 7970633554(g/m2/day).\n",
"WVTRo = 7970633554\n",
"#EaWVTR : Water Vapor Transfer Rate activation energy (kJ/mol) .\n",
@@ -100,19 +100,19 @@
"source": [
"#Get the Relative Humidity of the outside surface of the Solar Module.\n",
"RHsurfaceOutside = pd.Series(name=\"RHsurfaceOutside\" , data= \\\n",
- " PVD.relativeHumidity.RHsurfaceOutside(rH_ambient, ambient_temp, surface_temp ) )\n",
+ " pvdeg.relativeHumidity.RHsurfaceOutside(rH_ambient, ambient_temp, surface_temp ) )\n",
"\n",
"#Get the Relative Humidity of the Frontside Encapsulant of a Solar Module.\n",
"RHfrontEncap = pd.Series(name=\"RHfront\" , data= \\\n",
- " PVD.relativeHumidity.RHfrontEncap( surface_temp, SDw , So , Eas) )\n",
+ " pvdeg.relativeHumidity.RHfrontEncap( surface_temp, SDw , So , Eas) )\n",
"\n",
"#Get the Relative Humidity of the Backside Encapsulant of a Solar Module \n",
"RHbackEncap = pd.Series(name=\"RHbackEncap\" , data= \\\n",
- " PVD.relativeHumidity.RHbackEncap( rH_ambient , ambient_temp , surface_temp , WVTRo , EaWVTR , So , l , Eas ) )\n",
+ " pvdeg.relativeHumidity.RHbackEncap( rH_ambient , ambient_temp , surface_temp , WVTRo , EaWVTR , So , l , Eas ) )\n",
" \n",
"#Get the Relative Humidity of the backside Back sheet of a Solar Module \n",
"RHbacksheet = pd.Series(name=\"RHbacksheet\" , data= \\\n",
- " PVD.relativeHumidity.RHbacksheet( RHbackEncap , RHsurfaceOutside ) )"
+ " pvdeg.relativeHumidity.RHbacksheet( RHbackEncap , RHsurfaceOutside ) )"
]
},
{
@@ -434,12 +434,12 @@
"x = .64\n",
"\n",
"#Temperature equivalent for Vant Hoff Equation\n",
- "VantHoff_Toeq = PVD.energyCalcs.ToeqVantHoff( surface_temp, Tf )\n",
+ "VantHoff_Toeq = pvdeg.energyCalcs.ToeqVantHoff( surface_temp, Tf )\n",
"\n",
"#IWa : Environment Characterization (W/m^2)\n",
"#*for one year of degredation the controlled environmnet lamp settings will \n",
"# need to be set to IWa\n",
- "VantHoff_Iwa = PVD.energyCalcs.IwaVantHoff( POAglobal = processedData_df['POA Global(W/m^2)'], \n",
+ "VantHoff_Iwa = pvdeg.energyCalcs.IwaVantHoff( POAglobal = processedData_df['POA Global(W/m^2)'], \n",
" Toutdoor = surface_temp,\n",
" x = x,\n",
" Tf = Tf)"
@@ -464,7 +464,7 @@
"refTemp = 60\n",
"\n",
"#Get the Vant Hoff equation acceleration factor \n",
- "VantHoff_AF = PVD.energyCalcs.vantHoffDeg( x , \n",
+ "VantHoff_AF = pvdeg.energyCalcs.vantHoffDeg( x , \n",
" Ichamber , \n",
" processedData_df['POA Global(W/m^2)'] , \n",
" surface_temp , \n",
@@ -489,20 +489,20 @@
"Ea = 28\n",
"\n",
"#Arrhenius_Teq = Temperature equivalent\n",
- "Arrhenius_Teq = PVD.energyCalcs.TeqArrhenius( surface_temp , Ea )\n",
+ "Arrhenius_Teq = pvdeg.energyCalcs.TeqArrhenius( surface_temp , Ea )\n",
"\n",
"# n = fit parameter for relative humidity \n",
"n=1\n",
"\n",
"#RHwa : Relative Humidity Weighted Average\n",
"#Use the Relative humidity surface Outside \n",
- "Arrhenius_RHwa = PVD.energyCalcs.RHwaArrhenius( RHoutdoor = RHsurfaceOutside ,\n",
+ "Arrhenius_RHwa = pvdeg.energyCalcs.RHwaArrhenius( RHoutdoor = RHsurfaceOutside ,\n",
" Toutdoor = surface_temp, \n",
" Teq = Arrhenius_Teq,\n",
" Ea = Ea,\n",
" n = n )\n",
"\n",
- "Arrhenius_Iwa = PVD.energyCalcs.IwaArrhenius( POAglobal = processedData_df['POA Global(W/m^2)'],\n",
+ "Arrhenius_Iwa = pvdeg.energyCalcs.IwaArrhenius( POAglobal = processedData_df['POA Global(W/m^2)'],\n",
" RHoutdoor = RHsurfaceOutside ,\n",
" Toutdoor = surface_temp ,\n",
" Ea = Ea ,\n",
@@ -526,7 +526,7 @@
"#rhChamber = Relative Humidity of the controlled environment % \"chamber\"\n",
"rhChamber = 15\n",
"#Get the Arrehnius equation acceleration factor\n",
- "Arrehnius_AF = PVD.energyCalcs.arrheniusCalc( x ,\n",
+ "Arrehnius_AF = pvdeg.energyCalcs.arrheniusCalc( x ,\n",
" Ichamber ,\n",
" rhChamber ,\n",
" n ,\n",
diff --git a/docs/tutorials/LETID - Accelerated Test.ipynb b/docs/tutorials/LETID - Accelerated Test.ipynb
index 94401447..8679869b 100644
--- a/docs/tutorials/LETID - Accelerated Test.ipynb
+++ b/docs/tutorials/LETID - Accelerated Test.ipynb
@@ -41,7 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from PVDegradationTools import letid, collection, utilities\n",
+ "from pvdeg import letid, collection, utilities\n",
"\n",
"import pandas as pd\n",
"import numpy as np\n",
@@ -74,7 +74,7 @@
"metadata": {},
"outputs": [],
"source": [
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
@@ -852,8 +852,8 @@
"ax2.legend(loc = 'upper right')\n",
"ax2.set_ylabel('Normalized $P_{MP}$')\n",
"\n",
- "#ax.axvline(PVD.Degradation.calc_regeneration_time(timesteps).total_seconds()/(60*60*24), linestyle = ':' , c = 'grey')\n",
- "#ax.annotate('80% regeneration', (PVD.Degradation.calc_regeneration_time(timesteps).total_seconds()/(60*60*24), 80),\n",
+ "#ax.axvline(pvdeg.Degradation.calc_regeneration_time(timesteps).total_seconds()/(60*60*24), linestyle = ':' , c = 'grey')\n",
+ "#ax.annotate('80% regeneration', (pvdeg.Degradation.calc_regeneration_time(timesteps).total_seconds()/(60*60*24), 80),\n",
"# xytext=(0.5, 0.8), textcoords='axes fraction',\n",
"# arrowprops=dict(facecolor='black', shrink=0.1),\n",
"# horizontalalignment='right', verticalalignment='top')\n",
diff --git a/docs/tutorials/LETID - Outdoor LETID.ipynb b/docs/tutorials/LETID - Outdoor LETID.ipynb
index b7bf1d0f..14b97dd5 100644
--- a/docs/tutorials/LETID - Outdoor LETID.ipynb
+++ b/docs/tutorials/LETID - Outdoor LETID.ipynb
@@ -33,7 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from PVDegradationTools import letid, collection, utilities\n",
+ "from pvdeg import letid, collection, utilities\n",
"\n",
"import pvlib\n",
"\n",
@@ -869,7 +869,7 @@
"metadata": {},
"outputs": [],
"source": [
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
diff --git a/docs/tutorials/LETID - Outdoor Scenario Based on Accelerated Test Result.ipynb b/docs/tutorials/LETID - Outdoor Scenario Based on Accelerated Test Result.ipynb
index 1c78e600..52de2d86 100644
--- a/docs/tutorials/LETID - Outdoor Scenario Based on Accelerated Test Result.ipynb
+++ b/docs/tutorials/LETID - Outdoor Scenario Based on Accelerated Test Result.ipynb
@@ -37,7 +37,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from PVDegradationTools import letid, collection, utilities\n",
+ "from pvdeg import letid, collection, utilities\n",
"\n",
"import pvlib\n",
"\n",
@@ -268,7 +268,7 @@
"outputs": [],
"source": [
"\n",
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
@@ -1522,7 +1522,7 @@
"metadata": {},
"outputs": [],
"source": [
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
diff --git a/docs/tutorials/LETID - Passivated Wafer.ipynb b/docs/tutorials/LETID - Passivated Wafer.ipynb
index c5973ed1..d48f516a 100644
--- a/docs/tutorials/LETID - Passivated Wafer.ipynb
+++ b/docs/tutorials/LETID - Passivated Wafer.ipynb
@@ -33,7 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from PVDegradationTools import letid, collection, utilities\n",
+ "from pvdeg import letid, collection, utilities\n",
"\n",
"import pandas as pd\n",
"import numpy as np\n",
@@ -58,7 +58,7 @@
"wafer_thickness = 180 # um\n",
"tau = 350 # us, lifetime of the wafer for demonstration purposes\n",
"\n",
- "generation_df = pd.read_excel('..\\..\\PVDegradationTools\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
+ "generation_df = pd.read_excel('..\\..\\pvdeg\\data\\PVL_GenProfile.xlsx', header = 0) # this is an optical generation profile generated by PVLighthouse's OPAL2 default model for 1-sun, normal incident AM1.5 sunlight on a 180-um thick SiNx-coated, pyramid-textured wafer.\n",
"generation = generation_df['Generation (cm-3s-1)']\n",
"depth = generation_df['Depth (um)']\n",
"\n",
diff --git a/docs/tutorials/rh_test.py b/docs/tutorials/rh_test.py
index 09524f2a..461b0e05 100644
--- a/docs/tutorials/rh_test.py
+++ b/docs/tutorials/rh_test.py
@@ -6,11 +6,11 @@
import pandas as pd
#import Relative_Humidity_for_Solar_Modules
-import PVDegradationTools as PVD
+import pvdeg
import os
-os.chdir('C:/Users/mbrown2/Documents/GitHub/PVDegradationTools/docs/tutorials')
-path = os.path.join('..','..','PVDegradationTools','data','722024TYA.pickle')
+os.chdir('C:/Users/mbrown2/Documents/GitHub/pvdeg/docs/tutorials')
+path = os.path.join('..','..','pvdeg','data','722024TYA.pickle')
#import data
locationData , processedData_df = pd.read_pickle( path )
@@ -35,7 +35,7 @@
#Ead : Encapsulant diffusivity activation energy in (kJ/mol) The suggested value for EVA is 38.14(kJ/mol).
Ead = 38.14
#SDW: Diffusivity weighted water content
-SDw = PVD.relativeHumidity.SDw( rH_ambient , ambient_temp , surface_temp, So , Eas , Ead)
+SDw = pvdeg.relativeHumidity.SDw( rH_ambient , ambient_temp , surface_temp, So , Eas , Ead)
#WVTRo : Water Vapor Transfer Rate prefactor (g/m2/day). The suggested value for EVA is 7970633554(g/m2/day).
WVTRo = 7970633554
#EaWVTR : Water Vapor Transfer Rate activation energy (kJ/mol) .
@@ -47,11 +47,11 @@
# ======= RH Calcs =======
#Get the Relative Humidity of the outside surface of the Solar Module.
RHsurfaceOutside = pd.Series(name="RHsurfaceOutside" , data= \
- PVD.relativeHumidity.RHsurfaceOutside(rH_ambient, ambient_temp, surface_temp ) )
+ pvdeg.relativeHumidity.RHsurfaceOutside(rH_ambient, ambient_temp, surface_temp ) )
#Get the Relative Humidity of the Frontside Encapsulant of a Solar Module.
RHfrontEncap = pd.Series(name="RHfront" , data= \
- PVD.relativeHumidity.RHfront( surface_temp, SDw , So , Eas) )
+ pvdeg.relativeHumidity.RHfront( surface_temp, SDw , So , Eas) )
# In[1]:
@@ -59,11 +59,11 @@
# In[2]:
#Get the Relative Humidity of the Backside Encapsulant of a Solar Module
RHbackEncap = pd.Series(name="RHbackEncap" , data= \
- PVD.relativeHumidity.RHbackEncap( rH_ambient , ambient_temp , surface_temp , WVTRo , EaWVTR , So , l , Eas ) )
+ pvdeg.relativeHumidity.RHbackEncap( rH_ambient , ambient_temp , surface_temp , WVTRo , EaWVTR , So , l , Eas ) )
#Get the Relative Humidity of the backside Back sheet of a Solar Module
RHbacksheet = pd.Series(name="RHbacksheet" , data= \
- PVD.relativeHumidity.RHbacksheet( RHbackEncap , RHsurfaceOutside ) )
+ pvdeg.relativeHumidity.RHbacksheet( RHbackEncap , RHsurfaceOutside ) )
# ===== Results ======
diff --git a/PVDegradationTools/__init__.py b/pvdeg/__init__.py
similarity index 100%
rename from PVDegradationTools/__init__.py
rename to pvdeg/__init__.py
diff --git a/PVDegradationTools/_version.py b/pvdeg/_version.py
similarity index 99%
rename from PVDegradationTools/_version.py
rename to pvdeg/_version.py
index ae31d576..73654d6d 100644
--- a/PVDegradationTools/_version.py
+++ b/pvdeg/_version.py
@@ -42,8 +42,8 @@ def get_config():
cfg.VCS = "git"
cfg.style = "pep440"
cfg.tag_prefix = ""
- cfg.parentdir_prefix = "PVDegradationTools"
- cfg.versionfile_source = "PVDegradationTools/_version.py"
+ cfg.parentdir_prefix = "pvdeg"
+ cfg.versionfile_source = "pvdeg/_version.py"
cfg.verbose = False
return cfg
diff --git a/PVDegradationTools/cli.py b/pvdeg/cli.py
similarity index 77%
rename from PVDegradationTools/cli.py
rename to pvdeg/cli.py
index b158fd2a..9bd2c36c 100644
--- a/PVDegradationTools/cli.py
+++ b/pvdeg/cli.py
@@ -1,5 +1,5 @@
-from PVDegradationTools.standards import run_calc_standoff
-from PVDegradationTools.humidity import run_calc_rel_humidity
+from pvdeg.standards import run_calc_standoff
+from pvdeg.humidity import run_calc_rel_humidity
from gaps.cli import CLICommandFromFunction, make_cli
commands = [
diff --git a/PVDegradationTools/collection.py b/pvdeg/collection.py
similarity index 100%
rename from PVDegradationTools/collection.py
rename to pvdeg/collection.py
diff --git a/PVDegradationTools/data/722024TYA.pickle b/pvdeg/data/722024TYA.pickle
similarity index 100%
rename from PVDegradationTools/data/722024TYA.pickle
rename to pvdeg/data/722024TYA.pickle
diff --git a/PVDegradationTools/data/Degradation Database.xlsm b/pvdeg/data/Degradation Database.xlsm
similarity index 100%
rename from PVDegradationTools/data/Degradation Database.xlsm
rename to pvdeg/data/Degradation Database.xlsm
diff --git a/PVDegradationTools/data/DegradationDatabase.json b/pvdeg/data/DegradationDatabase.json
similarity index 100%
rename from PVDegradationTools/data/DegradationDatabase.json
rename to pvdeg/data/DegradationDatabase.json
diff --git a/PVDegradationTools/data/OPAL2.pvl b/pvdeg/data/OPAL2.pvl
similarity index 100%
rename from PVDegradationTools/data/OPAL2.pvl
rename to pvdeg/data/OPAL2.pvl
diff --git a/PVDegradationTools/data/PVL_GenProfile.xlsx b/pvdeg/data/PVL_GenProfile.xlsx
similarity index 100%
rename from PVDegradationTools/data/PVL_GenProfile.xlsx
rename to pvdeg/data/PVL_GenProfile.xlsx
diff --git a/PVDegradationTools/data/kinetic_parameters.json b/pvdeg/data/kinetic_parameters.json
similarity index 100%
rename from PVDegradationTools/data/kinetic_parameters.json
rename to pvdeg/data/kinetic_parameters.json
diff --git a/PVDegradationTools/data/materials.json b/pvdeg/data/materials.json
similarity index 100%
rename from PVDegradationTools/data/materials.json
rename to pvdeg/data/materials.json
diff --git a/PVDegradationTools/humidity.py b/pvdeg/humidity.py
similarity index 100%
rename from PVDegradationTools/humidity.py
rename to pvdeg/humidity.py
diff --git a/PVDegradationTools/letid.py b/pvdeg/letid.py
similarity index 99%
rename from PVDegradationTools/letid.py
rename to pvdeg/letid.py
index f2ffafd1..c5c83295 100644
--- a/PVDegradationTools/letid.py
+++ b/pvdeg/letid.py
@@ -6,7 +6,7 @@
import os
from scipy.constants import convert_temperature, elementary_charge, Boltzmann
from scipy.integrate import simpson
-from PVDegradationTools import collection
+from pvdeg import collection
def tau_now(tau_0, tau_deg, n_b):
diff --git a/PVDegradationTools/main.py b/pvdeg/main.py
similarity index 98%
rename from PVDegradationTools/main.py
rename to pvdeg/main.py
index a6a04f52..96bfa8c6 100644
--- a/PVDegradationTools/main.py
+++ b/pvdeg/main.py
@@ -12,8 +12,8 @@
from scipy.integrate import simpson
from pvlib.temperature import TEMPERATURE_MODEL_PARAMETERS
import os
-from PVDegradationTools import utilities as utils
-import PVDegradationTools as PVD
+from pvdeg import utilities as utils
+import pvdeg
import json
class StressFactors:
@@ -1512,7 +1512,7 @@ def addModule(self,
'close_mount_glass_glass', 'insulated_back_glass_polymer'
material : (str)
Name of the material desired. For a complete list, see data/materials.json.
- To add a custom material, see PVDegradationTools.addMaterial (ex: EVA, Tedlar)
+ To add a custom material, see pvdeg.addMaterial (ex: EVA, Tedlar)
"""
# fetch material parameters (Eas, Ead, So, etc)
@@ -1566,24 +1566,24 @@ def viewScenario(self):
def addFunction(self, func_name=None, func_params=None):
"""
- Add a PVD function to the scenario pipeline
+ Add a pvdeg function to the scenario pipeline
TODO: list public functions if no func_name given or bad func_name given
Parameters:
-----------
func_name : (str)
- The name of the requested PVD function. Do not include the class.
+ The name of the requested pvdeg function. Do not include the class.
func_params : (dict)
- The required parameters to run the requested PVD function
+ The required parameters to run the requested pvdeg function
Returns:
--------
func_name : (str)
- the name of the PVD function requested
+ the name of the pvdeg function requested
"""
- _func, reqs = PVD.Scenario._verify_function(func_name)
+ _func, reqs = pvdeg.Scenario._verify_function(func_name)
if _func == None:
print(f'FAILED: Requested function "{func_name}" not found')
@@ -1610,7 +1610,7 @@ def runJob(self, job=None):
TODO: overhaul with futures/slurm
capture results
- standardize result format for all of PVD
+ standardize result format for all of pvdeg
Parameters:
-----------
@@ -1622,14 +1622,14 @@ def runJob(self, job=None):
for job in self.pipeline:
args = job['parameters']
- _func = PVD.Scenario._verify_function(job['job'],args)[0]
+ _func = pvdeg.Scenario._verify_function(job['job'],args)[0]
result = _func(**args)
def exportScenario(self, file_path=None):
'''
Export the scenario dictionaries to a json configuration file
- TODO exporting functions as name string within pipeline. cannot .json dump
+ TODO exporting functions as name string within pipeline. cannot .json dump
Need to make sure name is verified > stored > export > import > re-verify > converted.
This could get messy. Need to streamline the process or make it bullet proof
@@ -1675,7 +1675,7 @@ def importScenario(self, file_path=None):
def _verify_function(func_name):
"""
- Check all classes in PVD for a function of the name "func_name". Returns a callable function
+ Check all classes in pvdeg for a function of the name "func_name". Returns a callable function
and list of all function parameters with no default values.
Parameters:
@@ -1686,17 +1686,17 @@ def _verify_function(func_name):
Returns:
--------
_func : (func)
- callable instance of named function internal to PVD
+ callable instance of named function internal to pvdeg
reqs : (list(str))
list of minimum required paramters to run the requested funciton
"""
from inspect import signature
- # find the function in PVD
- class_list = [c for c in dir(PVD) if not c.startswith('_')]
+ # find the function in pvdeg
+ class_list = [c for c in dir(pvdeg) if not c.startswith('_')]
func_list = []
for c in class_list:
- _class = getattr(PVD,c)
+ _class = getattr(pvdeg,c)
if func_name in dir(_class):
_func = getattr(_class,func_name)
if _func == None:
diff --git a/PVDegradationTools/spectral.py b/pvdeg/spectral.py
similarity index 100%
rename from PVDegradationTools/spectral.py
rename to pvdeg/spectral.py
diff --git a/PVDegradationTools/standards.py b/pvdeg/standards.py
similarity index 100%
rename from PVDegradationTools/standards.py
rename to pvdeg/standards.py
diff --git a/PVDegradationTools/temperature.py b/pvdeg/temperature.py
similarity index 100%
rename from PVDegradationTools/temperature.py
rename to pvdeg/temperature.py
diff --git a/PVDegradationTools/utilities.py b/pvdeg/utilities.py
similarity index 99%
rename from PVDegradationTools/utilities.py
rename to pvdeg/utilities.py
index a6eb66ff..3e29ce44 100644
--- a/PVDegradationTools/utilities.py
+++ b/pvdeg/utilities.py
@@ -185,7 +185,7 @@ def _get_state(id):
def convert_tmy(file_in, file_out='h5_from_tmy.h5'):
'''
- Read a older TMY-like weather file and convert to h5 for use in PVD
+ Read a older TMY-like weather file and convert to h5 for use in pvdeg
TODO: figure out scale_facator and np.int32 for smaller file
expand for international locations?
diff --git a/PVDegradationTools/weather.py b/pvdeg/weather.py
similarity index 100%
rename from PVDegradationTools/weather.py
rename to pvdeg/weather.py
diff --git a/setup.cfg b/setup.cfg
index 20953cd3..9fd0cede 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,10 +5,10 @@
[versioneer]
VCS = git
style = pep440
-versionfile_source = PVDegradationTools/_version.py
-versionfile_build = PVDegradationTools/_version.py
+versionfile_source = pvdeg/_version.py
+versionfile_build = pvdeg/_version.py
tag_prefix = ''
-parentdir_prefix = PVDegradationTools
+parentdir_prefix = pvdeg
[aliases]
test = pytest
diff --git a/setup.py b/setup.py
index 32386fc8..c4a1d7b9 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
long_description = f.read()
setup(
- name='PVDegradationTools',
+ name='pvdeg',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
@@ -75,10 +75,10 @@
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
#packages=find_packages(exclude=['contrib', 'docs', 'tests']) + ['data'],
- packages = ['PVDegradationTools'],
+ packages = ['pvdeg'],
# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
- #py_modules=["PVDegradationTools"],
+ #py_modules=["pvdeg"],
# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
@@ -100,7 +100,7 @@
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
package_data={
- 'PVDegradationTools': ['data/722024TYA.pickle'],
+ 'pvdeg': ['data/722024TYA.pickle'],
},
include_package_data=True,
@@ -118,10 +118,10 @@
# 'sample=sample:main',
# ],
#},
- package_dir={"pvd": "PVDegradationTools"},
+ package_dir={"pvdeg": "pvdeg"},
entry_points={
"console_scripts": [
- "pvd=PVDegradationTools.cli:cli",
+ "pvd=pvdeg.cli:cli",
]
},
)
diff --git a/sign-cla.md b/sign-cla.md
index a42ad234..2f094f9b 100644
--- a/sign-cla.md
+++ b/sign-cla.md
@@ -11,10 +11,10 @@ Contributors License Agreement. It's easy and pretty painless!
2. Make an account on [GitHub](https://github.com/) if you don't already
have one.
-3. File a pull request on this project (the PVDegradationTools Project),
+3. File a pull request on this project (the pvdeg Project),
as [outlined below](#filing-the-pull-request).
-4. Email the PVDegradationTools Sourceror, as [outlined below](#sending-the-email).
+4. Email the pvdeg Sourceror, as [outlined below](#sending-the-email).
5. Wait for an Alliance team member to merge your pull request. You may start
opening pull requests for the project you're contributing to but we will
@@ -82,10 +82,10 @@ That's it!
Sending the Email
-----------------
-Send an email to PVDegradationTools's official Open Sourceror
+Send an email to pvdeg's official Open Sourceror
at [silvana.ovaitt@nrel.gov](mailto:silvana.ovaitt@nrel.gov),
cc-ing [michael.kempe@nrel.gov](mailto:michael.kempe@nrel.gov),
-with the subject "CLA PVDegradationTools"
+with the subject "CLA pvdeg"
and the following body:
```
diff --git a/tests/sandbox.ipynb b/tests/sandbox.ipynb
index c43bf514..f3b99bbd 100644
--- a/tests/sandbox.ipynb
+++ b/tests/sandbox.ipynb
@@ -8,7 +8,7 @@
"source": [
"import os\n",
"import pandas as pd\n",
- "import PVDegradationTools as PVD\n",
+ "import pvdeg \n",
"from rex import NSRDBX, Outputs\n",
"\n",
"tmy_file = os.path.join('data','tmy3_pytest.csv')\n",
@@ -21,7 +21,7 @@
"metadata": {},
"outputs": [],
"source": [
- "PVD.utilities.convert_tmy(file_in=tmy_file, file_out=h5_file)"
+ "pvdeg.utilities.convert_tmy(file_in=tmy_file, file_out=h5_file)"
]
},
{
diff --git a/tests/test_collection.py b/tests/test_collection.py
index 9b137eab..76fa8cd7 100644
--- a/tests/test_collection.py
+++ b/tests/test_collection.py
@@ -2,7 +2,7 @@
import os
import pandas as pd
import numpy as np
-from PVDegradationTools import collection
+from pvdeg import collection
TESTDIR = os.path.dirname(__file__) # this folder
GENERATIONFILE = os.path.join(TESTDIR, 'data', r'PVL_GenProfile.xlsx')
diff --git a/tests/test_humidity.py b/tests/test_humidity.py
index ae95cbbd..360bbf80 100644
--- a/tests/test_humidity.py
+++ b/tests/test_humidity.py
@@ -2,26 +2,26 @@
import json
import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
#Load weather data
-weather_df = pd.read_pickle(os.path.join(PVD.TEST_DATA_DIR, 'weather_df_day.pkl'))
-with open(os.path.join(PVD.TEST_DATA_DIR, 'meta.json')) as file:
+weather_df = pd.read_pickle(os.path.join(pvdeg.TEST_DATA_DIR, 'weather_df_day.pkl'))
+with open(os.path.join(pvdeg.TEST_DATA_DIR, 'meta.json')) as file:
meta = json.load(file)
#Load expected results
expected_rel_hum = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'rel_hum_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'rel_hum_day.pkl'))
def test_calc_rel_humidity():
'''
- test PVD.humidity.calc_rel_humidity
+ test pvdeg.humidity.calc_rel_humidity
Requires:
---------
weather dataframe and meta dictionary
'''
- result = PVD.humidity.calc_rel_humidity(weather_df, meta)
+ result = pvdeg.humidity.calc_rel_humidity(weather_df, meta)
pd.testing.assert_frame_equal(result,
expected_rel_hum,
check_dtype=False)
\ No newline at end of file
diff --git a/tests/test_main.py b/tests/test_main.py
index 7f659329..817fce7b 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -2,7 +2,7 @@
Created on January 2nd 2023
Using pytest to create unit tests for PV Degradation Tools
-to run unit tests, run pytest from the command line in the PVDegradationTools directory
+to run unit tests, run pytest from the command line in the pvdeg directory
to run coverage tests, run py.test --cov-report term-missing --cov=bifacial_radiance
"""
@@ -11,7 +11,7 @@
import pytest
import pandas as pd
import pvlib
-import PVDegradationTools as PVD
+import pvdeg
# try navigating to tests directory so tests run from here.
try:
@@ -37,7 +37,7 @@
# # test water vapor pressure
# # *DEPRECATED*
-# wvp = PVD.StressFactors.water_vapor_pressure(PSM['Dew Point'])
+# wvp = pvdeg.StressFactors.water_vapor_pressure(PSM['Dew Point'])
# assert wvp.__len__() == PSM.__len__()
# avg_wvp = wvp.mean()
# assert avg_wvp == pytest.approx(0.54218, abs=0.0001)
@@ -45,38 +45,38 @@
def test_k():
# test calculation for constant k
- wvp = PVD.StressFactors.psat(PSM['Dew Point'])
+ wvp = pvdeg.StressFactors.psat(PSM['Dew Point'])
avg_wvp = wvp.mean()
- k = PVD.StressFactors.k(avg_wvp=avg_wvp)
+ k = pvdeg.StressFactors.k(avg_wvp=avg_wvp)
assert k == pytest.approx(.00096, abs=.000005)
def test_edge_seal_width():
# test for edge_seal_width
- water_vapor_pressure = PVD.StressFactors.psat(PSM['Dew Point'])
+ water_vapor_pressure = pvdeg.StressFactors.psat(PSM['Dew Point'])
avg_wvp = water_vapor_pressure.mean()
- k = PVD.StressFactors.k(avg_wvp=avg_wvp)
- edge_seal_width = PVD.StressFactors.edge_seal_width(k=k)
+ k = pvdeg.StressFactors.k(avg_wvp=avg_wvp)
+ edge_seal_width = pvdeg.StressFactors.edge_seal_width(k=k)
assert edge_seal_width == pytest.approx(0.449, abs=0.002)
def test_psat():
# test saturation point
- psat = PVD.StressFactors.psat(35)
+ psat = pvdeg.StressFactors.psat(35)
assert psat == pytest.approx(5.849871724837016, abs=0.0001), "psat() not working"
def test_rh_surface_outside():
# test calculation for the RH just outside a module surface
# requires PSM3 weather file
- rh_surface = PVD.StressFactors.rh_surface_outside(50, 35, 55)
+ rh_surface = pvdeg.StressFactors.rh_surface_outside(50, 35, 55)
assert rh_surface == pytest.approx(18.247746468009066, abs=0.0000001)
def test_rh_front_encap():
# test calculation for RH of module fronside encapsulant
# requires PSM3 weather file
- rh_front_encap = PVD.StressFactors.rh_front_encap(rh_ambient=PSM['Relative Humidity'],
+ rh_front_encap = pvdeg.StressFactors.rh_front_encap(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
assert rh_front_encap.__len__() == PSM.__len__()
@@ -86,7 +86,7 @@ def test_rh_back_encap():
# test calculation for RH of module backside encapsulant
# requires PSM3 weather file
- rh_back_encap = PVD.StressFactors.rh_back_encap(rh_ambient=PSM['Relative Humidity'],
+ rh_back_encap = pvdeg.StressFactors.rh_back_encap(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
assert rh_back_encap.__len__() == PSM.__len__()
@@ -96,13 +96,13 @@ def test_rh_backsheet_from_encap():
# test the calculation for backsheet relative humidity
# requires PSM3 weather file
- rh_back_encap = PVD.StressFactors.rh_back_encap(rh_ambient=PSM['Relative Humidity'],
+ rh_back_encap = pvdeg.StressFactors.rh_back_encap(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
- rh_surface = PVD.StressFactors.rh_surface_outside(rh_ambient=PSM['Relative Humidity'],
+ rh_surface = pvdeg.StressFactors.rh_surface_outside(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
- rh_backsheet = PVD.StressFactors.rh_backsheet_from_encap(rh_back_encap=rh_back_encap,
+ rh_backsheet = pvdeg.StressFactors.rh_backsheet_from_encap(rh_back_encap=rh_back_encap,
rh_surface_outside=rh_surface)
assert rh_backsheet.__len__() == PSM.__len__()
assert rh_backsheet[17] == pytest.approx(81.2238, abs=0.001)
@@ -111,7 +111,7 @@ def test_rh_backsheet():
# test the calculation for backsheet relative humidity directly from weather variables
# requires PSM3 weather file
- rh_backsheet = PVD.StressFactors.rh_backsheet(rh_ambient=PSM['Relative Humidity'],
+ rh_backsheet = pvdeg.StressFactors.rh_backsheet(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
assert rh_backsheet.__len__() == PSM.__len__()
@@ -121,7 +121,7 @@ def test_rh_module():
# test the rh_module function
# requires PSM3 weather file
- rh_module = PVD.StressFactors.rh_module(rh_ambient=PSM['Relative Humidity'],
+ rh_module = pvdeg.StressFactors.rh_module(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
assert rh_module.__len__() == PSM.__len__()
@@ -136,7 +136,7 @@ def test_rh_module():
def test_vantHoff_deg():
# test the vantHoff degradation acceleration factor
- vantHoff_deg = PVD.Degradation.vantHoff_deg(I_chamber=1000, poa_global=PSM['poa_global'],
+ vantHoff_deg = pvdeg.Degradation.vantHoff_deg(I_chamber=1000, poa_global=PSM['poa_global'],
temp_cell=PSM['temp_cell'], temp_chamber=60)
print(vantHoff_deg)
assert vantHoff_deg == pytest.approx(8.38, abs=.02)
@@ -144,7 +144,7 @@ def test_vantHoff_deg():
def test_iwa_vantHoff():
# test the vantHoff equivalent weighted average irradiance
- irr_weighted_avg = PVD.Degradation.IwaVantHoff(poa_global=PSM['poa_global'],
+ irr_weighted_avg = pvdeg.Degradation.IwaVantHoff(poa_global=PSM['poa_global'],
temp_cell=PSM['temp_cell'])
assert irr_weighted_avg == pytest.approx(232.47, abs=0.5)
@@ -155,10 +155,10 @@ def test_arrhenius_deg():
temp_chamber = 60
I_chamber = 1e3
Ea = 40
- rh_surface = PVD.StressFactors.rh_surface_outside(rh_ambient=PSM['Relative Humidity'],
+ rh_surface = pvdeg.StressFactors.rh_surface_outside(rh_ambient=PSM['Relative Humidity'],
temp_ambient=PSM['Temperature'],
temp_module=PSM['temp_module'])
- arrhenius_deg = PVD.Degradation.arrhenius_deg(I_chamber=I_chamber, rh_chamber=rh_chamber,
+ arrhenius_deg = pvdeg.Degradation.arrhenius_deg(I_chamber=I_chamber, rh_chamber=rh_chamber,
rh_outdoor=rh_surface, poa_global=PSM['poa_global'],
temp_chamber=temp_chamber, temp_cell=PSM['temp_cell'],
Ea=Ea)
@@ -169,7 +169,7 @@ def test_iwa_arrhenius():
# requires PSM3 weather file
Ea = 40
- irr_weighted_avg = PVD.Degradation.IwaArrhenius(poa_global=PSM['poa_global'],
+ irr_weighted_avg = pvdeg.Degradation.IwaArrhenius(poa_global=PSM['poa_global'],
rh_outdoor=PSM['Relative Humidity'],
temp_cell=PSM['temp_cell'], Ea=Ea)
assert irr_weighted_avg == pytest.approx(194.66, abs=0.1)
@@ -181,7 +181,7 @@ def test_degradation():
data=pd.read_csv(INPUTWEATHERSPECTRA)
wavelengths = np.array(range(280,420,20))
- degradation = PVD.Degradation.degradation(spectra=data['Spectra'], rh_module=data['RH'],
+ degradation = pvdeg.Degradation.degradation(spectra=data['Spectra'], rh_module=data['RH'],
temp_module=data['Temperature'],
wavelengths=wavelengths)
assert degradation == pytest.approx(4.4969e-38, abs=0.02e-38)
@@ -190,7 +190,7 @@ def test_solder_fatigue():
# test solder fatique with default parameters
# requires PSM3 weather file
- damage = PVD.Degradation.solder_fatigue(time_range=PSM['time_range'],
+ damage = pvdeg.Degradation.solder_fatigue(time_range=PSM['time_range'],
temp_cell=PSM['temp_cell'])
assert damage == pytest.approx(14.25, abs=0.1)
@@ -209,7 +209,7 @@ def test_solder_fatigue():
# df_tmy['dni']=df_tmy['DNI']
# df_tmy['ghi']=df_tmy['GHI']
# df_tmy['dhi']=df_tmy['DHI']
-# x = PVD.Standards.ideal_installation_distance(df_tmy, metadata)
+# x = pvdeg.Standards.ideal_installation_distance(df_tmy, metadata)
# assert x == pytest.approx(5.11657, abs=0.0001)
# def test_calculate_T98Temperature():
@@ -223,5 +223,5 @@ def test_solder_fatigue():
# df_tmy['dni']=df_tmy['DNI']
# df_tmy['ghi']=df_tmy['GHI']
# df_tmy['dhi']=df_tmy['DHI']
-# T98 = PVD.Standards.calculate_T98Temperature(df_tmy, metadata)
+# T98 = pvdeg.Standards.calculate_T98Temperature(df_tmy, metadata)
# assert T98 == pytest.approx(59.32, abs=0.01)
diff --git a/tests/test_spectral.py b/tests/test_spectral.py
index 12f46821..90da0f30 100644
--- a/tests/test_spectral.py
+++ b/tests/test_spectral.py
@@ -2,42 +2,42 @@
import json
import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
#Load weather data
-weather_df = pd.read_pickle(os.path.join(PVD.TEST_DATA_DIR, 'weather_df_day.pkl'))
-with open(os.path.join(PVD.TEST_DATA_DIR, 'meta.json')) as file:
+weather_df = pd.read_pickle(os.path.join(pvdeg.TEST_DATA_DIR, 'weather_df_day.pkl'))
+with open(os.path.join(pvdeg.TEST_DATA_DIR, 'meta.json')) as file:
meta = json.load(file)
#Load expected results
expected_solar_position = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'solar_position_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'solar_position_day.pkl'))
expected_poa_irradiance = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'poa_irradiance_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'poa_irradiance_day.pkl'))
def test_solar_position():
'''
- test PVD.spectral.solar_position
+ test pvdeg.spectral.solar_position
Requires:
---------
weather dataframe and meta dictionary
'''
- result = PVD.spectral.solar_position(weather_df, meta)
+ result = pvdeg.spectral.solar_position(weather_df, meta)
pd.testing.assert_frame_equal(result,
expected_solar_position,
check_dtype=False)
def test_poa_irradiance():
'''
- test PVD.spectral.poa_irradiance
+ test pvdeg.spectral.poa_irradiance
Requires:
---------
weather dataframe, meta dictionary, and solar_position dataframe
'''
- result = PVD.spectral.poa_irradiance(weather_df,
+ result = pvdeg.spectral.poa_irradiance(weather_df,
meta,
expected_solar_position,
tilt=None,
diff --git a/tests/test_standards.py b/tests/test_standards.py
index b7fe95b3..ca3a9691 100644
--- a/tests/test_standards.py
+++ b/tests/test_standards.py
@@ -2,15 +2,15 @@
import json
import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
#Load weather data
-weather_df = pd.read_pickle(os.path.join(PVD.TEST_DATA_DIR, 'weather_df_year.pkl'))
-with open(os.path.join(PVD.TEST_DATA_DIR, 'meta.json')) as file:
+weather_df = pd.read_pickle(os.path.join(pvdeg.TEST_DATA_DIR, 'weather_df_year.pkl'))
+with open(os.path.join(pvdeg.TEST_DATA_DIR, 'meta.json')) as file:
meta = json.load(file)
def test_calc_standoff():
- result_l1 = PVD.standards.calc_standoff(
+ result_l1 = pvdeg.standards.calc_standoff(
weather_df,
meta,
tilt=None,
@@ -22,7 +22,7 @@ def test_calc_standoff():
x_0=6.1,
wind_speed_factor=1.71)
- result_l2 = PVD.standards.calc_standoff(
+ result_l2 = pvdeg.standards.calc_standoff(
weather_df,
meta,
tilt=None,
diff --git a/tests/test_temperature.py b/tests/test_temperature.py
index 07f1b457..cb7295e2 100644
--- a/tests/test_temperature.py
+++ b/tests/test_temperature.py
@@ -2,26 +2,26 @@
import json
import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
#Load weather data
-weather_df = pd.read_pickle(os.path.join(PVD.TEST_DATA_DIR, 'weather_df_day.pkl'))
-with open(os.path.join(PVD.TEST_DATA_DIR, 'meta.json')) as file:
+weather_df = pd.read_pickle(os.path.join(pvdeg.TEST_DATA_DIR, 'weather_df_day.pkl'))
+with open(os.path.join(pvdeg.TEST_DATA_DIR, 'meta.json')) as file:
meta = json.load(file)
#Load input dataframes
solar_position = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'solar_position_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'solar_position_day.pkl'))
poa_irradiance = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'poa_irradiance_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'poa_irradiance_day.pkl'))
#Load expected results
expected_module_temp = pd.read_pickle(os.path.join(
- PVD.TEST_DATA_DIR, 'module_temp_day.pkl'))
+ pvdeg.TEST_DATA_DIR, 'module_temp_day.pkl'))
def test_module():
- result = PVD.temperature.module(
+ result = pvdeg.temperature.module(
weather_df,
poa_irradiance,
temp_model='sapm',
diff --git a/tests/test_utilities.py b/tests/test_utilities.py
index 64c48620..8ef82dbe 100644
--- a/tests/test_utilities.py
+++ b/tests/test_utilities.py
@@ -2,7 +2,7 @@
# import numpy as np
# import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
from rex import Outputs
try:
@@ -29,13 +29,13 @@ def test_write_gids():
def test_convert_tmy():
'''
- Test PVD.utilites.convert_tmy
+ Test pvdeg.utilites.convert_tmy
Requires:
---------
tmy3 or tmy-like .csv weather file (WEATHERFILES['tmy3'])
'''
- PVD.utilities.convert_tmy(file_in=FILES['tmy3'], file_out=FILES['h5'])
+ pvdeg.utilities.convert_tmy(file_in=FILES['tmy3'], file_out=FILES['h5'])
with Outputs(FILES['h5'],'r') as f:
datasets = f.dsets
assert datasets == DSETS
diff --git a/tests/test_weather.py b/tests/test_weather.py
index b70ade17..277baf65 100644
--- a/tests/test_weather.py
+++ b/tests/test_weather.py
@@ -2,7 +2,7 @@
# import numpy as np
# import pytest
import pandas as pd
-import PVDegradationTools as PVD
+import pvdeg
from rex import Outputs
try:
@@ -35,7 +35,7 @@ def test_load():
# 'attributes' : ['air_temperature', 'wind_speed', 'dhi',
# 'ghi', 'dni','relative_humidity']}
- # weather_df, meta = PVD.weather.load(weather_db, weather_id, **weather_arg)
+ # weather_df, meta = pvdeg.weather.load(weather_db, weather_id, **weather_arg)
# assert isinstance(meta, dict)
# assert isinstance(weather_df, pd.DataFrame)
@@ -43,12 +43,12 @@ def test_load():
# #Test with gid on NREL HPC
# weather_id = 1933572
- # weather_df, meta = PVD.weather.load(weather_db, weather_id, **weather_arg)
+ # weather_df, meta = pvdeg.weather.load(weather_db, weather_id, **weather_arg)
pass
def test_read_file():
'''
- test PVD.utilities.read_weather
+ test pvdeg.utilities.read_weather
Requires:
---------
@@ -56,7 +56,7 @@ def test_read_file():
'''
for type, path in FILES.items():
if type != 'h5':
- weather_df, meta = PVD.weather.read_file(file_in=path,
+ weather_df, meta = pvdeg.weather.read_file(file_in=path,
file_type=type)
assert isinstance(meta, dict)
assert isinstance(weather_df, pd.DataFrame)