Wave 13 - ISS Enterprise - ISS Enterprise

When firing a torpedo upgrade from the I.S.S Enterprise do you gain the +1 attack die bonus for having the ship target locked or do you spend the target lock before the gather attack dice step so its not there to grant the extra die?