Skip to content

Commit

Permalink
We add the parse option for the vsVZA output.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnemina committed Jan 18, 2019
1 parent 600edc9 commit b8f93a3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pyOSOAA/osoaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,17 +788,22 @@ def __init__(self, resroot, filename="LUM_vsVZA.txt"):
with open(resroot+"/Standard_outputs/"+filename,
encoding="iso-8859-15") as file:
self.fulltext = file.readlines()
# Read variables not tabulated
self.vzaless = ExtractValue(self.fulltext,
"for VZA < 0 (sign convention):")
self.vzamore = ExtractValue(self.fulltext,
"for VZA > 0 (sign convention):")
self.depth = ExtractValue(self.fulltext,
"Value of the depth selected for the output (m) :")
text = ""
for line in self.fulltext:
text = text + line
self.tmp = self.fulltext
self.fulltext = text
"Value of the depth selected for the "
+ "output (m) :")

# Get header length to skip it
skipheader = [idx for idx, text in enumerate(self.fulltext)
if "VZA SCA_ANG" in text][0]
self.vza, self.scaang, self.I, self.refl, self.polrate, self.lpol,\
self.reflpol = np.genfromtxt(resroot+"/Standard_outputs/"+filename,
skip_header=skipheader+1, unpack=True,
encoding="iso-8859-15")

def __init__(self, resroot):
self.vsvza = self.VSVZA(resroot=resroot)
Expand Down

0 comments on commit b8f93a3

Please sign in to comment.