Skip to content

Commit

Permalink
[Bug]
Browse files Browse the repository at this point in the history
- Hotfixed
  • Loading branch information
Leguark committed Mar 18, 2019
1 parent 13c2604 commit 8999a4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
20 changes: 8 additions & 12 deletions gempy/data_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,26 +992,22 @@ def set_faults(self, series_name=None):
try:
# Check if there is already a df
self.faults
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()
try:
if any(self.faults.columns != self.series.columns):
series_name_d = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
self.faults['isFault'] = self.faults.index.isin(series_name)
self.faults['isFault'] = self.faults.index.isin(series_name_d)
except ValueError:
series_name_d = self.count_faults()
self.faults = pn.DataFrame(index=self.series.columns, columns=['isFault'])
self.faults['isFault'] = self.faults.index.isin(series_name_d)

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

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

Expand Down
18 changes: 9 additions & 9 deletions notebooks/tutorials/ch1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,7 @@
{
"data": {
"text/plain": [
"<gempy.plotting.sequential_pile.StratigraphicPile at 0x7f09e7c76080>"
"<gempy.plotting.sequential_pile.StratigraphicPile at 0x7f6a479c6748>"
]
},
"execution_count": 7,
Expand Down Expand Up @@ -2456,7 +2456,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -2486,23 +2486,23 @@
" <tbody>\n",
" <tr>\n",
" <th>Fault_Series</th>\n",
" <td>False</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Strat_Series</th>\n",
" <td>True</td>\n",
" <td>False</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" isFault\n",
"Fault_Series False\n",
"Strat_Series True"
"Fault_Series True\n",
"Strat_Series False"
]
},
"execution_count": 17,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -2513,7 +2513,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -2522,7 +2522,7 @@
"1"
]
},
"execution_count": 18,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down

0 comments on commit 8999a4d

Please sign in to comment.