Skip to content

Commit

Permalink
Merge pull request gempy-project#136 from cgre-aachen/javoha_fault_fix
Browse files Browse the repository at this point in the history
Fix for fault declaration.
  • Loading branch information
Leguark authored Mar 17, 2019
2 parents 8bdf1aa + 222f06b commit 77e8b3a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions gempy/data_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,22 +992,21 @@ def set_faults(self, series_name=None):
try:
# Check if there is already a df
self.faults

try:
if any(self.faults.columns != self.series.columns):
if series_name:
self.faults['isFault'] = self.faults.index.isin(series_name)
else:
try:
if any(self.faults.columns != self.series.columns):
series_name = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
self.faults['isFault'] = self.faults.index.isin(series_name)
except ValueError:
series_name = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
self.faults['isFault'] = self.faults.index.isin(series_name)
except ValueError:
series_name = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
self.faults['isFault'] = self.faults.index.isin(series_name)

if series_name:
self.faults['isFault'] = self.faults.index.isin(series_name)

except AttributeError:

print("creating fautls")
if not series_name:
series_name = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
Expand Down

0 comments on commit 77e8b3a

Please sign in to comment.