Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Oct 9, 2024
1 parent 91d0830 commit 372aaab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/ert/gui/simulation/ensemble_experiment_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def __init__(

design_matrix = analysis_config.design_matrix
if design_matrix is not None:
dm_param_button = QPushButton("Show DM parameters")
dm_param_button = QPushButton("Show parameters")
dm_param_button.clicked.connect(
lambda: self.on_dm_params_clicked(design_matrix)
)
layout.addRow("Show DM parameters", dm_param_button)
layout.addRow("Design Matrix", dm_param_button)

self.setLayout(layout)

Expand All @@ -109,7 +109,6 @@ def on_dm_params_clicked(self, design_matrix: DesignMatrix) -> None:
if design_matrix is not None:
design_matrix.read_design_matrix()
df_sample = design_matrix.design_matrix_df
# df_sample = pd.DataFrame({"Column1": [1, 2, 3], "Column2": ["A", "B", "C"]})
if df_sample is not None and not df_sample.empty:
viewer = DesignMatrixPanel(df_sample)
viewer.exec_()
Expand Down
3 changes: 0 additions & 3 deletions src/ert/gui/tools/design_matrix/design_matrix_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ def __init__(self, design_matrix_df: pd.DataFrame, parent=None):
self.table_view.resizeColumnsToContents()
self.table_view.resizeRowsToContents()

# Layout to hold the table view
layout = QVBoxLayout()
layout.addWidget(self.table_view)
self.setLayout(layout)

@staticmethod
def create_model(design_matrix_df: pd.DataFrame) -> QStandardItemModel:
# Create a model
model = QStandardItemModel()

if isinstance(design_matrix_df.columns, pd.MultiIndex):
Expand All @@ -37,7 +35,6 @@ def create_model(design_matrix_df: pd.DataFrame) -> QStandardItemModel:

model.setHorizontalHeaderLabels(header_labels)

# Populate the model with data
for index, _ in design_matrix_df.iterrows():
items = [
QStandardItem(str(design_matrix_df.at[index, col]))
Expand Down

0 comments on commit 372aaab

Please sign in to comment.