A non-transitory computer-readable storage medium having stored thereon instructions which when executed by a processor implement a method when executed, the method comprising:
- comparing, by performing statistical testing, a spectrum of a particle stained with a single fluorescent material to a spectrum of an unstained particle, wherein the spectrum of the particle stained with the single fluorescent material and the spectrum of the unstained particle are obtained by measuring fluorescence intensities over a first plurality of frequency bands;
- identifying, from the statistical testing, a frequency band of the first plurality of frequency bands where a difference between the spectrum of the particle stained with the single fluorescent material and the spectrum of the unstained particle is below a threshold;
- generating, from the spectrum of the particle stained with the single fluorescent material, a base vector for the fluorescent material by setting a value of fluorescence intensity for the identified frequency band to 0 or a prescribed value, wherein the base vector includes fluorescence intensity values representative of a spectrum of the fluorescent material over a portion of the first plurality of frequency bands;
- and
- detecting a presence of the fluorescent material in a particle stained with a plurality of different staining materials by estimating a linear combination of base vectors, including the generated base vector, for a spectrum of the particle stained with the plurality of different staining materials obtained by measuring fluorescence intensities over a second plurality of frequency bands that include the portion of the first plurality of frequency bands, wherein a combination coefficient of the linear combination is for the generated base vector.