1. A method of controlling a polishing operation, comprising: polishing a first layer of a substrate in a chemical mechanical polishing system; obtaining a measured spectrum with an optical monitoring system positioned in the chemical mechanical polishing system; fitting an optical model to the measured spectrum, the fitting including finding parameter values of parameters that provide a minimum of a difference between an output spectrum of the optical model and the measured spectrum, the parameters including an endpoint parameter and at least one non-endpoint parameter, the fitting generating a fitted endpoint parameter value and a fitted non-endpoint parameter value; and determining at least one of a polishing endpoint or an adjustment of a pressure for the chemical mechanical polishing system from the fitted endpoint parameter value.