Skip to content

Commit 7c357a0

Browse files
committed
fix: Remove IGS from searching for 05M SP3 files
1 parent f1f0959 commit 7c357a0

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

gnssanalysis/gn_download.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def get_earthdata_credentials(username: Optional[str] = None, password: Optional
124124

125125
# Priority 3: Try to read from .netrc file
126126
try:
127-
netrc_path = _Path.home() / '.netrc'
127+
netrc_path = _Path.home() / ".netrc"
128128
if netrc_path.exists():
129129
logging.debug(f"Found .netrc at {netrc_path}")
130130
netrc_auth = _netrc.netrc()
@@ -351,7 +351,7 @@ def generate_sampling_rate(file_ext: str, analysis_center: str, solution_type: s
351351
"BIA": "01D",
352352
"SP3": {
353353
("COD", "GFZ", "GRG", "IAC", "JAX", "MIT", "WUM"): "05M",
354-
("ESA", "IGS"): {"FIN": "05M", "RAP": "15M", None: "15M"},
354+
("ESA"): {"FIN": "05M", "RAP": "15M", None: "15M"},
355355
(): "15M",
356356
},
357357
"CLK": {
@@ -858,7 +858,7 @@ def download_file_from_cddis(
858858
response.raise_for_status()
859859

860860
# Download the file
861-
with open(download_filepath, 'wb') as f:
861+
with open(download_filepath, "wb") as f:
862862
for chunk in response.iter_content(chunk_size=MB):
863863
if chunk:
864864
f.write(chunk)
@@ -879,7 +879,7 @@ def download_file_from_cddis(
879879
if download_filepath.is_file():
880880
download_filepath.unlink()
881881
raise
882-
backoff = _random.uniform(0.0, 2.0 ** retries)
882+
backoff = _random.uniform(0.0, 2.0**retries)
883883
_warnings.warn(
884884
f"Error downloading {filename}: {e} " f"(retry {retries}/{max_retries}, backoff {backoff:.1f}s)"
885885
)
@@ -921,9 +921,7 @@ def download_multiple_files_from_cddis(
921921

922922
# Get credentials once for all downloads
923923
try:
924-
earthdata_username, earthdata_password = get_earthdata_credentials(
925-
username=username, password=password
926-
)
924+
earthdata_username, earthdata_password = get_earthdata_credentials(username=username, password=password)
927925
except ValueError as e:
928926
logging.error(f"Failed to obtain NASA Earthdata credentials: {e}")
929927
raise
@@ -935,7 +933,7 @@ def download_one(filename):
935933
url_folder=url_folder,
936934
output_folder=output_folder,
937935
username=earthdata_username,
938-
password=earthdata_password
936+
password=earthdata_password,
939937
)
940938

941939
with _concurrent.futures.ThreadPoolExecutor() as executor:

0 commit comments

Comments
 (0)