Text this: Two-parameter model for optimizing target beam distribution with an octupole magnet