nano-bio / IsotopeFitSharp

0 stars 0 forks source link

Calculating a fitted spectrum in the calibration windows #5

Open enaixtu opened 6 years ago

enaixtu commented 6 years ago

The calibration window in the GUI need to cover the following use-case:

  1. The spectrum has already been fitted at least once.
  2. User wants to adjust mass offset calibration and resolution fit. To assess the quality of new values, he needs to see a guess of the resulting fitted spectrum.

This will be implemented as follows:

  1. Get the new user-supplied data for mass offset correction and resolution fit.
  2. Recalculate the mass offset correction and resolution fit.
  3. Regenerate a new design matrix.
  4. Take the fitted abundances from the previous fit and multiply with the new design matrix to get the new fitted spectrum estimate. It does NOT run another fitting run, that is up to the user.

To cater for this, the library needs to implement:

  1. Property to store the calculated spectrum.
  2. Method that does the fitted spectrum calculation.
  3. Convenience function that wraps the 4 library method calls, so that the GUI code can be shorter.
johannespostler commented 6 years ago

1) this could in principle also happen for an abundance -> user sets a new abundance and wants to see, if it fits nicely to the data

2) i think actually we didn't re-fit the massoffset correction and resolution fit, but we only calculated the relevant portion of the spectrum. but I don't think why this would be better than what you suggested.