How does knowing the period of a variable star helps us know its luminosity?