Skip to content

Shansep en SU toegevoegd en analyses opgeschoond - #15

Merged
NathanGebraad merged 17 commits into
devfrom
shansep
Nov 28, 2025
Merged

Shansep en SU toegevoegd en analyses opgeschoond#15
NathanGebraad merged 17 commits into
devfrom
shansep

Conversation

@NathanGebraad

Copy link
Copy Markdown
Collaborator

Shansep analyse afgerond en andere analyses toegevoegd en opgeschoond

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Deze PR voegt SHANSEP en SUTABEL analysemodules toe aan de PV-tool, inclusief visualisaties en PDF/Excel export functionaliteit. De bestaande c-phi analyses zijn opgeschoond en verbeterd met betere parameter calculatie en foutafhandeling.

Key Changes:

  • Nieuwe SHANSEP analyse module met S, m, en POP bepaling
  • Nieuwe SUTABEL-m analyse module voor ongedraineerde schuifsterkte
  • Verbeterde parameter calculatie functies met betere null-handling
  • Opgeschoonde visualisatie modules met consistente naming

Reviewed changes

Copilot reviewed 23 out of 26 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pv_tool/sutabel_analysis/*.py Nieuwe SUTABEL analyse implementatie met visualisatie en export
pv_tool/shansep_analysis/*.py Nieuwe SHANSEP analyse met verbeterde variabele naming (chi_2 ipv kappa_2)
pv_tool/cphi_analysis/calc_parameters.py Refactoring naar aparte TXT/DSS functies met betere error handling
pv_tool/shansep_analysis/globals.py Toegevoegd 'regel nr' kolom aan column mappings
main_nathan.py Test functies toegevoegd voor nieuwe analyses

Comment on lines +78 to +79
x_extra_proefresultaten = self.sutabel_data_df['ln(s\'v)']
y_extra_proefresultaten = self.sutabel_data_df['ln(su)']

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De x en y waarden worden verkeerd opgehaald - ze gebruiken self.sutabel_data_df in plaats van sub_df. Dit betekent dat voor elke extra groep dezelfde data wordt geplot als de hoofdanalyseset, in plaats van de gefilterde extra data. Wijzig regel 78-79 naar sub_df['ln(s\'v)'] en sub_df['ln(su)'].

Suggested change
x_extra_proefresultaten = self.sutabel_data_df['ln(s\'v)']
y_extra_proefresultaten = self.sutabel_data_df['ln(su)']
x_extra_proefresultaten = sub_df['ln(s\'v)']
y_extra_proefresultaten = sub_df['ln(su)']

Copilot uses AI. Check for mistakes.
Comment on lines +244 to +245
x_extra_proefresultaten = self.sutabel_data_df['S\'v']
y_extra_proefresultaten = self.sutabel_data_df['Su']

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dezelfde bug als in Comment 1: de x en y waarden worden verkeerd opgehaald van self.sutabel_data_df in plaats van sub_df. Wijzig naar sub_df['S\'v'] en sub_df['Su'].

Suggested change
x_extra_proefresultaten = self.sutabel_data_df['S\'v']
y_extra_proefresultaten = self.sutabel_data_df['Su']
x_extra_proefresultaten = sub_df['S\'v']
y_extra_proefresultaten = sub_df['Su']

Copilot uses AI. Check for mistakes.
df = df[df['consolidatietype'] == 'OC'].copy()
boring_monsternummer = df.index

n=0

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] De variabele n heeft een onduidelijke naam. Hernoem naar group_index of extra_group_idx om duidelijk te maken dat dit een index is voor de extra groepen lijst.

Copilot uses AI. Check for mistakes.
df['S'].apply
(lambda x: np.log(x) if x is not None and x > 0 else ""))

n=0

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Dezelfde onduidelijke variabelenaam n. Hernoem naar group_index voor consistentie.

Copilot uses AI. Check for mistakes.

boring_monsternummer = df.index

n=0

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Dezelfde onduidelijke variabelenaam n. Hernoem naar group_index voor consistentie.

Copilot uses AI. Check for mistakes.

boring_monsternummer = df.index

n=0

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] De variabele n heeft een onduidelijke naam. Hernoem naar group_index voor consistentie met andere vergelijkbare loops.

Copilot uses AI. Check for mistakes.
df = df[df['consolidatietype'] == 'OC'].copy()
boring_monsternummer = df.index

n=0

Copilot AI Nov 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Dezelfde onduidelijke variabelenaam n. Hernoem naar group_index voor consistentie.

Copilot uses AI. Check for mistakes.
@NathanGebraad
NathanGebraad merged commit 9fecfb1 into dev Nov 28, 2025
1 check passed
@NathanGebraad
NathanGebraad deleted the shansep branch November 28, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants