Repository navigation
Allow setting fit title to model result - #317
danielmaclaren wants to merge 39 commits into
Conversation
…_title_to_fit_result variable in within ISISCallbacks
I will edit, but please be mindful of this: |
| y=reducer.intensity.name, | ||
| yerr=reducer.intensity_stddev.name, | ||
| fit=Linear.fit(), | ||
| fit=Gaussian.fit(), |
There was a problem hiding this comment.
I believe I was trying out different models
| from ibex_bluesky_core.utils import get_pv_prefix | ||
|
|
||
| NUM_POINTS: int = 3 | ||
| NUM_POINTS: int = 10 |
There was a problem hiding this comment.
Same again, I was changing the values for testing reasons, I can switch them back if you like?
| show_plot() | ||
|
|
||
|
|
||
| class LiveFitPlot(_DefaultLiveFitPlot): |
There was a problem hiding this comment.
Needs adding to __all__ here and in callbacks module please...
Please write API documentation and check it renders properly in sphinx.
| super().stop(doc) | ||
| if self.set_title: | ||
| param_name = self.livefit.model.param_names | ||
| result_values = self.livefit.result.values |
There was a problem hiding this comment.
What happens if the fit failed and livefit.result is None?
| if self.set_title: | ||
| param_name = self.livefit.model.param_names | ||
| result_values = self.livefit.result.values | ||
| model_title = self.livefit.model.name.split(" [")[0] + ")" |
There was a problem hiding this comment.
This seems fragile. Can we define a name in a suitable format on each model instead?
jackbdoughty
left a comment
There was a problem hiding this comment.
Maybe worth just a quick comment under doc\callbacks\fitting\fitting.md- I think otherwise all good 👍
…bluesky_core into ticket70livefit
| @classmethod | ||
| def interesting_params(cls) -> list[str]: | ||
| """Return parameters that are interesting for ie. the plot title.""" | ||
| return ["c0"] |
There was a problem hiding this comment.
This should be both c1 and c0 I think
| @classmethod | ||
| def interesting_params(cls) -> list[str]: | ||
| """Return parameters that are interesting for ie. the plot title.""" | ||
| return ["c0"] |
There was a problem hiding this comment.
This should either be all of them, or none of them. Just one parameter of a polynomial is not very useful.
| @classmethod | ||
| def interesting_params(cls) -> list[str]: | ||
| """Return parameters that are interesting for ie. the plot title.""" | ||
| return ["center"] |
There was a problem hiding this comment.
SlitScan doesn't have a center parameter.
|
This is in review but not mergeable due to failing CI, @danielmaclaren can you have a look? |
Description of work
Matlibplot will display both the Model used and the Centre value of the graph.
Ticket
Link to Ticket
Labels
Acceptance criteria