A method related to a process for treating pharmaceutical contents in a pharmaceutical processing vessel is provided. The contents have a number of predefined parameters of variable values. According to the method electromagnetic radiation of various frequencies is transmitted into the vessel and its contents. Electromagnetic radiation which has interacted with the contents is received. Based on the received electromagnetic radiation, a respective value of a physical quantity related to the contents is determining for a plurality of said frequencies. A combination of values of said predefined parameters which would, for said plurality of frequencies, approximately result in the determined values of said physical quantity is determined.