<p>I am creating a light curve for the duration of a binary system in order to find out the duration of the eclipse. I am unsure as to whether to fit a function to the data (is it appropriate) as by fitting the function I am expressing that I think that the data lies within this region.</p>
<p>I was thinking of maybe doing the fit piecewise but I am unsure if I should even fit it at all. Any reading material or help would be great. I just need a pointer in the right direction.</p>
<p>I've attached two images. One plot without a fit and one plot with a cubic function fitted to the graph.</p>
<p>Many thanks in advance,
Owen.</p>
<p><a href="https://i.sstatic.net/8klyw.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8klyw.png" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/ZSlrl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZSlrl.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-01-06T17:29:33.843Z
It would be better if you try fitting a periodic function to graph the light curve.
WarpPrime
CC BY-SA 4.0
2021-01-07T03:17:17.757Z
You need to use error bars to show the accuracy of the measurements.  What a "reasonable" fit would be is hard to gauge without knowing the measurement error ranges.
StephenG - Help Ukraine
CC BY-SA 4.0
2021-01-07T18:08:57.007Z
Thank you for your response. That helps. I will also try to repost with errors.
Owen Johnson
<python><light-curve>
Should I fit a function to this lightcurve?
Owen Johnson
# Should I fit a function to this lightcurve?

(Asked by: username_0 on 2021-01-06)

I am creating a light curve for the duration of a binary system in order to find out the duration of the eclipse. I am unsure as to whether to fit a function to the data (is it appropriate) as by fitting the function I am expressing that I think that the data lies within this region.

I was thinking of maybe doing the fit piecewise but I am unsure if I should even fit it at all. Any reading material or help would be great. I just need a pointer in the right direction.

I've attached two images. One plot without a fit and one plot with a cubic function fitted to the graph.

Many thanks in advance,
Owen.

[![enter image description here](https://i.sstatic.net/8klyw.png)](https://i.sstatic.net/8klyw.png)

[![enter image description here](https://i.sstatic.net/ZSlrl.png)](https://i.sstatic.net/ZSlrl.png)

**Tags:** python, light-curve
> **Comments:**
> **username_1**: It would be better if you try fitting a periodic function to graph the light curve.  
> **username_2**: You need to use error bars to show the accuracy of the measurements.  What a "reasonable" fit would be is hard to gauge without knowing the measurement error ranges.  
> **username_0**: Thank you for your response. That helps. I will also try to repost with errors.  

---

## 0 answers

