Skip to content
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

[HZN-71] SpRes-mavis_deriv function problems #71

Closed
laurencejackson opened this issue Aug 6, 2021 · 2 comments
Closed

[HZN-71] SpRes-mavis_deriv function problems #71

laurencejackson opened this issue Aug 6, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@laurencejackson
Copy link
Collaborator

laurencejackson commented Aug 6, 2021

Transferred by @laurencejackson on Aug 9, 2020, 18:23

:::Issue recreated from Jira issue HZN-71:::

Imported from https://bitbucket.org/gsttmri/hazen/issues/72/spres-mavis_deriv-function-problems 1. The calculated gradient (L22) is double the actual gradient. This can be shown with mavis_deriv(_,range(10)) which returns an array of 2.0s, rather than 1.0s. As the MTF is normalised this bug does not effect the final return value.2. The docstring does not accurately reflect the function’s behaviour.3. The function takes five input arguments but only uses one of them (a). Consider removing unused variables.4. Consider adding a reference to any published literature etc. which recommends this method of differentiation over e.g. standard Newton difference quotient https://en.wikipedia.org/wiki/Numerical_differentiation

@Lucrezia-Cester Lucrezia-Cester self-assigned this Nov 3, 2021
@Lucrezia-Cester
Copy link
Contributor

Lucrezia-Cester commented Nov 22, 2021

Hello @hshuaib90 , @laurencejackson,

As I mentioned to Haris, I cannot find the literature for the MAIVIS function.

What I found in the literature in order to calculate the LSF is this function http://sciencewise.info/resource/line_spread_function/Line_spread_function_by_Wikipedia
(basically {LSF} ={d}{dx} {ESF} (x)).

I then used the above function instead of MAIVIS. I attach the resulting images.

Let me know if this alternative resolution to the issue is ok or what you would rather see implemented.

results_with_derivative_function

results_with_MAIVIS

@tomaroberts
Copy link
Collaborator

Addressed by PR #191

@tomaroberts tomaroberts added this to the 0.5.2 milestone Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants