-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHExpandLSQ for complex values - combine separate coefficient arrays #270
Comments
...nevermind, figured it out myself! For future reference and everyone else wondering: Direct addition of the raw coefficient arrays does not work, because converting the coefficient arrays from real to complex is a nontrivial step.
Perhaps it would be useful to add a section about this in the documentation? |
I'm not quite sure where to document this. Do you have any ideas?
|
For info, I've made some improvements to the least squares inversion routines: #463. I didn't yet implement complex coefficients, but this should be easier to do now than before (the changes would go in the new function |
Hi,
I want to apply SHExpandLSQ to a complex valued array. I have understood that SHExpandLSQ only takes real input, so I'm doing separate fits on the real and imaginary parts.
However I assumed that I could just combine the returned coefficient arrays and get the same results when for
expand
, but this doesn't work:which gives
I expected that
deviation_to_separate
is zero (or at least very, very close to).What is the right way to combine these two sets of coefficients into a single set of coefficients for the complex function?
The text was updated successfully, but these errors were encountered: