3

How to get phase-folded data (-0.5,0.5)? For phase-folded value to the interval (0,1), I use:

$$ \phi = \frac{H_{JD}-T_0}{P} \mod 1$$

$\phi$ is phase

HJD is time

T0 is the reference time

P is the period

T0 should correspond to $\phi$ = 0

giardia
  • 2,088
  • 3
  • 17
Carly
  • 115
  • 4

2 Answers2

4

Let's see if this is what you need:

Starting with

  phi = ((HJD-T0)/P)%1

rewriting in MathJax:

$$\phi = \mod((H_{JD} - T_0) \ / P, \ 1)$$

We just need to push it by 0.5 so it wraps sooner by $\mod()$ , then subtract the 0.5 again on the outside to recenter it:

$$\phi = \mod((H_{JD} - T_0) \ / P + 0.5 , \ 1) - 0.5$$

uhoh
  • 31,151
  • 9
  • 89
  • 293
4

Take your final result for the phase and then subtract 1 if it is $>0.5$.

ProfRob
  • 151,483
  • 9
  • 359
  • 566