Why setattr(rctx, 'mag', 2.9434938048208452) instead of rctx.mag = 2.9434938048208452 ? Idem below.