Fiber Bragg gratings as transient thermal gradient sensors