A fluid analyzer, comprising: an optical source and an optical detector defining a beam path of an optical beam; a fluid channel with an interrogation region in which the optical beam interacts with a channel fluid; a flow-control device configured to conduct, in use, a sample fluid and a reference fluid through the interrogation region, the flow-control device being configured to manipulate the flow of a respective fluid in response to a fluid modulation signal; and a controller operative to: 1) generate the fluid modulation signal having a time-varying characteristic to control the flow-control device to operate to cause, in use, a fluid boundary separating the sample and reference fluids to be moved across the interrogation region accordingly, 2) adjust a fluid velocity or a fluid pressure in order to determine the best operating conditions for taking measurements, comprising: i) adjusting the fluid velocity or fluid pressure conditions; ii) measuring an absorption of light at each of the fluid velocity or fluid pressure conditions; and iii) selecting one of the fluid velocity or fluid pressure condition for further measurement based on the fluid velocity or fluid pressure condition having a desired absorption characteristic, 3) sample an output signal from the optical detector at one interval of the fluid modulation signal during which the interrogation region contains more sample fluid than reference fluid and at a second interval during which the interrogation region contains more reference fluid than sample fluid, thereby generating corresponding output signal samples, and 4) determine from the output signal samples a measurement value of an optical characteristic of the sample fluid. an optical source and an optical detector defining a beam path of an optical beam; a fluid channel with an interrogation region in which the optical beam interacts with a channel fluid; a flow-control device configured to conduct, in use, a sample fluid and a reference fluid through the interrogation region, the flow-control device being configured to manipulate the flow of a respective fluid in response to a fluid modulation signal; and a controller operative to: 1) generate the fluid modulation signal having a time-varying characteristic to control the flow-control device to operate to cause, in use, a fluid boundary separating the sample and reference fluids to be moved across the interrogation region accordingly, 2) adjust a fluid velocity or a fluid pressure in order to determine the best operating conditions for taking measurements, comprising: i) adjusting the fluid velocity or fluid pressure conditions; ii) measuring an absorption of light at each of the fluid velocity or fluid pressure conditions; and iii) selecting one of the fluid velocity or fluid pressure condition for further measurement based on the fluid velocity or fluid pressure condition having a desired absorption characteristic, 3) sample an output signal from the optical detector at one interval of the fluid modulation signal during which the interrogation region contains more sample fluid than reference fluid and at a second interval during which the interrogation region contains more reference fluid than sample fluid, thereby generating corresponding output signal samples, and 4) determine from the output signal samples a measurement value of an optical characteristic of the sample fluid. 1) generate the fluid modulation signal having a time-varying characteristic to control the flow-control device to operate to cause, in use, a fluid boundary separating the sample and reference fluids to be moved across the interrogation region accordingly, 2) adjust a fluid velocity or a fluid pressure in order to determine the best operating conditions for taking measurements, comprising: i) adjusting the fluid velocity or fluid pressure conditions; ii) measuring an absorption of light at each of the fluid velocity or fluid pressure conditions; and iii) selecting one of the fluid velocity or fluid pressure condition for further measurement based on the fluid velocity or fluid pressure condition having a desired absorption characteristic, i) adjusting the fluid velocity or fluid pressure conditions; ii) measuring an absorption of light at each of the fluid velocity or fluid pressure conditions; and iii) selecting one of the fluid velocity or fluid pressure condition for further measurement based on the fluid velocity or fluid pressure condition having a desired absorption characteristic, 3) sample an output signal from the optical detector at one interval of the fluid modulation signal during which the interrogation region contains more sample fluid than reference fluid and at a second interval during which the interrogation region contains more reference fluid than sample fluid, thereby generating corresponding output signal samples, and 4) determine from the output signal samples a measurement value of an optical characteristic of the sample fluid.