I think the correct label would be: ```\label{ssec:lightcurve}``` for subsection, but if the rest of the text ref to that one, then it's fine.