Teams / VStar Software Development / Question: how to handle residuals from polynomial fit in VStar

Question: how to handle residuals from polynomial fit in VStar


Hi TeamSince version 2.4 Beta (we're up to 2.5 Beta, snuck in to fix a few bugs found just before the San Francisco workshop), VStar has had a Polynomial Fit feature (see the Analysis menu). At the workshop I briefly showed an example of how this feature could be used to fit a polynomial (trying different degrees with the slider up to 7) to a section of Mira data. The example was taken from Grant Foster's book Analyzing Light Curves: A Practical Guide, the motivation being to help find maximum within the JD range of interest.Currently, when a polynomial fit is created, a series is added to the light curve plot and made visible. Another series called "residuals" is added to the plot at the same time but not made visible by default. The residuals are the difference between the observation datapoints that were the source of the polynomial fit, and the polynomial fit data at the same points in time. It should be possible to save these and the polynomial fit datapoints to files, as can be done now for rows in the observation list.I am trying to decide whether to add the polynomial fit and residual datapoints to the existing observation list (see Observation List tab) or to a list in another tab (as we do for means). A third possibility is that when clicking on a point in the residuals or polynomial fit series, a dialog pops up with a table (list) of the data with an option to save as CSV or TSV. In fact, this could also be retrospectively applied to the means series.Are there other possibilities you can think of?Your input would be appreciated.Thanks.Regards,David

Residual thoughts

The chief issue with residuals, in my mind, is that they are the residuals to a certain fit. I would say the best thing to do would be to create a fit tab which records the coefficients of the fit (and type) as well as the observation table and residuals. That way the entire process is captured/saved simultaneously. A similar outcome would be possible a file-naming scheme which saved the fit in a named file with a certain extension and the observations and residuals in a file of the same name but different extension. Regarding plots. In an ideal world seeing the plot of residuals directly above or directly below the original observation plot would be desirable. Cheers, Doug

More residual thoughts...

Hi Doug Thanks for your "residual thoughts". I've been mulling over this in the background, and I think you're right in pointing to the need to capture the entire process. Rather than a tab, I'm starting to think that, as we already do for period analysis, it makes sense to open a dialog with tabs of its own for tables, plots, file save options etc. I like your suggestion of a plot of residuals appearing along with the fit plot. I've certainly seen that used in the literature. Regards, David

VStar Software Development

My Teams

Not a member of any groups.

Powered by Drupal