Skip to content

Commit

Permalink
Updates to standoff calculation and documentation (#64)
Browse files Browse the repository at this point in the history
* add pypi workflow

* Update publish-to-pypi.yml

* update development (#59)

* Reworking of the standoff calculations

* standard updates

* Update weather.py

Just added in a print statement to indicate the humidity was finished calculating.

* updates to the standoff calculation

Just a bunch of updates to make it into the tool I want.

* Update xeff_demo.csv

I updated it to have a theoretical measured set of module data.

* Update standards.py

Just small formating issues here.

* Create xeff_demo.xlsx

* Adding calculations to the file

Major revision underway. I have most of the program working but the last few sections are still needing a bit of work.

* Update 4 - Standards.py

Lots of reworking on the code to get it to have more methods for calculations. there is still a lot to be done.

* Update weather.py

Put in defaults in get_NSRDB

* Update standards.py

just working on it

* Update weather.py

Put in code to start a get_satellite function

* Update weather.py

typos fixed

* Update weather.py

fixed now.

* Update weather.py

Hopefully now it is patched correctly.

* Update weather.py

now it could work.

* Update weather.py

* Update weather.py

fixed import nsrdbx as f

* Update weather.py

updated

* Update 4 - Standards.ipynb

update

* standards

* Update xeff_demo.csv

Updated the demo module data to be calculated from the cell temperature instead of the module surface temperature.

* Update xeff_demo.xlsx

* Update xeff_demo.csv

Updated the manufactured module data.

* Update xeff_demo.xlsx

Incldues the modeled POA data from Python and an updated module temperature calculation.

* Update utilities.py

I changed it to instead of just having 180 degrees south be the default azimuth, it will point north or 0 degrees by default in the southern hemisphere.

* Massive changes and a stopping point

It's a complete overhaul. I'm going to merge it now, but I would like it put in the main as is and to have it's name changed to "Standoff.ipynb"

* Update spectral.py

Making the default azimuth be equatorial facing instead of always south. No northern-centric bias here. ;)

* Update temperature.py

I fixed the cell temperature calculation to default to a wind speed factor of 1.7 instead of 1 and to allow that to be passed in. My guess is that this change will cause problems elsewhere.

* Update standards.py

Massive changes here but for the most part it is all about the standoff calculation which is working. One change to be aware of is that the prior calculations were using the module surface temperature for the standoff calculation but now it is using the cell temperature calculation.

* improvement on temperature windspeedfactor fix

* dding pytest coverage instructions

* Wind height added

Added in a field for wind height data to the demonstration weather data.

* Update weather.py

Added in some if/then statements to put in a field for the wind speed measurement height. For the NSRDB it is set for 2m, for PVGIS it is set for 10m.

* Update weather.py

Made it so it would delete the message indicating that Rh was being calculated once it is completed.

* Update standards.py

Created a print statement method to output the results of the standoff calculation.

* Update temperature.py

Changed it to do a wind speed factor calculation based on the wind height in the meta data and the supplied power factor using appropriate defaults.

* Update temperature.py

Got it to correctly use the wind speed exponent.

* Update standards.py

Got it to correctly use the wind speed exponent.

* Update 4 - Standards.ipynb

Got it to correctly use the wind speed exponent.

* Update temperature.py

Fixing wind speed stuff

* Update 4 - Standards.ipynb

Fixing wind speed stuff

* Update fatigue.py

Modified the fatigue calculator to work with the new wind speed exponent method.

* Update test_fatigue.py

Fixed this procedure to call the module temperature function correctly.

* Update humidity.py

It now uses the desired power factor for wind speed height adjustment.

* Update h5_pytest.h5

It now uses the desired power factor for wind speed height adjustment.

* Update meta.json

It now has a field for the wind speed height.

* Update test_humidity.py

It now uses the desired power factor for wind speed height adjustment.

* Update test_standards.py

It now uses the desired power factor for wind speed height adjustment.

* Update test_temperature.py

It now uses the desired power factor for wind speed height adjustment.

* Update standards.py

It now uses the desired power factor for wind speed height adjustment.

I found an error in the standoff calculation. It was previously using the module surface temperature and it should be using the module cell temperature. It makes the required standoff calculations a bit higher.

* Update standards.py

Fixed some documentation for wind speed dependence and made it so the T98 calculation will default to equatorial facing, open rack and latitude tilt.

* Update weather.py

fixed the improper importing NSRDBX as f and did some documentation work.

* Update standards.py

Fixed the functions with capitals issue.

* Update 4 - Standards.ipynb

Fixed the functions with capitals issue.

* deploy to pypi on tag release (#55)

* add pypi workflow

* Update standards.py

I fixed an error check for the case of now wind height specification in the meta data of a dataset by removing it. that error check is managed in temperature.py.

* Update 4 - Standards.ipynb

Just some documentation changes.

* Update temperature.py

just some documentation changes

* run pre-commit hooks

* revert changes in h5_pytest.h5

* update docs conf from main

* Revert "Kempe standoff" (#57)

* run updated pre-commit hooks

* add pre-commit to dependencies

---------

Co-authored-by: MDKempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>
Co-authored-by: Kempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>

* added codecov to actions

* write coverage report

* update pytest.yml

* add pytest-cov

* add build status to readme

* Kempe standoff pull request (#58)

* Reworking of the standoff calculations

* standard updates

* Update weather.py

* Update xeff_demo.csv

* Create xeff_demo.xlsx

* Put in defaults in get_NSRDB

* typos fixed

* Changed standoff calculation to instead of just having 180 degrees south be the default azimuth, it will point north or 0 degrees by default in the southern hemisphere.

* Update spectral.py

* Massive changes here but for the most part it is all about the standoff calculation which is working. One change to be aware of is that the prior calculations were using the module surface temperature for the standoff calculation but now it is using the cell temperature calculation.

* improvement on temperature windspeedfactor fix

* adding pytest coverage instructions

* Wind height added

* Added in a field for wind height data to the demonstration weather data.

* Added in some if/then statements to put in a field for the wind speed measurement height. For the NSRDB it is set for 2m, for PVGIS it is set for 10m.

* Made it so it would delete the message indicating that Rh was being calculated once it is completed.

* Changed it to do a wind speed factor calculation based on the wind height in the meta data and the supplied power factor using appropriate defaults.

* Modified the fatigue calculator to work with the new wind speed exponent method.

* Update meta.json

* Update test_humidity.py

* Update test_standards.py

* Update test_temperature.py

* Update standards.py

* I found an error in the standoff calculation. It was previously using the module surface temperature and it should be using the module cell temperature. It makes the required standoff calculations a bit higher.

* Update standards.py

* Fixed some documentation for wind speed dependence and made it so the T98 calculation will default to equatorial facing, open rack and latitude tilt.

* Some documentation changes.

* Update temperature.py

* run pre-commit hooks

* adapt wind_height variable name to NSRDB

* keep wind_height in meta

* refactor eff_gap_parameters()

* fix typo in temperature models

* workflow update Node.js 16 to 20

---------

Co-authored-by: MDKempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>
Co-authored-by: Kempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>
Co-authored-by: Kevin Anderson <[email protected]>

* Readthedocs pr (#61)

* New Sphinx Environment

* User Guide - Package Overview

* Modules API

* API reference

* Monte Carlo User Guide

* include external link aliases

---------

Co-authored-by: tobin-ford <[email protected]>
Co-authored-by: martin-springer <[email protected]>

* update what's new changelog

* updates to change log

* Update issue templates (#63)

---------

Co-authored-by: MDKempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>
Co-authored-by: Kempe <[email protected]>
Co-authored-by: Silvana Ovaitt <[email protected]>
Co-authored-by: Kevin Anderson <[email protected]>
Co-authored-by: tobin-ford <[email protected]>
Co-authored-by: tobin-ford <[email protected]>
  • Loading branch information
8 people authored Feb 9, 2024
1 parent 51c087e commit 8154831
Show file tree
Hide file tree
Showing 158 changed files with 29,855 additions and 9,670 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Please provide a minimal example to reproduce the issue

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- pvdeg version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 8 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- dev
- development
pull_request:


Expand All @@ -20,9 +20,9 @@ jobs:
]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ${{ matrix.env }}
Expand All @@ -31,4 +31,8 @@ jobs:
python -m pip install --progress-bar off ${{ matrix.env }}
- name: Test with pytest ${{ matrix.env }}
run: |
python -m pytest
python -m pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/sphinx/source/conf.py
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
</a>
</td>
</tr>
<tr>
<td>Build status</td>
<td>
<a href="https://github.com/NREL/PVDegradationTools/actions/workflows/pytest.yml?query=branch%3Amain">
<img src="https://github.com/NREL/PVDegradationTools/actions/workflows/pytest.yml/badge.svg?branch=main" alt="GitHub Actions Testing Status" />
</a>
<a href="https://codecov.io/gh/NREL/PVDegradationTools" >
<img src="https://codecov.io/gh/NREL/PVDegradationTools/graph/badge.svg?token=4I24S8BTG7"/>
</a>
</td>
</tr>
</table>


Expand Down
11 changes: 11 additions & 0 deletions contributors/martin-springer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
2024-02-09

I hereby agree to the terms of the Contributors License Agreement,
version 1.0, with MD5 checksum 46ea45f996295bdb0652333d516a6d0a.

I furthermore declare that I am authorized and able to make this
agreement and sign this declaration.

Signed,

Martin Springer https://github.com/martin-springer
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/sphinx/make.bat → docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ if "%SPHINXBUILD%" == "" (
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
Expand All @@ -21,10 +19,12 @@ if errorlevel 9009 (
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.collection.calculate\_jsc\_from\_tau\_cp
==============================================

.. currentmodule:: pvdeg.collection

.. autofunction:: calculate_jsc_from_tau_cp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.collection.calculate\_jsc\_from\_tau\_iqe
===============================================

.. currentmodule:: pvdeg.collection

.. autofunction:: calculate_jsc_from_tau_iqe
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.collection.collection\_probability
========================================

.. currentmodule:: pvdeg.collection

.. autofunction:: collection_probability
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.collection.generation\_current
====================================

.. currentmodule:: pvdeg.collection

.. autofunction:: generation_current
77 changes: 77 additions & 0 deletions docs/source/_autosummary/pvdeg.collection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.. Please when editing this file make sure to keep it matching the
docs in ../configuration.rst:reference_to_examples
pvdeg.collection
================

.. automodule:: pvdeg.collection

.. this is crazy
Function Overview
-----------------

.. autosummary::
:toctree:
:nosignatures:


pvdeg.collection.calculate_jsc_from_tau_cp
pvdeg.collection.calculate_jsc_from_tau_iqe
pvdeg.collection.collection_probability
pvdeg.collection.generation_current




.. this is crazy
..
Functions
---------


.. autofunction:: calculate_jsc_from_tau_cp

.. _sphx_glr_backref_pvdeg.collection.calculate_jsc_from_tau_cp:

.. minigallery:: pvdeg.collection.calculate_jsc_from_tau_cp
:add-heading:

.. autofunction:: calculate_jsc_from_tau_iqe

.. _sphx_glr_backref_pvdeg.collection.calculate_jsc_from_tau_iqe:

.. minigallery:: pvdeg.collection.calculate_jsc_from_tau_iqe
:add-heading:

.. autofunction:: collection_probability

.. _sphx_glr_backref_pvdeg.collection.collection_probability:

.. minigallery:: pvdeg.collection.collection_probability
:add-heading:

.. autofunction:: generation_current

.. _sphx_glr_backref_pvdeg.collection.generation_current:

.. minigallery:: pvdeg.collection.generation_current
:add-heading:










6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.IwaArrhenius.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.degradation.IwaArrhenius
==============================

.. currentmodule:: pvdeg.degradation

.. autofunction:: IwaArrhenius
6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.IwaVantHoff.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.degradation.IwaVantHoff
=============================

.. currentmodule:: pvdeg.degradation

.. autofunction:: IwaVantHoff
6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.arrhenius_deg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.degradation.arrhenius\_deg
================================

.. currentmodule:: pvdeg.degradation

.. autofunction:: arrhenius_deg
6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.degradation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.degradation.degradation
=============================

.. currentmodule:: pvdeg.degradation

.. autofunction:: degradation
85 changes: 85 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. Please when editing this file make sure to keep it matching the
docs in ../configuration.rst:reference_to_examples
pvdeg.degradation
=================

.. automodule:: pvdeg.degradation

.. this is crazy
Function Overview
-----------------

.. autosummary::
:toctree:
:nosignatures:


pvdeg.degradation.IwaArrhenius
pvdeg.degradation.IwaVantHoff
pvdeg.degradation.arrhenius_deg
pvdeg.degradation.degradation
pvdeg.degradation.vantHoff_deg




.. this is crazy
..
Functions
---------


.. autofunction:: IwaArrhenius

.. _sphx_glr_backref_pvdeg.degradation.IwaArrhenius:

.. minigallery:: pvdeg.degradation.IwaArrhenius
:add-heading:

.. autofunction:: IwaVantHoff

.. _sphx_glr_backref_pvdeg.degradation.IwaVantHoff:

.. minigallery:: pvdeg.degradation.IwaVantHoff
:add-heading:

.. autofunction:: arrhenius_deg

.. _sphx_glr_backref_pvdeg.degradation.arrhenius_deg:

.. minigallery:: pvdeg.degradation.arrhenius_deg
:add-heading:

.. autofunction:: degradation

.. _sphx_glr_backref_pvdeg.degradation.degradation:

.. minigallery:: pvdeg.degradation.degradation
:add-heading:

.. autofunction:: vantHoff_deg

.. _sphx_glr_backref_pvdeg.degradation.vantHoff_deg:

.. minigallery:: pvdeg.degradation.vantHoff_deg
:add-heading:










6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.degradation.vantHoff_deg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.degradation.vantHoff\_deg
===============================

.. currentmodule:: pvdeg.degradation

.. autofunction:: vantHoff_deg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.design.edge\_seal\_ingress\_rate
======================================

.. currentmodule:: pvdeg.design

.. autofunction:: edge_seal_ingress_rate
6 changes: 6 additions & 0 deletions docs/source/_autosummary/pvdeg.design.edge_seal_width.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pvdeg.design.edge\_seal\_width
==============================

.. currentmodule:: pvdeg.design

.. autofunction:: edge_seal_width
Loading

0 comments on commit 8154831

Please sign in to comment.