Skip to content

Keep dotted names when building DT1/HD output paths - #948

Merged
agianno merged 1 commit into
gprMax:masterfrom
SajalDevX:fix/dt1-dotted-output-names
Nov 5, 2026
Merged

agianno merged 1 commit into
gprMax:masterfrom
SajalDevX:fix/dt1-dotted-output-names

Conversation

@SajalDevX

Copy link
Copy Markdown
Contributor

Title: Keep dotted names when building DT1/HD output paths

Fixes #947

_output_pair in outputfiles_dt1 used Path.with_suffix(".DT1") / with_suffix(".HD"), so any dot in the destination name was taken as an extension and dropped. A series called antenna_1.5GHz was exported to antenna_1.DT1 for every component (so a second component collided with the first), and -o survey.v2 became survey.DT1.

Change:

  • Only a trailing .dt1 or .hd (any case) is stripped, as before; the .DT1 and .HD extensions are now appended to the remaining name instead of replacing its last suffix.

Testing:

  • Added test_main_keeps_dotted_base_names_and_component (runs the CLI main on an antenna_1.5GHz series) and test_export_dt1_only_replaces_dt1_or_hd_suffix (survey.v2, survey.v2.dt1, survey.v2.HD) in tests/toolboxes/test_outputfiles_dt1.py. All four new cases fail on master and pass with this change.
  • pytest tests/toolboxes/test_outputfiles_dt1.py: 8 passed.
  • black and isort (line length 100) on the changed lines.

_output_pair used Path.with_suffix, so any dot in the destination name was treated as an extension and cut off. A series named antenna_1.5GHz exported as antenna_1.DT1 for every component, and -o survey.v2 became survey.DT1. Only a .dt1 or .hd suffix is now stripped before the extensions are appended.
@agianno
agianno merged commit c3e0ea8 into gprMax:master Nov 5, 2026
14 checks passed
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.

outputfiles_dt1 cuts dotted names when building the DT1/HD output paths

2 participants