{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/612","repository_url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl","labels_url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/612/comments","events_url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/612/events","html_url":"https://github.com/JuliaApproximation/ApproxFun.jl/issues/612","id":363174291,"node_id":"MDU6SXNzdWUzNjMxNzQyOTE=","number":612,"title":"Derivative(Fourier(0..2π),1)","user":{"login":"JonasIsensee","id":33990604,"node_id":"MDQ6VXNlcjMzOTkwNjA0","avatar_url":"https://avatars2.githubusercontent.com/u/33990604?v=4","gravatar_id":"","url":"https://api.github.com/users/JonasIsensee","html_url":"https://github.com/JonasIsensee","followers_url":"https://api.github.com/users/JonasIsensee/followers","following_url":"https://api.github.com/users/JonasIsensee/following{/other_user}","gists_url":"https://api.github.com/users/JonasIsensee/gists{/gist_id}","starred_url":"https://api.github.com/users/JonasIsensee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonasIsensee/subscriptions","organizations_url":"https://api.github.com/users/JonasIsensee/orgs","repos_url":"https://api.github.com/users/JonasIsensee/repos","events_url":"https://api.github.com/users/JonasIsensee/events{/privacy}","received_events_url":"https://api.github.com/users/JonasIsensee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-24T14:34:54Z","updated_at":"2018-09-24T17:30:59Z","closed_at":null,"author_association":"NONE","body":"Hey there,\r\n\r\nAFAICT `Derivative(Fourier(0..2π),1)` does not do what it is meant to do\r\n\r\n```\r\njulia > Derivative(Fourier(0..2π),1)\r\nDerivativeWrapper:Fourier(【0.0,6.283185307179586❫)→SinSpace(【0.0,6.283185307179586❫)⊕CosSpace(【0.0,6.283185307179586❫)\r\n 0.0  0.0  -1.0   ⋅     ⋅    ⋅     ⋅    ⋅     ⋅    ⋅   ⋅\r\n 0.0  0.0   0.0  0.0    ⋅    ⋅     ⋅    ⋅     ⋅    ⋅   ⋅\r\n 0.0  0.0   0.0  0.0  -2.0   ⋅     ⋅    ⋅     ⋅    ⋅   ⋅\r\n  ⋅   1.0   0.0  0.0   0.0  0.0    ⋅    ⋅     ⋅    ⋅   ⋅\r\n  ⋅    ⋅    0.0  0.0   0.0  0.0  -3.0   ⋅     ⋅    ⋅   ⋅\r\n  ⋅    ⋅     ⋅   2.0   0.0  0.0   0.0  0.0    ⋅    ⋅   ⋅\r\n  ⋅    ⋅     ⋅    ⋅    0.0  0.0   0.0  0.0  -4.0   ⋅   ⋅\r\n  ⋅    ⋅     ⋅    ⋅     ⋅   3.0   0.0  0.0   0.0  0.0  ⋅\r\n  ⋅    ⋅     ⋅    ⋅     ⋅    ⋅    0.0  0.0   0.0  0.0  ⋱\r\n  ⋅    ⋅     ⋅    ⋅     ⋅    ⋅     ⋅   4.0   0.0  0.0  ⋱\r\n  ⋅    ⋅     ⋅    ⋅     ⋅    ⋅     ⋅    ⋅     ⋱    ⋱   ⋱\r\n```\r\n\r\nI calculated the derivative by hand using the coefficient ordering from the docs:\r\n`f_1+ f_2*sin(ϑ) + f_3*cos(ϑ) + f_4*sin(2ϑ) + f_5*cos(2ϑ) + ...`\r\nwhich turns into\r\n`0 + f_2*cos(ϑ) - f_3*sin(ϑ) + 2f_4*cos(2ϑ) - 2f_5*sin(2ϑ) + ...`\r\nand the corresponding derivative matrix should be\r\n```\r\n0.0  0.0   .   .    .\r\n0.0  0.0 -1.0   .    .\r\n .   1.0  0.0  0.0   .\r\n .    .   0.0  0.0  -2.0\r\n .    .    .  2.0  0.0\r\n\r\n```             \r\n\r\nEdit: I checked out the calls and the error seems to come from `InterlaceOperator`"},"comment":{"url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/comments/424058460","html_url":"https://github.com/JuliaApproximation/ApproxFun.jl/issues/612#issuecomment-424058460","issue_url":"https://api.github.com/repos/JuliaApproximation/ApproxFun.jl/issues/612","id":424058460,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDA1ODQ2MA==","user":{"login":"dlfivefifty","id":1229737,"node_id":"MDQ6VXNlcjEyMjk3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1229737?v=4","gravatar_id":"","url":"https://api.github.com/users/dlfivefifty","html_url":"https://github.com/dlfivefifty","followers_url":"https://api.github.com/users/dlfivefifty/followers","following_url":"https://api.github.com/users/dlfivefifty/following{/other_user}","gists_url":"https://api.github.com/users/dlfivefifty/gists{/gist_id}","starred_url":"https://api.github.com/users/dlfivefifty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlfivefifty/subscriptions","organizations_url":"https://api.github.com/users/dlfivefifty/orgs","repos_url":"https://api.github.com/users/dlfivefifty/repos","events_url":"https://api.github.com/users/dlfivefifty/events{/privacy}","received_events_url":"https://api.github.com/users/dlfivefifty/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T17:30:59Z","updated_at":"2018-09-24T17:30:59Z","author_association":"CONTRIBUTOR","body":"The rangespace of the Derivative has swapped sines and cosines so the current implementation is in fact “correct”, though clearly not ideal.\r\n\r\nImplementing Fourier as a sum space is not really that good of an idea, so a good implementation would treat it as it’s own thing (with block sizes ` Vcat(1, Fill(2, Infinity())) ` ). \r\n"}}
{"actor":{"display_login":"dlfivefifty"}}