@classmethod
def from_table(cls, table):
    """Create from `~astropy.table.Table`."""
    if 'ENERG_LO' in table.colnames:
        e_lo = table['ENERG_LO'].quantity[0]
        e_hi = table['ENERG_HI'].quantity[0]
    elif 'ETRUE_LO' in table.colnames:
        e_lo = table['ETRUE_LO'].quantity[0]
        e_hi = table['ETRUE_HI'].quantity[0]
    else:
        raise ValueError(
            'Invalid column names. Need "ENERG_LO/ENERG_HI" or "ETRUE_LO/ETRUE_HI"'
            )
    o_lo = table['THETA_LO'].quantity[0]
    o_hi = table['THETA_HI'].quantity[0]
    m_lo = table['MIGRA_LO'].quantity[0]
    m_hi = table['MIGRA_HI'].quantity[0]
    matrix = table['MATRIX'].quantity[0].transpose()
    return cls(e_true_lo=e_lo, e_true_hi=e_hi, offset_lo=o_lo, offset_hi=
        o_hi, migra_lo=m_lo, migra_hi=m_hi, data=matrix)
