Use the quotient function
ASAP> q = s.quotient(r)
This uses the rows in scantable r as reference spectra for the rows in scantable s. Scantable r must have either 1 row (which is applied to all rows in s) or both scantables must have the same number of rows. By default the quotient spectra is calculated to preserve continuum emission. If you wish to remove the continuum contribution, use the preserve argument:
ASAP> q = s.quotient(r, preserve=True)