docs: def _return_tables(self, mag, imt, val_type):
          """
          Returns the vector of ground motions or standard deviations
          corresponding to the specific magnitude and intensity measure type.
  
          :param val_type:
              String indicating the type of data {"IMLs", "Total", "Inter" etc}
          """
          if imt.name in 'PGA PGV':
              # Get scalar imt
              if val_type == "IMLs":
                  iml_table = self.imls[imt.name][:]
              else:
                  iml_table = self.stddevs[val_type][imt.name][:]
              n_d, n_s, n_m = iml_table.shape
              iml_table = iml_table.reshape([n_d, n_m])
          else:
              if val_type == "IMLs":
                  periods = self.imls["T"][:]
                  iml_table = self.imls["SA"][:]
              else:
                  periods = self.stddevs[val_type]["T"][:]
                  iml_table = self.stddevs[val_type]["SA"][:]
  
              low_period = round(periods[0], 7)
              high_period = round(periods[-1], 7)
              if (round(imt.period, 7) < low_period) or (
                      round(imt.period, 7) > high_period):
                  raise ValueError("Spectral period %.3f outside of valid range "
                                   "(%.3f to %.3f)" % (imt.period, periods[0],
                                                       periods[-1]))
              # Apply log-log interpolation for spectral period
              interpolator = interp1d(numpy.log10(periods),
                                      numpy.log10(iml_table),
                                      axis=1)
              iml_table = 10. ** interpolator(numpy.log10(imt.period))
          return self.apply_magnitude_interpolation(mag, iml_table)