Brick Wall: Fading Sine Wave at Edges

Working on a brick feature wall for a residential project. I'm having trouble fading the sine wave back to a typical coursing at the ends of the wall. I've attached a plan diagram illustrating what I'm trying to do. I'm fairly new to grasshopper so any help or explanation is greatly appreciated!