Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single axis tracking #137

Closed
wants to merge 40 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
dda40c0
Bump aiohttp from 3.9.5 to 3.10.2
dependabot[bot] Sep 13, 2024
1b113c3
Sparse Interpolation QoL
tobin-ford Sep 15, 2024
adf61a6
DuraMAT pref maps
tobin-ford Sep 16, 2024
d8629cf
Merge pull request #121 from NREL/dependabot/pip/aiohttp-3.10.2
martin-springer Sep 16, 2024
a1f17ee
Update O2permeation.json
Sep 17, 2024
13de54d
Update diffusion.py
Sep 17, 2024
d9147f0
Update Tools-Edge Seal Oxygen Ingress.ipynb
Sep 17, 2024
3d9c451
Update diffusion.py
Sep 20, 2024
c3cdfe5
Update utilities.py
Sep 20, 2024
573fd93
Update Tools-Edge Seal Oxygen Ingress.ipynb
Sep 20, 2024
fedbb0e
C:\Users\mkempe\Documents\GitHub\PVDegradationTools\pvdeg
MDKempe Sep 20, 2024
f0c1d3a
fix 1d diffusion string indexing
tobin-ford Sep 20, 2024
cbe0680
Fix: test/data/test-scenario.json
tobin-ford Sep 20, 2024
b4e93b2
Fix: test_read_material_bad
tobin-ford Sep 20, 2024
21a4853
Fix: Run tests and cleanup
tobin-ford Sep 20, 2024
08d739a
Merge branch 'Kempe-Edge-Seals' of https://github.com/NREL/PVDegradat…
tobin-ford Sep 20, 2024
655414c
Top Level import for ScenarioGeospatialScenario
tobin-ford Sep 21, 2024
085525d
scenario.py methods return fig, ax
tobin-ford Sep 21, 2024
127016b
GeospatialScenario Display Fixes
tobin-ford Sep 27, 2024
bedfc8d
Fix: Downselection Normalization
tobin-ford Sep 30, 2024
edf6074
Merge pull request #124 from NREL/DuraMAT_mountain_pref
martin-springer Sep 30, 2024
0ef212c
Merge pull request #125 from NREL/Kempe-Edge-Seals
martin-springer Sep 30, 2024
1140561
material jsons access utilities
tobin-ford Oct 10, 2024
e692ae8
Testing
tobin-ford Oct 10, 2024
f0ba61e
Run Docs, versioning
tobin-ford Oct 10, 2024
797da31
Update H2Opermeation.json
MDKempe Oct 10, 2024
e81014b
Update Tools-Edge Seal Oxygen Ingress.ipynb
MDKempe Oct 10, 2024
2aa7332
Merge pull request #130 from NREL/materials_access
martin-springer Oct 25, 2024
691945c
Merge remote-tracking branch 'origin/development' into Kempe-Edge-Seals
MDKempe Nov 15, 2024
a914310
single_axis_initial
martin-springer Nov 18, 2024
4addfc9
Update standards.py
MDKempe Nov 18, 2024
a636b6a
Update weather.py
MDKempe Nov 18, 2024
7753910
Merge remote-tracking branch 'origin/single_axis_tracking' into Kempe…
MDKempe Nov 18, 2024
0e2aef7
add top-level poa function
martin-springer Nov 18, 2024
bce5cbd
Merge branch 'single_axis_tracking' into Kempe-Edge-Seals
MDKempe Nov 18, 2024
4dcbdfb
Merge branch 'single_axis_tracking' of https://github.com/NREL/PVDegr…
MDKempe Nov 19, 2024
a462328
allow single input dict for poa
martin-springer Nov 19, 2024
2731cd2
update tracker keyword in standards
martin-springer Nov 19, 2024
db27db8
update tests
martin-springer Nov 19, 2024
1197068
Update Tools - Module Standoff for IEC TS 63126.ipynb
MDKempe Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
scenario.py methods return fig, ax
  • Loading branch information
tobin-ford committed Sep 21, 2024
commit 085525d7d8f8bdb43cf895c89231be9bcb656a76
16 changes: 12 additions & 4 deletions pvdeg/scenario.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Class to define an analysis scenario."""

import matplotlib.axes
import matplotlib.figure
import pvdeg
from pvdeg import utilities

@@ -1787,13 +1789,15 @@ def plot(self):
"The 'plot' method is not accessible in GeospatialScenario, only in Scenario"
)

import matplotlib

def plot_coords(
self,
coord_1: Optional[tuple[float]] = None,
coord_2: Optional[tuple[float]] = None,
coords: Optional[np.ndarray[float]] = None,
size: Union[int, float] = 1,
):
) -> tuple[matplotlib.figure, matplotlib.axes]:
"""
Plot lat-long coordinate pairs on blank map. Quickly view
geospatial datapoints before your analysis.
@@ -1852,7 +1856,7 @@ def plot_meta_classification(
coord_2: Optional[tuple[float]] = None,
coords: Optional[np.ndarray[float]] = None,
size: Union[int, float] = 1,
):
) -> tuple[matplotlib.figure, matplotlib.axes]:
"""
Plot classified lat-long coordinate pairs on map. Quicly view
geospatial datapoints with binary classification in a meta_data
@@ -1937,7 +1941,7 @@ def plot_world(
self,
data_variable: str,
cmap: str = "viridis",
):
) -> tuple[matplotlib.figure, matplotlib.axes]:
da = (self.results)[data_variable]

fig, ax = plt.subplots(
@@ -1956,6 +1960,8 @@ def plot_world(
ax.add_feature(cfeature.LAKES, edgecolor="black")
plt.show()

return fig, ax

# test this
def plot_USA(
self,
@@ -1964,7 +1970,7 @@ def plot_USA(
cmap: str = "viridis",
vmin: Union[int, float] = 0,
vmax: Optional[Union[int, float]] = None,
):
) -> tuple[matplotlib.figure, matplotlib.axes]:
"""
Plot a vizualization of the geospatial scenario result.
Only works on geospatial scenarios.
@@ -1998,6 +2004,8 @@ def plot_USA(
fpath if fpath else [f"os.getcwd/{self.name}-{self.results[data_from_result]}"]
fig.savefig()

return fig, ax


def _check_set(self, iterable, to_check: set):
"""Check if iterable is a subset of to_check"""