<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def estimate_period(self, radial=True):
 """ Estimate the period of the orbit. By default, computes the radial period. If ``radial==False``, this returns period estimates for each dimension of the orbit. Parameters radial : bool (optional) What period to estimate. If ``True``, estimates the radial period. If ``False``, estimates period in each dimension, e.g., if the orbit is 3D, along x, y, and z. Returns ------- T : `~astropy.units.Quantity` The period or periods. """


        if self.t is None:
            raise ValueError("To compute the period, a time array is needed."
                             " Specify a time array when creating this object.")

        if radial:
            r = self.physicsspherical.r.value
            if self.norbits == 1:
                T = peak_to_peak_period(self.t.value, r)
                T = T * self.t.unit
            else:
                T = [peak_to_peak_period(self.t.value, r[:,n])
                     for n in range(r.shape[1])]
                T = T * self.t.unit

        else:
            raise NotImplementedError("sorry 'bout that...")

        return T