Skip to content

Commit

Permalink
Merge branch 'master' into aggregated_filters_for_trials
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeceglie committed Nov 17, 2023
2 parents bd52d73 + 17970d3 commit 90f31e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
RdTools Change Log
==================
.. include:: changelog/v2.2.0-beta.1.rst
.. include:: changelog/v2.1.8.rst
.. include:: changelog/v2.1.7.rst
.. include:: changelog/v2.1.6.rst
.. include:: changelog/v2.1.5.rst
Expand Down
11 changes: 11 additions & 0 deletions docs/sphinx/source/changelog/v2.1.8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**************************
v2.1.8 (November 17, 2023)
**************************

Bug fixes
---------
* Fix a bug in parallel computing environments (:issue:`388` :pull:`399`)

Contributors
------------
* Martin Springer (:ghuser:`martin-springer`)
5 changes: 2 additions & 3 deletions rdtools/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def irradiance_rescale(irrad, irrad_sim, max_iterations=100,
'''

if method == 'iterative':
def _rmse(fact):
def _rmse(fact, filt):
"""
Calculates RMSE with a given rescale fact(or) according to global
filt(er)
Expand All @@ -392,10 +392,9 @@ def _rmse(fact):

def _single_rescale(irrad, irrad_sim, guess):
"Optimizes rescale factor once"
global filt
csi = irrad / (guess * irrad_sim) # clear sky index
filt = (csi >= 0.8) & (csi <= 1.2) & (irrad > 200)
min_result = minimize(_rmse, guess, method='Nelder-Mead')
min_result = minimize(_rmse, guess, (filt), method='Nelder-Mead')

factor = min_result['x'][0]
return factor
Expand Down

0 comments on commit 90f31e2

Please sign in to comment.