//Runs the guider through the calibration routine public static string Calibrate(double calExposure, bool AOEnabled) { //Run autocalibration routine ccdsoftCamera tsxgc = new ccdsoftCamera { Autoguider = 1, AutoSaveOn = 0, Frame = ccdsoftImageFrame.cdLight, Delay = 2.0, AutoguiderExposureTime = calExposure, ExposureTime = calExposure }; if (AOEnabled) { try { tsxgc.Calibrate(1); } catch (Exception ex) { return(ex.Message); } } else { try { tsxgc.Calibrate(0); } catch (Exception ex) { return(ex.Message); } } return("Calibration Complete"); }