Set EKF2 (sensors) parameters during takeoff or flight

Hi All,

I am wondering what are the recommendations regarding setting ekf or sensors parameters during takeoff or flight?
For example, suppose I have sensor calibration code that produce me the magnetometer, baro and gyro calibration params.
Can we set these params during flight? Is it risky?

Thanks in advance,
Johan