Skip to content

Commit ccd7e09

Browse files
committed
Bug fixes
Some minor issues found while testing
1 parent f501190 commit ccd7e09

File tree

7 files changed

+30
-18
lines changed

7 files changed

+30
-18
lines changed

CITATION.cff

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ authors:
55
given-names: "Demián"
66
orcid: "https://orcid.org/0000-0002-5276-581X"
77
title: "Parallel.GAMIT"
8-
version: 1.0.0
8+
version: 1.2.2
99
date-released: 2017-12-18
1010
url: "https://github.com/demiangomez/Parallel.GAMIT"

com/ApplyCountryCode.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
77
This script assigns country codes to the stations table
88
"""
9-
from pgamit.classes import dbConnection
10-
from pgamit.classes import pyOptions
9+
from pgamit import dbConnection
10+
from pgamit import pyOptions
1111
import country_converter as coco
1212

1313
from geopy.geocoders import Nominatim

com/PlotMapView.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
Author: Demian D. Gomez
66
"""
77

8-
import pyETM
9-
import dbConnection
108
import argparse
11-
import Utils
129
import os
1310
import numpy as np
1411
from tqdm import tqdm
@@ -18,8 +15,11 @@
1815

1916
# app
2017
from pgamit.pyETM import CO_SEISMIC_JUMP_DECAY, CO_SEISMIC_DECAY, LABEL
18+
from pgamit import Utils
2119
from pgamit.Utils import stationID
2220
from scipy.interpolate import griddata
21+
from pgamit import pyETM
22+
from pgamit import dbConnection
2323

2424

2525
def generate_kmz(kmz, stations):

com/SyncOrbits.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ def replace_vars(archive, date):
170170
# ##### now the brdc files #########
171171
folder = "/pub/gps/data/daily/%s/%s/%sn" % (date.yyyy(), date.ddd(), date.yyyy()[2:])
172172
tqdm.write(' -- Changing folder to ' + folder)
173-
ftp.cwd(folder)
174-
ftp_list = set(ftp.nlst())
173+
try:
174+
ftp.cwd(folder)
175+
ftp_list = set(ftp.nlst())
176+
except Exception:
177+
ftp_list = ()
175178

176179
brdc_archive = replace_vars(Config.brdc_path, date)
177180

@@ -192,8 +195,11 @@ def replace_vars(archive, date):
192195
# ##### now the ionex files #########
193196
folder = "/pub/gps/products/ionex/%s/%s" % (date.yyyy(), date.ddd())
194197
tqdm.write(' -- Changing folder to ' + folder)
195-
ftp.cwd(folder)
196-
ftp_list = set(ftp.nlst())
198+
try:
199+
ftp.cwd(folder)
200+
ftp_list = set(ftp.nlst())
201+
except ftplib.error_perm:
202+
ftp_list = ()
197203

198204
ionex_archive = replace_vars(Config.ionex_path, date)
199205

pgamit/pyPPP.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,16 @@ def __init__(self, in_rinex, otl_coeff, options, sp3types, sp3altrn, antenna_hei
268268
try:
269269
self.get_orbits(self.sp3types)
270270

271-
except (PyProducts.pySp3Exception,
272-
PyProducts.pyClkException,
273-
PyProducts.pyEOPException) as e:
271+
except (pyProducts.pySp3Exception,
272+
pyProducts.pyClkException,
273+
pyProducts.pyEOPException) as e:
274274

275275
if sp3altrn:
276276
self.get_orbits(self.sp3altrn)
277277
else:
278-
raise type(e)(type(e)(e.message + ' -> This exception usually occurs due to the need of having '
279-
'the orbit for the day being processed and the orbit of the '
280-
'next day.'))
278+
raise type(e)(type(e)(str(e) + ' -> This exception usually occurs due to the need of having '
279+
'the orbit for the day being processed and the orbit of the '
280+
'next day.'))
281281

282282
self.write_otl()
283283
self.copyfiles()

pgamit/pyRinex.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ def get_header(self):
968968

969969
def auto_coord(self, brdc, chi_limit=3):
970970
# use NRCAN PPP in code-only mode to obtain a coordinate of the station
971-
import pyPPP, pyOptions
971+
from pgamit import pyPPP, pyOptions
972972

973973
rnx = ReadRinex(self.NetworkCode, self.StationCode, self.rinex_path, allow_multiday=True)
974974

setup.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@
5050
'com/TrajectoryFit.py',
5151
'com/UpdateEarthquakes.py',
5252
'com/WeeklyCombination.py',
53-
'com/Ztd2trp.py'])
53+
'com/Ztd2trp.py',
54+
# these are scripts that are outside dependencies but added for convenience
55+
'scripts/crz2rnx',
56+
'scripts/rnx2crz',
57+
'scripts/rename_crinex.sh',
58+
'scripts/rename_with_logs.sh',
59+
'scripts/rename_crinex2lower.sh'])

0 commit comments

Comments
 (0)