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

Added all of the infra for the extreme weather models + documentation #26

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pvpa/_version.py export-subst
panel_segmentation/_version.py export-subst
*.h5 filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text

*.pt filter=lfs diff=lfs merge=lfs -text
11,020 changes: 11,020 additions & 0 deletions Austin_hail_damage_example.ipynb

Large diffs are not rendered by default.

387 changes: 387 additions & 0 deletions Hurricane_damage_example.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Panel_Detection_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.11.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
2,009 changes: 2,009 additions & 0 deletions Sol-Searcher_example.ipynb

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions panel_segmentation/models/hail_model.pt
Git LFS file not shown
3 changes: 3 additions & 0 deletions panel_segmentation/models/post-hurricane_model.pt
Git LFS file not shown
3 changes: 3 additions & 0 deletions panel_segmentation/models/sol_searcher.pt
Git LFS file not shown
57 changes: 0 additions & 57 deletions panel_segmentation/panel_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,63 +59,6 @@ def __init__(self, model_file_path=panel_seg_model_path,
"rooftop-fixed",
"ground-single_axis_tracker"])

def generateSatelliteImage(self, latitude, longitude,
file_name_save, google_maps_api_key):
"""
Generates satellite image via Google Maps, using a set of lat-long
coordinates.

Parameters
-----------
latitude: float
Latitude coordinate of the site.
longitude: float
Longitude coordinate of the site.
file_name_save: string
File path that we want to save
the image to, where the image is saved as a PNG file.
google_maps_api_key: string
Google Maps API Key for
automatically pulling satellite images.

Returns
-----------
Figure
Figure of the satellite image
"""
# Check input variable for types
if type(latitude) != float:
raise TypeError("latitude variable must be of type float.")
if type(longitude) != float:
raise TypeError("longitude variable must be of type float.")
if type(file_name_save) != str:
raise TypeError("file_name_save variable must be of type string.")
if type(google_maps_api_key) != str:
raise TypeError("google_maps_api_key variable must be "
"of type string.")
# Build up the lat_long string from the latitude-longitude coordinates
lat_long = str(latitude) + ", " + str(longitude)
# get method of requests module
# return response object
r = requests.get(
"https://maps.googleapis.com/maps/api/staticmap?maptype"
"=satellite&center=" + lat_long +
"&zoom=18&size=35000x35000&key="+google_maps_api_key,
verify=False)
# Raise an exception if image is not successfully returned
if r.status_code != 200:
raise ValueError("Response status code " +
str(r.status_code) +
": Image not pulled successfully from API.")
# wb mode is stand for write binary mode
with open(file_name_save, 'wb') as f:
f.write(r.content)
# close method of file object
# save and close the file
f.close()
# Read in the image and return it via the console
return Image.open(file_name_save)

def classifyMountingConfiguration(self, image_file_path,
acc_cutoff=.65,
file_name_save=None,
Expand Down
Loading
Loading