def SpecFromMetadata(self): labels = self.mdh.getEntry('Sample.Labelling') for structure, dye in labels: ratio = dyeRatios.getRatio(dye, self.mdh) if not ratio is None: self.fluorSpecies[structure] = ratio self.fluorSpeciesDyes[structure] = dye self.mapping.setMapping( 'p_%s' % structure, '(1.0/(ColourNorm*2*numpy.pi*fitError_Ag*fitError_Ar))*exp(-(fitResults_Ag - %f*A)**2/(2*fitError_Ag**2) - (fitResults_Ar - %f*A)**2/(2*fitError_Ar**2))' % (ratio, 1 - ratio))
def _get_dye_ratios_from_metadata(self): warnings.warn(DeprecationWarning('This should not be called (colour now handled by the ProcessColour recipe module)')) labels = self.mdh.getOrDefault('Sample.Labelling', []) seen_structures = [] for structure, dye in labels: if structure in seen_structures: strucname = structure + '_1' else: strucname = structure seen_structures.append(structure) ratio = dyeRatios.getRatio(dye, self.mdh) if not ratio is None: self.fluorSpecies[strucname] = ratio self.fluorSpeciesDyes[strucname] = dye
def _get_dye_ratios_from_metadata(self, mdh): from PYME.LMVis import dyeRatios labels = mdh.getOrDefault('Sample.Labelling', []) seen_structures = [] for structure, dye in labels: #info might be unicode - convert to a standard string to keep traits happy structure = str(structure) dye = str(dye) if structure in seen_structures: strucname = structure + '_1' else: strucname = structure seen_structures.append(structure) ratio = dyeRatios.getRatio(dye, mdh) if not ratio is None: self.species_ratios[strucname] = ratio self.species_dyes[strucname] = dye