-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,490 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ API reference | |
|
||
.. autoclass:: Sentinel1Reader | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import traceback | ||
#import safe_s1 | ||
from safe_s1.reader import Sentinel1Reader | ||
|
||
try: | ||
from importlib import metadata | ||
except ImportError: # for Python<3.8 | ||
except ImportError: # for Python<3.8 | ||
import importlib_metadata as metadata | ||
try: | ||
try: | ||
__version__ = metadata.version("xarray-safe-s1") | ||
except Exception: | ||
print('trace',traceback.format_exc()) | ||
print("trace", traceback.format_exc()) | ||
__version__ = "999" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# default data paths for tests | ||
product_paths: | ||
- 'S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE' | ||
- "S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import yaml | ||
import os | ||
import logging | ||
import safe_s1 | ||
import os | ||
from pathlib import Path | ||
|
||
import yaml | ||
|
||
import safe_s1 | ||
|
||
|
||
# determine the config file we will use (config.yml by default, and a local config if one is present) and retrieve | ||
# the products names | ||
def get_config(): | ||
local_config_pontential_path = os.path.join(os.path.dirname(safe_s1.__file__), 'localconfig.yml') | ||
logging.info('potential local config: %s',local_config_pontential_path) | ||
#local_config_pontential_path = Path(os.path.join('~', 'xarray-safe-s1', 'localconfig.yml')).expanduser() | ||
local_config_pontential_path = os.path.join( | ||
os.path.dirname(safe_s1.__file__), "localconfig.yml" | ||
) | ||
logging.info("potential local config: %s", local_config_pontential_path) | ||
# local_config_pontential_path = Path(os.path.join('~', 'xarray-safe-s1', 'localconfig.yml')).expanduser() | ||
if os.path.exists(local_config_pontential_path): | ||
logging.info('localconfig used') | ||
logging.info("localconfig used") | ||
config_path = local_config_pontential_path | ||
with open(config_path) as config_content: | ||
conf = yaml.load(config_content, Loader=yaml.SafeLoader) | ||
else: | ||
logging.info('default config') | ||
config_path = Path(os.path.join(os.path.dirname(safe_s1.__file__), 'config.yml')) | ||
logging.info("default config") | ||
config_path = Path( | ||
os.path.join(os.path.dirname(safe_s1.__file__), "config.yml") | ||
) | ||
with open(config_path) as config_content: | ||
conf = yaml.load(config_content, Loader=yaml.SafeLoader) | ||
return conf | ||
|
Oops, something went wrong.