def rplog_convert(df, pwave_sonic, shear_sonic):
    """
    Convert usec/ft (DT/DTS) to velocity (VP/VS)
    Create Impedance logs from velocity and density logs (IP/IS)
    Create VP/VS ratio log
    """
    try:
        df['VP'] = 304800 / df[pwave_sonic]
        df["IP"] = df.VP * df.RHOB
        df['VS'] = 304800 / df[shear_sonic]
        df['VPVS'] = df.VP / df.VS    
        df['IS'] = df.VS * df.RHOB
    except Exception as e:
        print(f"Error when creating log: {e}")
    
    return df