Edgemaster's Aspect, Death Trap Ultimate and Aftermath

I have a question regarding the interaction between Edgemaster’s Aspect, Rogue’s Death Trap Ultimate skill and the Aftermath Passive.

Does the Edgemaster’s Bonus damage apply based on available resource when Death Trap is initially cast/placed, or does it calculate the damage when Death Trap gets Armed, taking into consideration the bonus Energy from Aftermath passive, which gives 90 energy after using an Ultimate skill?

Would appreciate if someone can test this.