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

Make IqtTemplateFunctionModel and ConvTemplateFunctionModel similar and share code #37190

Open
Tracked by #37230
robertapplin opened this issue Apr 19, 2024 · 0 comments
Labels
Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.

Comments

@robertapplin
Copy link
Contributor

Description:
The IqtTemplateFunctionModel and ConvTemplateFunctionModel should be refactored to make them more generic and to allow them to share code within the MultiTemplateFunctionModel class. This should make it easier to add fit functions to the tabs which use this class in the future. There are a few things I don't like in the current code:

  • ConvTemplateFunctionModel uses a very specialised method to construct its MultiDomainFunction
  • Both tabs have prefixes hard-coded into the code. We should be able to retrieve them from the MultiDomainFunction stored in the model
  • ConvTemplateFunctionModel uses a slightly different mechanism to set Q values in Q-dependent functions

Acceptance Criteria

  • The IqtTemplateFunctionModel and ConvTemplateFunctionModel use much the same code
  • Prefixes are retrieved from the MultiDomainFunction in the model
  • Both use the same method for constructing their fit function
  • The TemplateSubTypes are no longer hard coded within these models
@robertapplin robertapplin added ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS Indirect/Inelastic Issues and pull requests related to indirect or inelastic Maintenance Unassigned issues to be addressed in the next maintenance period. labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
Status: No status
Development

No branches or pull requests

1 participant