<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_freqs(self, n, f_lo_ghz, f_hi_ghz):
 """Set the frequency grid on which to perform the calculations. **Call signature** *n* The number of frequency points to sample. *f_lo_ghz* The lowest frequency to sample, in GHz. *f_hi_ghz* The highest frequency to sample, in GHz. Returns *self* for convenience in chaining. """

        if not (f_lo_ghz >= 0):
            raise ValueError('must have f_lo_ghz >= 0; got %r' % (f_lo_ghz,))
        if not (f_hi_ghz >= f_lo_ghz):
            raise ValueError('must have f_hi_ghz >= f_lo_ghz; got %r, %r' % (f_hi_ghz, f_lo_ghz))
        if not n >= 1:
            raise ValueError('must have n >= 1; got %r' % (n,))

        self.in_vals[IN_VAL_NFREQ] = n
        self.in_vals[IN_VAL_FREQ0] = f_lo_ghz * 1e9 # GHz => Hz
        self.in_vals[IN_VAL_LOGDFREQ] = np.log10(f_hi_ghz / f_lo_ghz) / n
        return self