<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calcSMA(self):
 """ Calculates the semi-major axis from Keplers Third Law """

        try:
            return eq.KeplersThirdLaw(None, self.star.M, self.P).a
        except HierarchyError:
            return np.nan