change getφ spelling to make it easier - #434
Open
chrisbrahms wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR renames the spectral-phase extraction helper from a Unicode-phi name (getφ) to an ASCII name (spectral_phase) to avoid confusion caused by multiple φ glyph variants showing up in user code and copy/paste workflows.
Changes:
- Renamed
Processing.getφ→Processing.spectral_phase(all overloads) and updated docstrings accordingly. - Fixed
Fields.DataField(fpath; ...)to forwardλ0to the underlying constructor. - Performed minor whitespace/docstring cleanup.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Processing.jl | Renames the spectral phase API to spectral_phase and updates docstrings/formatting. |
| src/Fields.jl | Fixes DataField(fpath; ...) keyword forwarding (λ0) and cleans up formatting/docstrings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+654
to
658
| function spectral_phase(output, args...) | ||
| ω, Eω = getEω(output, args...) | ||
| grid = makegrid(output) | ||
| t = grid.t | ||
| τ = length(t) * (t[2] - t[1])/2 # middle of time window |
|
|
||
| Get frequency-domain modal field from `output` with correct normalisation (i.e. | ||
| Get frequency-domain modal field from `output` with correct normalisation (i.e. | ||
| `abs2.(Eω)`` gives angular-frequency spectral energy density in J/(rad/s)). |
|
|
||
| Create an element of an input field tuple (for use in `Luna.setup`) based on coupling | ||
| field `E` into a `mode`. The index `i` species the mode index. The temporal fields are | ||
| field `E` into a `mode`. The index `i` species the mode index. The temporal fields are |
Contributor
|
This will break code (including some of mine). Is it really necessary? Can we not just add aliases? |
Collaborator
Author
|
I'd prefer a deprecation warning to an alias. Will that work for you? |
Contributor
|
Yes, OK, having discussed offline I am OK with this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename
getφtospectral_phaseto avoid spelling issues with two different glyphs for φ which sometimes turn up.