Skip to content

change getφ spelling to make it easier - #434

Open
chrisbrahms wants to merge 2 commits into
LupoLab:masterfrom
chrisbrahms:getphase
Open

change getφ spelling to make it easier#434
chrisbrahms wants to merge 2 commits into
LupoLab:masterfrom
chrisbrahms:getphase

Conversation

@chrisbrahms

Copy link
Copy Markdown
Collaborator

Rename getφ to spectral_phase to avoid spelling issues with two different glyphs for φ which sometimes turn up.

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

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 λ0 to 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 thread src/Processing.jl
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
Comment thread src/Processing.jl

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)).
Comment thread src/Fields.jl

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
@jtravs

jtravs commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This will break code (including some of mine). Is it really necessary? Can we not just add aliases?

@chrisbrahms

Copy link
Copy Markdown
Collaborator Author

I'd prefer a deprecation warning to an alias. Will that work for you?

@jtravs

jtravs commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Yes, OK, having discussed offline I am OK with this.

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.

3 participants