Skip to content
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
105 changes: 104 additions & 1 deletion configs/toar_locations.json → airpy/configs.py

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions airpy/generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from datetime import datetime
import os

from . import configs


class GenerateConfig():
def __init__(self, gee_data, region, date, analysis_type, add_time,
Expand All @@ -26,12 +28,7 @@ def get_gee_collection_data(self):
Query json for GEE collection of interest
:return: GEE collection dictionary
"""
collection_file = '../configs/gee_collections.json'
if not os.path.isfile(collection_file):
raise FileNotFoundError
else:
with open('{}'.format(collection_file), 'r') as file:
data_collection = json.load(file)
data_collection = configs.GEE_COLLECTIONS

if self.gee_data not in data_collection['gee_dataset'].keys():
raise(ValueError('Dataset not supported. Please select one of modis, fire, population, or nightlight'))
Expand Down Expand Up @@ -73,14 +70,12 @@ def get_boundary(self):
"""
# Check if region is TOAR2 locations only
if self.region == 'toar2':
with open('../configs/toar_locations.json', 'r') as file:
toar_vals = json.load(file)
toar_vals = configs.TOAR_LOCATIONS
return {'extent': '{}'.format(self.region), 'lats': toar_vals['toar2']['lats'],
'lons': toar_vals['toar2']['lons']}

# get globe vals
with open('../configs/globe_coords.json', 'r') as file:
globe_vals = json.load(file)
globe_vals = configs.GLOBE_COORDS

# Check aus, west, east, europe & na bounds
bbox_dict = {
Expand Down
Binary file removed configs/.DS_Store
Binary file not shown.
36 changes: 0 additions & 36 deletions configs/gee_collections.json

This file was deleted.

65 changes: 0 additions & 65 deletions configs/globe_coords.json

This file was deleted.