def ambient_color(self): string = "Ambient Color" colorlib.RenderColor(self.reflectivity_array, self.lambda_array, string) self.reflective_rgb = colorlib.RGB_FromSpec(self.reflectivity_array, self.lambda_array) return 1
def pure_color(self, wl): Spectrum = np.zeros_like(self.lambda_array) for i in range(0,len(Spectrum)): if abs(self.lambda_array[i] - wl)<5e-9: Spectrum[i] = 1 colorlib.RenderColor(Spectrum, self.lambda_array, str(wl)) return 1
def thermal_color(self): string = "Color at T = " + str(self.T_ml) + " K" colorlib.RenderColor(self.thermal_emission_array, self.lambda_array, string) self.thermal_rgb = colorlib.RGB_FromSpec(self.thermal_emission_array, self.lambda_array) return 1