Skip to content

Allow choosing the m-modes in disk transforms #275

Open

Description

@dlfivefifty

I don't see any reason why cxf2disk would need exactly 4N-3 Fourier modes....

This is slightly annoying as matrix equivariant functions need only 3 Fourier modes (m = -1,0,1) but at the moment we need to do a big transform

@MikaelSlevinsky

Activity

  1. MikaelSlevinsky commented on Nov 14, 2026

    @MikaelSlevinsky
    Member

    Is that actually the case? Have you tried M < 4N-3? Seems like the code passes the size of input array along the second dimension.

  2. dlfivefifty commented on Nov 15, 2026

    @dlfivefifty
    MemberAuthor

    Actually it seems like disk2cxf is broken as it's using entries that should be ignored??

    julia> F = cxf2disk(randn(2,5))
    2×5 Matrix{Float64}:
     -0.0899421  -0.450256   0.206489    2.22159  -0.863906
      0.0628804   0.559427  -0.0178274  -0.75952  -0.00199228
    
    julia> F[2,2:end] .= NaN; F # set unused entries to NaN
    2×5 Matrix{Float64}:
     -0.0899421   -0.450256    0.206489    2.22159   -0.863906
      0.0628804  NaN         NaN         NaN        NaN
    
    julia> disk2cxf(F)
    2×5 Matrix{Float64}:
     -0.127197  NaN  NaN  NaN  NaN
      0.154025  NaN  NaN  NaN  NaN
  3. dlfivefifty commented on Nov 15, 2026

    @dlfivefifty
    MemberAuthor

    Even just changing the last two columns has this issue:

    julia> F = cxf2disk(randn(2,5))
    2×5 Matrix{Float64}:
     -0.77308   0.259274  -0.0667026   0.119317   0.63303
     -0.898388  0.118369  -0.645131   -0.0338065  0.0331496
    
    julia> F[2,4:end] .= NaN; F # set unused entries to NaN
    2×5 Matrix{Float64}:
     -0.77308   0.259274  -0.0667026    0.119317    0.63303
     -0.898388  0.118369  -0.645131   NaN         NaN
    
    julia> disk2cxf(F)
    2×5 Matrix{Float64}:
     -1.0933   0.602247  -0.589582  NaN  NaN
     -2.20059  0.251098  -1.36853   NaN  NaN
  4. dlfivefifty commented on Nov 15, 2026

    @dlfivefifty
    MemberAuthor

    Ah Claude told me FastTransforms needs them to literally be zero

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions