Open marius311 opened 2 years ago
Eg:
using CMBLensing, LinearAlgebra f = FlatMap(rand(10,10)) ft = FieldTuple(;f, AL=1., r=0, Aϕ=[1,2]) ft2 = ft .+ ft # broadcasting works ft3 = Diagonal(ft2) * ft # diagonal operators ft3'ft3 # inner prod (;f, AL) = ft2 # unpacking components gradient(ft -> norm(Diagonal(ft)*ft), ft)[1] # gradients work
Eg: