In calculating the scattering matrix here https://github.com/jackhamel16/Acoustics/blob/develop/src/scattering_matrix.jl#L23, Js is computed. It is recomputed a second time in the calculation of the scattering matrix derivative. I want to return Js from the calculateScatteringMatrix function (as well as ACA versions) and provide it as an input argument to the derivative calculation.