Skip to content

Scarp Update - #1325

Open
dwolfsch wants to merge 1 commit into
OpenNHM:masterfrom
dwolfsch:ScarpUpdate
Open

Scarp Update#1325
dwolfsch wants to merge 1 commit into
OpenNHM:masterfrom
dwolfsch:ScarpUpdate

Conversation

@dwolfsch

Copy link
Copy Markdown
Contributor

Azimuth corrected
Config file changed
Atrribute names changed
documentation added

PR Checklist

Please confirm before requesting review:

  • I ran pytest locally without fails
  • I added/updated tests where needed
  • I updated documentation where needed

Confirm before the final merge/rebase into master

  • Commits are sensibly squashed and rebased onto latest master
  • Standardtest run without difference (with recompiled cython code)

Azimuth corrected
Config file changed
Atrribute names changed
documentation added
@fso42
fso42 self-requested a review August 12, 2026 12:23
@fso42 fso42 added the enhancement New feature or request label Aug 12, 2026

@fso42 fso42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please check your example files AND propagate the change that you did in regards to the new attribute names also to the pytests:

  • they fail as they still got the old names
  • your example inputs POINTS now contains 2 files, which fails as only one is accepted
  • the default ellipsoid file still has the old attributes

-> so please tidy this up


except KeyError as e:
raise ValueError(f"Required attribute '{e.args[0]}' not found in shapefile. Make sure 'zseed', 'dipdir', and 'dipangle' fields exist.")
raise ValueError(f"Required attribute '{e.args[0]}' not found in shapefile. Make sure 'zseed', 'dipdir_azi', and 'dipangle' fields exist.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This (and the one below) will never be reached, right? As Shp2Array sets eg. dipDir_azi to None. So the attribute is there! I guess you want to test for None?

ellipsoidsRotAngle = list(map(float, SHPdata['rotAngle']))
except KeyError as e:
raise ValueError(f"Required attribute '{e.args[0]}' not found in shapefile. Ensure the fields 'maxdepth', 'semimajor', 'semiminor', 'rotangle', 'dipdir', 'dipangle', and 'offset' exist.")
raise ValueError(f"Required attribute '{e.args[0]}' not found in shapefile. Ensure the fields 'maxdepth', 'semimajor', 'semiminor', 'rotangle', 'dipdir_azi', 'dipangle', and 'offset' exist.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

ellipsoids : str
Comma-separated string defining ellipsoids with parameters:
(x_center, y_center, max_depth, semi_major, semi_minor, tilt, dir, offset)
(maxdepth, semimajor, semiminor, dipAngle, dipdir_azi, offset, rotangle)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about x_center and y_center?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants