def test_scale_brightness_with_range(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, .2, .5, 0, 0 ) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual( step_intensity, [0.2, 0.20117647058823532, 0.2023529411764706, 0.2035294117647059, 0.20470588235294118, 0.2058823529411765, 0.20705882352941177, 0.20823529411764707, 0.20941176470588235, 0.21058823529411766, 0.21176470588235297, 0.21294117647058824, 0.21411764705882355, 0.21529411764705883, 0.21647058823529414, 0.21764705882352942, 0.21882352941176472, 0.22, 0.2211764705882353, 0.2223529411764706, 0.2235294117647059, 0.2247058823529412, 0.22588235294117648, 0.22705882352941179, 0.22823529411764706, 0.22941176470588237, 0.23058823529411765, 0.23176470588235296, 0.23294117647058823, 0.23411764705882354, 0.23529411764705882, 0.23647058823529413, 0.23764705882352943, 0.2388235294117647, 0.24000000000000002, 0.2411764705882353, 0.2423529411764706, 0.24352941176470588, 0.2447058823529412, 0.2458823529411765, 0.24705882352941178, 0.24823529411764708, 0.24941176470588236, 0.25058823529411767, 0.25176470588235295, 0.2529411764705882, 0.25411764705882356, 0.25529411764705884, 0.2564705882352941, 0.25764705882352945, 0.25882352941176473, 0.26, 0.2611764705882353, 0.2623529411764706, 0.2635294117647059, 0.2647058823529412, 0.26588235294117646, 0.2670588235294118, 0.26823529411764707, 0.26941176470588235, 0.2705882352941177, 0.27176470588235296, 0.27294117647058824, 0.2741176470588235, 0.2752941176470588, 0.27647058823529413, 0.2776470588235294, 0.2788235294117647, 0.28, 0.2811764705882353, 0.2823529411764706, 0.2835294117647059, 0.2847058823529412, 0.2858823529411765, 0.2870588235294118, 0.2882352941176471, 0.28941176470588237, 0.29058823529411765, 0.2917647058823529, 0.29294117647058826, 0.29411764705882354, 0.2952941176470588, 0.29647058823529415, 0.29764705882352943, 0.2988235294117647, 0.3, 0.3011764705882353, 0.3023529411764706, 0.3035294117647059, 0.30470588235294116, 0.3058823529411765, 0.3070588235294118, 0.30823529411764705, 0.3094117647058824, 0.31058823529411766, 0.31176470588235294, 0.3129411764705882, 0.3141176470588235, 0.31529411764705884, 0.3164705882352941, 0.3176470588235294, 0.31882352941176473, 0.32, 0.3211764705882353, 0.3223529411764706, 0.3235294117647059, 0.3247058823529412, 0.3258823529411765, 0.32705882352941174, 0.32823529411764707, 0.3294117647058824, 0.3305882352941176, 0.33176470588235296, 0.33294117647058824, 0.3341176470588235, 0.33529411764705885, 0.33647058823529413, 0.3376470588235294, 0.33882352941176475, 0.33999999999999997, 0.3411764705882353, 0.3423529411764706, 0.34352941176470586, 0.3447058823529412, 0.3458823529411765, 0.34705882352941175, 0.3482352941176471, 0.34941176470588237, 0.35058823529411764, 0.351764705882353, 0.3529411764705882, 0.35411764705882354, 0.35529411764705887, 0.3564705882352941, 0.35764705882352943, 0.3588235294117647, 0.36, 0.3611764705882353, 0.36235294117647054, 0.3635294117647059, 0.3647058823529412, 0.3658823529411765, 0.36705882352941177, 0.3682352941176471, 0.36941176470588233, 0.37058823529411766, 0.37176470588235294, 0.3729411764705882, 0.37411764705882355, 0.37529411764705883, 0.3764705882352941, 0.37764705882352945, 0.37882352941176467, 0.38, 0.3811764705882353, 0.38235294117647056, 0.3835294117647059, 0.38470588235294123, 0.38588235294117645, 0.3870588235294118, 0.38823529411764707, 0.38941176470588235, 0.3905882352941177, 0.3917647058823529, 0.39294117647058824, 0.3941176470588236, 0.3952941176470588, 0.39647058823529413, 0.3976470588235294, 0.3988235294117647, 0.4, 0.40117647058823525, 0.4023529411764706, 0.4035294117647059, 0.4047058823529412, 0.40588235294117647, 0.4070588235294118, 0.40823529411764703, 0.40941176470588236, 0.41058823529411764, 0.4117647058823529, 0.41294117647058826, 0.41411764705882353, 0.4152941176470588, 0.41647058823529415, 0.41764705882352937, 0.4188235294117647, 0.42, 0.4211764705882353, 0.4223529411764706, 0.42352941176470593, 0.42470588235294116, 0.4258823529411765, 0.42705882352941177, 0.42823529411764705, 0.4294117647058823, 0.43058823529411766, 0.43176470588235294, 0.4329411764705883, 0.4341176470588235, 0.43529411764705883, 0.4364705882352941, 0.4376470588235294, 0.4388235294117647, 0.44, 0.4411764705882353, 0.4423529411764706, 0.4435294117647059, 0.4447058823529412, 0.44588235294117645, 0.44705882352941173, 0.44823529411764707, 0.4494117647058824, 0.4505882352941177, 0.45176470588235296, 0.45294117647058824, 0.4541176470588235, 0.4552941176470588, 0.45647058823529413, 0.4576470588235294, 0.45882352941176474, 0.46, 0.4611764705882353, 0.4623529411764706, 0.46352941176470586, 0.4647058823529412, 0.46588235294117647, 0.46705882352941175, 0.4682352941176471, 0.46941176470588236, 0.47058823529411764, 0.4717647058823529, 0.47294117647058825, 0.47411764705882353, 0.4752941176470588, 0.4764705882352941, 0.4776470588235294, 0.4788235294117647, 0.48, 0.4811764705882353, 0.4823529411764706, 0.4835294117647059, 0.48470588235294115, 0.48588235294117643, 0.48705882352941177, 0.48823529411764705, 0.4894117647058824, 0.49058823529411766, 0.49176470588235294, 0.4929411764705882, 0.4941176470588235, 0.49529411764705883, 0.4964705882352941, 0.49764705882352944, 0.4988235294117647] ) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_with_max(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, 0, .5, 0, 0 ) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual( step_intensity, [0.0, 0.00196078431372549, 0.00392156862745098, 0.0058823529411764705, 0.00784313725490196, 0.00980392156862745, 0.011764705882352941, 0.013725490196078431, 0.01568627450980392, 0.01764705882352941, 0.0196078431372549, 0.021568627450980392, 0.023529411764705882, 0.025490196078431372, 0.027450980392156862, 0.029411764705882353, 0.03137254901960784, 0.03333333333333333, 0.03529411764705882, 0.03725490196078431, 0.0392156862745098, 0.041176470588235294, 0.043137254901960784, 0.045098039215686274, 0.047058823529411764, 0.049019607843137254, 0.050980392156862744, 0.052941176470588235, 0.054901960784313725, 0.056862745098039215, 0.058823529411764705, 0.060784313725490195, 0.06274509803921569, 0.06470588235294118, 0.06666666666666667, 0.06862745098039216, 0.07058823529411765, 0.07254901960784314, 0.07450980392156863, 0.07647058823529412, 0.0784313725490196, 0.0803921568627451, 0.08235294117647059, 0.08431372549019608, 0.08627450980392157, 0.08823529411764706, 0.09019607843137255, 0.09215686274509804, 0.09411764705882353, 0.09607843137254903, 0.09803921568627451, 0.1, 0.10196078431372549, 0.10392156862745099, 0.10588235294117647, 0.10784313725490197, 0.10980392156862745, 0.11176470588235295, 0.11372549019607843, 0.11568627450980393, 0.11764705882352941, 0.11960784313725491, 0.12156862745098039, 0.12352941176470589, 0.12549019607843137, 0.12745098039215685, 0.12941176470588237, 0.13137254901960785, 0.13333333333333333, 0.13529411764705881, 0.13725490196078433, 0.1392156862745098, 0.1411764705882353, 0.14313725490196078, 0.1450980392156863, 0.14705882352941177, 0.14901960784313725, 0.15098039215686274, 0.15294117647058825, 0.15490196078431373, 0.1568627450980392, 0.1588235294117647, 0.1607843137254902, 0.1627450980392157, 0.16470588235294117, 0.16666666666666666, 0.16862745098039217, 0.17058823529411765, 0.17254901960784313, 0.17450980392156862, 0.17647058823529413, 0.1784313725490196, 0.1803921568627451, 0.18235294117647058, 0.1843137254901961, 0.18627450980392157, 0.18823529411764706, 0.19019607843137254, 0.19215686274509805, 0.19411764705882353, 0.19607843137254902, 0.1980392156862745, 0.2, 0.2019607843137255, 0.20392156862745098, 0.20588235294117646, 0.20784313725490197, 0.20980392156862746, 0.21176470588235294, 0.21372549019607842, 0.21568627450980393, 0.21764705882352942, 0.2196078431372549, 0.22156862745098038, 0.2235294117647059, 0.22549019607843138, 0.22745098039215686, 0.22941176470588234, 0.23137254901960785, 0.23333333333333334, 0.23529411764705882, 0.2372549019607843, 0.23921568627450981, 0.2411764705882353, 0.24313725490196078, 0.24509803921568626, 0.24705882352941178, 0.24901960784313726, 0.25098039215686274, 0.2529411764705882, 0.2549019607843137, 0.2568627450980392, 0.25882352941176473, 0.2607843137254902, 0.2627450980392157, 0.2647058823529412, 0.26666666666666666, 0.26862745098039215, 0.27058823529411763, 0.2725490196078431, 0.27450980392156865, 0.27647058823529413, 0.2784313725490196, 0.2803921568627451, 0.2823529411764706, 0.28431372549019607, 0.28627450980392155, 0.28823529411764703, 0.2901960784313726, 0.29215686274509806, 0.29411764705882354, 0.296078431372549, 0.2980392156862745, 0.3, 0.30196078431372547, 0.30392156862745096, 0.3058823529411765, 0.307843137254902, 0.30980392156862746, 0.31176470588235294, 0.3137254901960784, 0.3156862745098039, 0.3176470588235294, 0.3196078431372549, 0.3215686274509804, 0.3235294117647059, 0.3254901960784314, 0.32745098039215687, 0.32941176470588235, 0.33137254901960783, 0.3333333333333333, 0.3352941176470588, 0.33725490196078434, 0.3392156862745098, 0.3411764705882353, 0.3431372549019608, 0.34509803921568627, 0.34705882352941175, 0.34901960784313724, 0.3509803921568627, 0.35294117647058826, 0.35490196078431374, 0.3568627450980392, 0.3588235294117647, 0.3607843137254902, 0.3627450980392157, 0.36470588235294116, 0.36666666666666664, 0.3686274509803922, 0.37058823529411766, 0.37254901960784315, 0.37450980392156863, 0.3764705882352941, 0.3784313725490196, 0.3803921568627451, 0.38235294117647056, 0.3843137254901961, 0.3862745098039216, 0.38823529411764707, 0.39019607843137255, 0.39215686274509803, 0.3941176470588235, 0.396078431372549, 0.3980392156862745, 0.4, 0.4019607843137255, 0.403921568627451, 0.40588235294117647, 0.40784313725490196, 0.40980392156862744, 0.4117647058823529, 0.4137254901960784, 0.41568627450980394, 0.4176470588235294, 0.4196078431372549, 0.4215686274509804, 0.4235294117647059, 0.42549019607843136, 0.42745098039215684, 0.4294117647058823, 0.43137254901960786, 0.43333333333333335, 0.43529411764705883, 0.4372549019607843, 0.4392156862745098, 0.4411764705882353, 0.44313725490196076, 0.44509803921568625, 0.4470588235294118, 0.44901960784313727, 0.45098039215686275, 0.45294117647058824, 0.4549019607843137, 0.4568627450980392, 0.4588235294117647, 0.46078431372549017, 0.4627450980392157, 0.4647058823529412, 0.4666666666666667, 0.46862745098039216, 0.47058823529411764, 0.4725490196078431, 0.4745098039215686, 0.4764705882352941, 0.47843137254901963, 0.4803921568627451, 0.4823529411764706, 0.4843137254901961, 0.48627450980392156, 0.48823529411764705, 0.49019607843137253, 0.492156862745098, 0.49411764705882355, 0.49607843137254903, 0.4980392156862745] ) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_full_range(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, 0, 1, 0, 0 ) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual( step_intensity, [0.0, 0.00392156862745098, 0.00784313725490196, 0.011764705882352941, 0.01568627450980392, 0.0196078431372549, 0.023529411764705882, 0.027450980392156862, 0.03137254901960784, 0.03529411764705882, 0.0392156862745098, 0.043137254901960784, 0.047058823529411764, 0.050980392156862744, 0.054901960784313725, 0.058823529411764705, 0.06274509803921569, 0.06666666666666667, 0.07058823529411765, 0.07450980392156863, 0.0784313725490196, 0.08235294117647059, 0.08627450980392157, 0.09019607843137255, 0.09411764705882353, 0.09803921568627451, 0.10196078431372549, 0.10588235294117647, 0.10980392156862745, 0.11372549019607843, 0.11764705882352941, 0.12156862745098039, 0.12549019607843137, 0.12941176470588237, 0.13333333333333333, 0.13725490196078433, 0.1411764705882353, 0.1450980392156863, 0.14901960784313725, 0.15294117647058825, 0.1568627450980392, 0.1607843137254902, 0.16470588235294117, 0.16862745098039217, 0.17254901960784313, 0.17647058823529413, 0.1803921568627451, 0.1843137254901961, 0.18823529411764706, 0.19215686274509805, 0.19607843137254902, 0.2, 0.20392156862745098, 0.20784313725490197, 0.21176470588235294, 0.21568627450980393, 0.2196078431372549, 0.2235294117647059, 0.22745098039215686, 0.23137254901960785, 0.23529411764705882, 0.23921568627450981, 0.24313725490196078, 0.24705882352941178, 0.25098039215686274, 0.2549019607843137, 0.25882352941176473, 0.2627450980392157, 0.26666666666666666, 0.27058823529411763, 0.27450980392156865, 0.2784313725490196, 0.2823529411764706, 0.28627450980392155, 0.2901960784313726, 0.29411764705882354, 0.2980392156862745, 0.30196078431372547, 0.3058823529411765, 0.30980392156862746, 0.3137254901960784, 0.3176470588235294, 0.3215686274509804, 0.3254901960784314, 0.32941176470588235, 0.3333333333333333, 0.33725490196078434, 0.3411764705882353, 0.34509803921568627, 0.34901960784313724, 0.35294117647058826, 0.3568627450980392, 0.3607843137254902, 0.36470588235294116, 0.3686274509803922, 0.37254901960784315, 0.3764705882352941, 0.3803921568627451, 0.3843137254901961, 0.38823529411764707, 0.39215686274509803, 0.396078431372549, 0.4, 0.403921568627451, 0.40784313725490196, 0.4117647058823529, 0.41568627450980394, 0.4196078431372549, 0.4235294117647059, 0.42745098039215684, 0.43137254901960786, 0.43529411764705883, 0.4392156862745098, 0.44313725490196076, 0.4470588235294118, 0.45098039215686275, 0.4549019607843137, 0.4588235294117647, 0.4627450980392157, 0.4666666666666667, 0.47058823529411764, 0.4745098039215686, 0.47843137254901963, 0.4823529411764706, 0.48627450980392156, 0.49019607843137253, 0.49411764705882355, 0.4980392156862745, 0.5019607843137255, 0.5058823529411764, 0.5098039215686274, 0.5137254901960784, 0.5176470588235295, 0.5215686274509804, 0.5254901960784314, 0.5294117647058824, 0.5333333333333333, 0.5372549019607843, 0.5411764705882353, 0.5450980392156862, 0.5490196078431373, 0.5529411764705883, 0.5568627450980392, 0.5607843137254902, 0.5647058823529412, 0.5686274509803921, 0.5725490196078431, 0.5764705882352941, 0.5803921568627451, 0.5843137254901961, 0.5882352941176471, 0.592156862745098, 0.596078431372549, 0.6, 0.6039215686274509, 0.6078431372549019, 0.611764705882353, 0.615686274509804, 0.6196078431372549, 0.6235294117647059, 0.6274509803921569, 0.6313725490196078, 0.6352941176470588, 0.6392156862745098, 0.6431372549019608, 0.6470588235294118, 0.6509803921568628, 0.6549019607843137, 0.6588235294117647, 0.6627450980392157, 0.6666666666666666, 0.6705882352941176, 0.6745098039215687, 0.6784313725490196, 0.6823529411764706, 0.6862745098039216, 0.6901960784313725, 0.6941176470588235, 0.6980392156862745, 0.7019607843137254, 0.7058823529411765, 0.7098039215686275, 0.7137254901960784, 0.7176470588235294, 0.7215686274509804, 0.7254901960784313, 0.7294117647058823, 0.7333333333333333, 0.7372549019607844, 0.7411764705882353, 0.7450980392156863, 0.7490196078431373, 0.7529411764705882, 0.7568627450980392, 0.7607843137254902, 0.7647058823529411, 0.7686274509803922, 0.7725490196078432, 0.7764705882352941, 0.7803921568627451, 0.7843137254901961, 0.788235294117647, 0.792156862745098, 0.796078431372549, 0.8, 0.803921568627451, 0.807843137254902, 0.8117647058823529, 0.8156862745098039, 0.8196078431372549, 0.8235294117647058, 0.8274509803921568, 0.8313725490196079, 0.8352941176470589, 0.8392156862745098, 0.8431372549019608, 0.8470588235294118, 0.8509803921568627, 0.8549019607843137, 0.8588235294117647, 0.8627450980392157, 0.8666666666666667, 0.8705882352941177, 0.8745098039215686, 0.8784313725490196, 0.8823529411764706, 0.8862745098039215, 0.8901960784313725, 0.8941176470588236, 0.8980392156862745, 0.9019607843137255, 0.9058823529411765, 0.9098039215686274, 0.9137254901960784, 0.9176470588235294, 0.9215686274509803, 0.9254901960784314, 0.9294117647058824, 0.9333333333333333, 0.9372549019607843, 0.9411764705882353, 0.9450980392156862, 0.9490196078431372, 0.9529411764705882, 0.9568627450980393, 0.9607843137254902, 0.9647058823529412, 0.9686274509803922, 0.9725490196078431, 0.9764705882352941, 0.9803921568627451, 0.984313725490196, 0.9882352941176471, 0.9921568627450981, 0.996078431372549] ) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_with_min(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, .5, 1, 0, 0 ) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual( step_intensity, [0.5, 0.5019607843137255, 0.503921568627451, 0.5058823529411764, 0.5078431372549019, 0.5098039215686274, 0.5117647058823529, 0.5137254901960784, 0.5156862745098039, 0.5176470588235295, 0.5196078431372549, 0.5215686274509804, 0.5235294117647059, 0.5254901960784314, 0.5274509803921569, 0.5294117647058824, 0.5313725490196078, 0.5333333333333333, 0.5352941176470588, 0.5372549019607843, 0.5392156862745098, 0.5411764705882353, 0.5431372549019607, 0.5450980392156862, 0.5470588235294118, 0.5490196078431373, 0.5509803921568628, 0.5529411764705883, 0.5549019607843138, 0.5568627450980392, 0.5588235294117647, 0.5607843137254902, 0.5627450980392157, 0.5647058823529412, 0.5666666666666667, 0.5686274509803921, 0.5705882352941176, 0.5725490196078431, 0.5745098039215686, 0.5764705882352941, 0.5784313725490196, 0.5803921568627451, 0.5823529411764706, 0.5843137254901961, 0.5862745098039216, 0.5882352941176471, 0.5901960784313726, 0.592156862745098, 0.5941176470588235, 0.596078431372549, 0.5980392156862745, 0.6, 0.6019607843137255, 0.6039215686274509, 0.6058823529411764, 0.607843137254902, 0.6098039215686275, 0.611764705882353, 0.6137254901960785, 0.615686274509804, 0.6176470588235294, 0.6196078431372549, 0.6215686274509804, 0.6235294117647059, 0.6254901960784314, 0.6274509803921569, 0.6294117647058823, 0.6313725490196078, 0.6333333333333333, 0.6352941176470588, 0.6372549019607843, 0.6392156862745098, 0.6411764705882352, 0.6431372549019607, 0.6450980392156863, 0.6470588235294118, 0.6490196078431373, 0.6509803921568628, 0.6529411764705882, 0.6549019607843137, 0.6568627450980392, 0.6588235294117647, 0.6607843137254902, 0.6627450980392157, 0.6647058823529411, 0.6666666666666666, 0.6686274509803922, 0.6705882352941177, 0.6725490196078432, 0.6745098039215687, 0.6764705882352942, 0.6784313725490196, 0.6803921568627451, 0.6823529411764706, 0.6843137254901961, 0.6862745098039216, 0.6882352941176471, 0.6901960784313725, 0.692156862745098, 0.6941176470588235, 0.696078431372549, 0.6980392156862745, 0.7, 0.7019607843137254, 0.7039215686274509, 0.7058823529411764, 0.707843137254902, 0.7098039215686275, 0.711764705882353, 0.7137254901960784, 0.7156862745098039, 0.7176470588235294, 0.7196078431372549, 0.7215686274509804, 0.7235294117647059, 0.7254901960784313, 0.7274509803921568, 0.7294117647058823, 0.7313725490196079, 0.7333333333333334, 0.7352941176470589, 0.7372549019607844, 0.7392156862745098, 0.7411764705882353, 0.7431372549019608, 0.7450980392156863, 0.7470588235294118, 0.7490196078431373, 0.7509803921568627, 0.7529411764705882, 0.7549019607843137, 0.7568627450980392, 0.7588235294117647, 0.7607843137254902, 0.7627450980392156, 0.7647058823529411, 0.7666666666666666, 0.7686274509803921, 0.7705882352941176, 0.7725490196078431, 0.7745098039215687, 0.7764705882352941, 0.7784313725490196, 0.7803921568627451, 0.7823529411764706, 0.7843137254901961, 0.7862745098039216, 0.788235294117647, 0.7901960784313726, 0.7921568627450981, 0.7941176470588236, 0.7960784313725491, 0.7980392156862746, 0.8, 0.8019607843137255, 0.803921568627451, 0.8058823529411765, 0.807843137254902, 0.8098039215686275, 0.8117647058823529, 0.8137254901960784, 0.8156862745098039, 0.8176470588235294, 0.8196078431372549, 0.8215686274509804, 0.8235294117647058, 0.8254901960784313, 0.8274509803921568, 0.8294117647058823, 0.8313725490196078, 0.8333333333333333, 0.8352941176470587, 0.8372549019607843, 0.8392156862745098, 0.8411764705882353, 0.8431372549019608, 0.8450980392156863, 0.8470588235294118, 0.8490196078431372, 0.8509803921568627, 0.8529411764705883, 0.8549019607843138, 0.8568627450980393, 0.8588235294117648, 0.8607843137254902, 0.8627450980392157, 0.8647058823529412, 0.8666666666666667, 0.8686274509803922, 0.8705882352941177, 0.8725490196078431, 0.8745098039215686, 0.8764705882352941, 0.8784313725490196, 0.8803921568627451, 0.8823529411764706, 0.884313725490196, 0.8862745098039215, 0.888235294117647, 0.8901960784313725, 0.892156862745098, 0.8941176470588235, 0.896078431372549, 0.8980392156862744, 0.9, 0.9019607843137255, 0.903921568627451, 0.9058823529411765, 0.907843137254902, 0.9098039215686274, 0.9117647058823529, 0.9137254901960784, 0.915686274509804, 0.9176470588235295, 0.919607843137255, 0.9215686274509804, 0.9235294117647059, 0.9254901960784314, 0.9274509803921569, 0.9294117647058824, 0.9313725490196079, 0.9333333333333333, 0.9352941176470588, 0.9372549019607843, 0.9392156862745098, 0.9411764705882353, 0.9431372549019608, 0.9450980392156862, 0.9470588235294117, 0.9490196078431372, 0.9509803921568627, 0.9529411764705882, 0.9549019607843137, 0.9568627450980391, 0.9588235294117646, 0.9607843137254901, 0.9627450980392157, 0.9647058823529412, 0.9666666666666667, 0.9686274509803922, 0.9705882352941176, 0.9725490196078431, 0.9745098039215686, 0.9764705882352941, 0.9784313725490197, 0.9803921568627452, 0.9823529411764707, 0.9843137254901961, 0.9862745098039216, 0.9882352941176471, 0.9901960784313726, 0.9921568627450981, 0.9941176470588236, 0.996078431372549, 0.9980392156862745] ) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_full_range(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, 0, 1, 0, 0) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual(step_intensity, [ 0.0, 0.00392156862745098, 0.00784313725490196, 0.011764705882352941, 0.01568627450980392, 0.0196078431372549, 0.023529411764705882, 0.027450980392156862, 0.03137254901960784, 0.03529411764705882, 0.0392156862745098, 0.043137254901960784, 0.047058823529411764, 0.050980392156862744, 0.054901960784313725, 0.058823529411764705, 0.06274509803921569, 0.06666666666666667, 0.07058823529411765, 0.07450980392156863, 0.0784313725490196, 0.08235294117647059, 0.08627450980392157, 0.09019607843137255, 0.09411764705882353, 0.09803921568627451, 0.10196078431372549, 0.10588235294117647, 0.10980392156862745, 0.11372549019607843, 0.11764705882352941, 0.12156862745098039, 0.12549019607843137, 0.12941176470588237, 0.13333333333333333, 0.13725490196078433, 0.1411764705882353, 0.1450980392156863, 0.14901960784313725, 0.15294117647058825, 0.1568627450980392, 0.1607843137254902, 0.16470588235294117, 0.16862745098039217, 0.17254901960784313, 0.17647058823529413, 0.1803921568627451, 0.1843137254901961, 0.18823529411764706, 0.19215686274509805, 0.19607843137254902, 0.2, 0.20392156862745098, 0.20784313725490197, 0.21176470588235294, 0.21568627450980393, 0.2196078431372549, 0.2235294117647059, 0.22745098039215686, 0.23137254901960785, 0.23529411764705882, 0.23921568627450981, 0.24313725490196078, 0.24705882352941178, 0.25098039215686274, 0.2549019607843137, 0.25882352941176473, 0.2627450980392157, 0.26666666666666666, 0.27058823529411763, 0.27450980392156865, 0.2784313725490196, 0.2823529411764706, 0.28627450980392155, 0.2901960784313726, 0.29411764705882354, 0.2980392156862745, 0.30196078431372547, 0.3058823529411765, 0.30980392156862746, 0.3137254901960784, 0.3176470588235294, 0.3215686274509804, 0.3254901960784314, 0.32941176470588235, 0.3333333333333333, 0.33725490196078434, 0.3411764705882353, 0.34509803921568627, 0.34901960784313724, 0.35294117647058826, 0.3568627450980392, 0.3607843137254902, 0.36470588235294116, 0.3686274509803922, 0.37254901960784315, 0.3764705882352941, 0.3803921568627451, 0.3843137254901961, 0.38823529411764707, 0.39215686274509803, 0.396078431372549, 0.4, 0.403921568627451, 0.40784313725490196, 0.4117647058823529, 0.41568627450980394, 0.4196078431372549, 0.4235294117647059, 0.42745098039215684, 0.43137254901960786, 0.43529411764705883, 0.4392156862745098, 0.44313725490196076, 0.4470588235294118, 0.45098039215686275, 0.4549019607843137, 0.4588235294117647, 0.4627450980392157, 0.4666666666666667, 0.47058823529411764, 0.4745098039215686, 0.47843137254901963, 0.4823529411764706, 0.48627450980392156, 0.49019607843137253, 0.49411764705882355, 0.4980392156862745, 0.5019607843137255, 0.5058823529411764, 0.5098039215686274, 0.5137254901960784, 0.5176470588235295, 0.5215686274509804, 0.5254901960784314, 0.5294117647058824, 0.5333333333333333, 0.5372549019607843, 0.5411764705882353, 0.5450980392156862, 0.5490196078431373, 0.5529411764705883, 0.5568627450980392, 0.5607843137254902, 0.5647058823529412, 0.5686274509803921, 0.5725490196078431, 0.5764705882352941, 0.5803921568627451, 0.5843137254901961, 0.5882352941176471, 0.592156862745098, 0.596078431372549, 0.6, 0.6039215686274509, 0.6078431372549019, 0.611764705882353, 0.615686274509804, 0.6196078431372549, 0.6235294117647059, 0.6274509803921569, 0.6313725490196078, 0.6352941176470588, 0.6392156862745098, 0.6431372549019608, 0.6470588235294118, 0.6509803921568628, 0.6549019607843137, 0.6588235294117647, 0.6627450980392157, 0.6666666666666666, 0.6705882352941176, 0.6745098039215687, 0.6784313725490196, 0.6823529411764706, 0.6862745098039216, 0.6901960784313725, 0.6941176470588235, 0.6980392156862745, 0.7019607843137254, 0.7058823529411765, 0.7098039215686275, 0.7137254901960784, 0.7176470588235294, 0.7215686274509804, 0.7254901960784313, 0.7294117647058823, 0.7333333333333333, 0.7372549019607844, 0.7411764705882353, 0.7450980392156863, 0.7490196078431373, 0.7529411764705882, 0.7568627450980392, 0.7607843137254902, 0.7647058823529411, 0.7686274509803922, 0.7725490196078432, 0.7764705882352941, 0.7803921568627451, 0.7843137254901961, 0.788235294117647, 0.792156862745098, 0.796078431372549, 0.8, 0.803921568627451, 0.807843137254902, 0.8117647058823529, 0.8156862745098039, 0.8196078431372549, 0.8235294117647058, 0.8274509803921568, 0.8313725490196079, 0.8352941176470589, 0.8392156862745098, 0.8431372549019608, 0.8470588235294118, 0.8509803921568627, 0.8549019607843137, 0.8588235294117647, 0.8627450980392157, 0.8666666666666667, 0.8705882352941177, 0.8745098039215686, 0.8784313725490196, 0.8823529411764706, 0.8862745098039215, 0.8901960784313725, 0.8941176470588236, 0.8980392156862745, 0.9019607843137255, 0.9058823529411765, 0.9098039215686274, 0.9137254901960784, 0.9176470588235294, 0.9215686274509803, 0.9254901960784314, 0.9294117647058824, 0.9333333333333333, 0.9372549019607843, 0.9411764705882353, 0.9450980392156862, 0.9490196078431372, 0.9529411764705882, 0.9568627450980393, 0.9607843137254902, 0.9647058823529412, 0.9686274509803922, 0.9725490196078431, 0.9764705882352941, 0.9803921568627451, 0.984313725490196, 0.9882352941176471, 0.9921568627450981, 0.996078431372549 ]) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_with_range(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, .2, .5, 0, 0) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual(step_intensity, [ 0.2, 0.20117647058823532, 0.2023529411764706, 0.2035294117647059, 0.20470588235294118, 0.2058823529411765, 0.20705882352941177, 0.20823529411764707, 0.20941176470588235, 0.21058823529411766, 0.21176470588235297, 0.21294117647058824, 0.21411764705882355, 0.21529411764705883, 0.21647058823529414, 0.21764705882352942, 0.21882352941176472, 0.22, 0.2211764705882353, 0.2223529411764706, 0.2235294117647059, 0.2247058823529412, 0.22588235294117648, 0.22705882352941179, 0.22823529411764706, 0.22941176470588237, 0.23058823529411765, 0.23176470588235296, 0.23294117647058823, 0.23411764705882354, 0.23529411764705882, 0.23647058823529413, 0.23764705882352943, 0.2388235294117647, 0.24000000000000002, 0.2411764705882353, 0.2423529411764706, 0.24352941176470588, 0.2447058823529412, 0.2458823529411765, 0.24705882352941178, 0.24823529411764708, 0.24941176470588236, 0.25058823529411767, 0.25176470588235295, 0.2529411764705882, 0.25411764705882356, 0.25529411764705884, 0.2564705882352941, 0.25764705882352945, 0.25882352941176473, 0.26, 0.2611764705882353, 0.2623529411764706, 0.2635294117647059, 0.2647058823529412, 0.26588235294117646, 0.2670588235294118, 0.26823529411764707, 0.26941176470588235, 0.2705882352941177, 0.27176470588235296, 0.27294117647058824, 0.2741176470588235, 0.2752941176470588, 0.27647058823529413, 0.2776470588235294, 0.2788235294117647, 0.28, 0.2811764705882353, 0.2823529411764706, 0.2835294117647059, 0.2847058823529412, 0.2858823529411765, 0.2870588235294118, 0.2882352941176471, 0.28941176470588237, 0.29058823529411765, 0.2917647058823529, 0.29294117647058826, 0.29411764705882354, 0.2952941176470588, 0.29647058823529415, 0.29764705882352943, 0.2988235294117647, 0.3, 0.3011764705882353, 0.3023529411764706, 0.3035294117647059, 0.30470588235294116, 0.3058823529411765, 0.3070588235294118, 0.30823529411764705, 0.3094117647058824, 0.31058823529411766, 0.31176470588235294, 0.3129411764705882, 0.3141176470588235, 0.31529411764705884, 0.3164705882352941, 0.3176470588235294, 0.31882352941176473, 0.32, 0.3211764705882353, 0.3223529411764706, 0.3235294117647059, 0.3247058823529412, 0.3258823529411765, 0.32705882352941174, 0.32823529411764707, 0.3294117647058824, 0.3305882352941176, 0.33176470588235296, 0.33294117647058824, 0.3341176470588235, 0.33529411764705885, 0.33647058823529413, 0.3376470588235294, 0.33882352941176475, 0.33999999999999997, 0.3411764705882353, 0.3423529411764706, 0.34352941176470586, 0.3447058823529412, 0.3458823529411765, 0.34705882352941175, 0.3482352941176471, 0.34941176470588237, 0.35058823529411764, 0.351764705882353, 0.3529411764705882, 0.35411764705882354, 0.35529411764705887, 0.3564705882352941, 0.35764705882352943, 0.3588235294117647, 0.36, 0.3611764705882353, 0.36235294117647054, 0.3635294117647059, 0.3647058823529412, 0.3658823529411765, 0.36705882352941177, 0.3682352941176471, 0.36941176470588233, 0.37058823529411766, 0.37176470588235294, 0.3729411764705882, 0.37411764705882355, 0.37529411764705883, 0.3764705882352941, 0.37764705882352945, 0.37882352941176467, 0.38, 0.3811764705882353, 0.38235294117647056, 0.3835294117647059, 0.38470588235294123, 0.38588235294117645, 0.3870588235294118, 0.38823529411764707, 0.38941176470588235, 0.3905882352941177, 0.3917647058823529, 0.39294117647058824, 0.3941176470588236, 0.3952941176470588, 0.39647058823529413, 0.3976470588235294, 0.3988235294117647, 0.4, 0.40117647058823525, 0.4023529411764706, 0.4035294117647059, 0.4047058823529412, 0.40588235294117647, 0.4070588235294118, 0.40823529411764703, 0.40941176470588236, 0.41058823529411764, 0.4117647058823529, 0.41294117647058826, 0.41411764705882353, 0.4152941176470588, 0.41647058823529415, 0.41764705882352937, 0.4188235294117647, 0.42, 0.4211764705882353, 0.4223529411764706, 0.42352941176470593, 0.42470588235294116, 0.4258823529411765, 0.42705882352941177, 0.42823529411764705, 0.4294117647058823, 0.43058823529411766, 0.43176470588235294, 0.4329411764705883, 0.4341176470588235, 0.43529411764705883, 0.4364705882352941, 0.4376470588235294, 0.4388235294117647, 0.44, 0.4411764705882353, 0.4423529411764706, 0.4435294117647059, 0.4447058823529412, 0.44588235294117645, 0.44705882352941173, 0.44823529411764707, 0.4494117647058824, 0.4505882352941177, 0.45176470588235296, 0.45294117647058824, 0.4541176470588235, 0.4552941176470588, 0.45647058823529413, 0.4576470588235294, 0.45882352941176474, 0.46, 0.4611764705882353, 0.4623529411764706, 0.46352941176470586, 0.4647058823529412, 0.46588235294117647, 0.46705882352941175, 0.4682352941176471, 0.46941176470588236, 0.47058823529411764, 0.4717647058823529, 0.47294117647058825, 0.47411764705882353, 0.4752941176470588, 0.4764705882352941, 0.4776470588235294, 0.4788235294117647, 0.48, 0.4811764705882353, 0.4823529411764706, 0.4835294117647059, 0.48470588235294115, 0.48588235294117643, 0.48705882352941177, 0.48823529411764705, 0.4894117647058824, 0.49058823529411766, 0.49176470588235294, 0.4929411764705882, 0.4941176470588235, 0.49529411764705883, 0.4964705882352941, 0.49764705882352944, 0.4988235294117647 ]) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_with_max(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, 0, .5, 0, 0) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual(step_intensity, [ 0.0, 0.00196078431372549, 0.00392156862745098, 0.0058823529411764705, 0.00784313725490196, 0.00980392156862745, 0.011764705882352941, 0.013725490196078431, 0.01568627450980392, 0.01764705882352941, 0.0196078431372549, 0.021568627450980392, 0.023529411764705882, 0.025490196078431372, 0.027450980392156862, 0.029411764705882353, 0.03137254901960784, 0.03333333333333333, 0.03529411764705882, 0.03725490196078431, 0.0392156862745098, 0.041176470588235294, 0.043137254901960784, 0.045098039215686274, 0.047058823529411764, 0.049019607843137254, 0.050980392156862744, 0.052941176470588235, 0.054901960784313725, 0.056862745098039215, 0.058823529411764705, 0.060784313725490195, 0.06274509803921569, 0.06470588235294118, 0.06666666666666667, 0.06862745098039216, 0.07058823529411765, 0.07254901960784314, 0.07450980392156863, 0.07647058823529412, 0.0784313725490196, 0.0803921568627451, 0.08235294117647059, 0.08431372549019608, 0.08627450980392157, 0.08823529411764706, 0.09019607843137255, 0.09215686274509804, 0.09411764705882353, 0.09607843137254903, 0.09803921568627451, 0.1, 0.10196078431372549, 0.10392156862745099, 0.10588235294117647, 0.10784313725490197, 0.10980392156862745, 0.11176470588235295, 0.11372549019607843, 0.11568627450980393, 0.11764705882352941, 0.11960784313725491, 0.12156862745098039, 0.12352941176470589, 0.12549019607843137, 0.12745098039215685, 0.12941176470588237, 0.13137254901960785, 0.13333333333333333, 0.13529411764705881, 0.13725490196078433, 0.1392156862745098, 0.1411764705882353, 0.14313725490196078, 0.1450980392156863, 0.14705882352941177, 0.14901960784313725, 0.15098039215686274, 0.15294117647058825, 0.15490196078431373, 0.1568627450980392, 0.1588235294117647, 0.1607843137254902, 0.1627450980392157, 0.16470588235294117, 0.16666666666666666, 0.16862745098039217, 0.17058823529411765, 0.17254901960784313, 0.17450980392156862, 0.17647058823529413, 0.1784313725490196, 0.1803921568627451, 0.18235294117647058, 0.1843137254901961, 0.18627450980392157, 0.18823529411764706, 0.19019607843137254, 0.19215686274509805, 0.19411764705882353, 0.19607843137254902, 0.1980392156862745, 0.2, 0.2019607843137255, 0.20392156862745098, 0.20588235294117646, 0.20784313725490197, 0.20980392156862746, 0.21176470588235294, 0.21372549019607842, 0.21568627450980393, 0.21764705882352942, 0.2196078431372549, 0.22156862745098038, 0.2235294117647059, 0.22549019607843138, 0.22745098039215686, 0.22941176470588234, 0.23137254901960785, 0.23333333333333334, 0.23529411764705882, 0.2372549019607843, 0.23921568627450981, 0.2411764705882353, 0.24313725490196078, 0.24509803921568626, 0.24705882352941178, 0.24901960784313726, 0.25098039215686274, 0.2529411764705882, 0.2549019607843137, 0.2568627450980392, 0.25882352941176473, 0.2607843137254902, 0.2627450980392157, 0.2647058823529412, 0.26666666666666666, 0.26862745098039215, 0.27058823529411763, 0.2725490196078431, 0.27450980392156865, 0.27647058823529413, 0.2784313725490196, 0.2803921568627451, 0.2823529411764706, 0.28431372549019607, 0.28627450980392155, 0.28823529411764703, 0.2901960784313726, 0.29215686274509806, 0.29411764705882354, 0.296078431372549, 0.2980392156862745, 0.3, 0.30196078431372547, 0.30392156862745096, 0.3058823529411765, 0.307843137254902, 0.30980392156862746, 0.31176470588235294, 0.3137254901960784, 0.3156862745098039, 0.3176470588235294, 0.3196078431372549, 0.3215686274509804, 0.3235294117647059, 0.3254901960784314, 0.32745098039215687, 0.32941176470588235, 0.33137254901960783, 0.3333333333333333, 0.3352941176470588, 0.33725490196078434, 0.3392156862745098, 0.3411764705882353, 0.3431372549019608, 0.34509803921568627, 0.34705882352941175, 0.34901960784313724, 0.3509803921568627, 0.35294117647058826, 0.35490196078431374, 0.3568627450980392, 0.3588235294117647, 0.3607843137254902, 0.3627450980392157, 0.36470588235294116, 0.36666666666666664, 0.3686274509803922, 0.37058823529411766, 0.37254901960784315, 0.37450980392156863, 0.3764705882352941, 0.3784313725490196, 0.3803921568627451, 0.38235294117647056, 0.3843137254901961, 0.3862745098039216, 0.38823529411764707, 0.39019607843137255, 0.39215686274509803, 0.3941176470588235, 0.396078431372549, 0.3980392156862745, 0.4, 0.4019607843137255, 0.403921568627451, 0.40588235294117647, 0.40784313725490196, 0.40980392156862744, 0.4117647058823529, 0.4137254901960784, 0.41568627450980394, 0.4176470588235294, 0.4196078431372549, 0.4215686274509804, 0.4235294117647059, 0.42549019607843136, 0.42745098039215684, 0.4294117647058823, 0.43137254901960786, 0.43333333333333335, 0.43529411764705883, 0.4372549019607843, 0.4392156862745098, 0.4411764705882353, 0.44313725490196076, 0.44509803921568625, 0.4470588235294118, 0.44901960784313727, 0.45098039215686275, 0.45294117647058824, 0.4549019607843137, 0.4568627450980392, 0.4588235294117647, 0.46078431372549017, 0.4627450980392157, 0.4647058823529412, 0.4666666666666667, 0.46862745098039216, 0.47058823529411764, 0.4725490196078431, 0.4745098039215686, 0.4764705882352941, 0.47843137254901963, 0.4803921568627451, 0.4823529411764706, 0.4843137254901961, 0.48627450980392156, 0.48823529411764705, 0.49019607843137253, 0.492156862745098, 0.49411764705882355, 0.49607843137254903, 0.4980392156862745 ]) self.assertEqual(255, len(step_intensity))
def test_scale_brightness_with_min(self): mock_driver = mock.Mock() mock_driver.last_index = 35 animation = raspledstrip.animation.BreathingLight( mock_driver, 255, 255, 255, .5, 1, 0, 0) step_intensity = [] for i in xrange(255): intensity = animation.scale_brightness(float(i)) step_intensity.append(intensity) self.assertListEqual(step_intensity, [ 0.5, 0.5019607843137255, 0.503921568627451, 0.5058823529411764, 0.5078431372549019, 0.5098039215686274, 0.5117647058823529, 0.5137254901960784, 0.5156862745098039, 0.5176470588235295, 0.5196078431372549, 0.5215686274509804, 0.5235294117647059, 0.5254901960784314, 0.5274509803921569, 0.5294117647058824, 0.5313725490196078, 0.5333333333333333, 0.5352941176470588, 0.5372549019607843, 0.5392156862745098, 0.5411764705882353, 0.5431372549019607, 0.5450980392156862, 0.5470588235294118, 0.5490196078431373, 0.5509803921568628, 0.5529411764705883, 0.5549019607843138, 0.5568627450980392, 0.5588235294117647, 0.5607843137254902, 0.5627450980392157, 0.5647058823529412, 0.5666666666666667, 0.5686274509803921, 0.5705882352941176, 0.5725490196078431, 0.5745098039215686, 0.5764705882352941, 0.5784313725490196, 0.5803921568627451, 0.5823529411764706, 0.5843137254901961, 0.5862745098039216, 0.5882352941176471, 0.5901960784313726, 0.592156862745098, 0.5941176470588235, 0.596078431372549, 0.5980392156862745, 0.6, 0.6019607843137255, 0.6039215686274509, 0.6058823529411764, 0.607843137254902, 0.6098039215686275, 0.611764705882353, 0.6137254901960785, 0.615686274509804, 0.6176470588235294, 0.6196078431372549, 0.6215686274509804, 0.6235294117647059, 0.6254901960784314, 0.6274509803921569, 0.6294117647058823, 0.6313725490196078, 0.6333333333333333, 0.6352941176470588, 0.6372549019607843, 0.6392156862745098, 0.6411764705882352, 0.6431372549019607, 0.6450980392156863, 0.6470588235294118, 0.6490196078431373, 0.6509803921568628, 0.6529411764705882, 0.6549019607843137, 0.6568627450980392, 0.6588235294117647, 0.6607843137254902, 0.6627450980392157, 0.6647058823529411, 0.6666666666666666, 0.6686274509803922, 0.6705882352941177, 0.6725490196078432, 0.6745098039215687, 0.6764705882352942, 0.6784313725490196, 0.6803921568627451, 0.6823529411764706, 0.6843137254901961, 0.6862745098039216, 0.6882352941176471, 0.6901960784313725, 0.692156862745098, 0.6941176470588235, 0.696078431372549, 0.6980392156862745, 0.7, 0.7019607843137254, 0.7039215686274509, 0.7058823529411764, 0.707843137254902, 0.7098039215686275, 0.711764705882353, 0.7137254901960784, 0.7156862745098039, 0.7176470588235294, 0.7196078431372549, 0.7215686274509804, 0.7235294117647059, 0.7254901960784313, 0.7274509803921568, 0.7294117647058823, 0.7313725490196079, 0.7333333333333334, 0.7352941176470589, 0.7372549019607844, 0.7392156862745098, 0.7411764705882353, 0.7431372549019608, 0.7450980392156863, 0.7470588235294118, 0.7490196078431373, 0.7509803921568627, 0.7529411764705882, 0.7549019607843137, 0.7568627450980392, 0.7588235294117647, 0.7607843137254902, 0.7627450980392156, 0.7647058823529411, 0.7666666666666666, 0.7686274509803921, 0.7705882352941176, 0.7725490196078431, 0.7745098039215687, 0.7764705882352941, 0.7784313725490196, 0.7803921568627451, 0.7823529411764706, 0.7843137254901961, 0.7862745098039216, 0.788235294117647, 0.7901960784313726, 0.7921568627450981, 0.7941176470588236, 0.7960784313725491, 0.7980392156862746, 0.8, 0.8019607843137255, 0.803921568627451, 0.8058823529411765, 0.807843137254902, 0.8098039215686275, 0.8117647058823529, 0.8137254901960784, 0.8156862745098039, 0.8176470588235294, 0.8196078431372549, 0.8215686274509804, 0.8235294117647058, 0.8254901960784313, 0.8274509803921568, 0.8294117647058823, 0.8313725490196078, 0.8333333333333333, 0.8352941176470587, 0.8372549019607843, 0.8392156862745098, 0.8411764705882353, 0.8431372549019608, 0.8450980392156863, 0.8470588235294118, 0.8490196078431372, 0.8509803921568627, 0.8529411764705883, 0.8549019607843138, 0.8568627450980393, 0.8588235294117648, 0.8607843137254902, 0.8627450980392157, 0.8647058823529412, 0.8666666666666667, 0.8686274509803922, 0.8705882352941177, 0.8725490196078431, 0.8745098039215686, 0.8764705882352941, 0.8784313725490196, 0.8803921568627451, 0.8823529411764706, 0.884313725490196, 0.8862745098039215, 0.888235294117647, 0.8901960784313725, 0.892156862745098, 0.8941176470588235, 0.896078431372549, 0.8980392156862744, 0.9, 0.9019607843137255, 0.903921568627451, 0.9058823529411765, 0.907843137254902, 0.9098039215686274, 0.9117647058823529, 0.9137254901960784, 0.915686274509804, 0.9176470588235295, 0.919607843137255, 0.9215686274509804, 0.9235294117647059, 0.9254901960784314, 0.9274509803921569, 0.9294117647058824, 0.9313725490196079, 0.9333333333333333, 0.9352941176470588, 0.9372549019607843, 0.9392156862745098, 0.9411764705882353, 0.9431372549019608, 0.9450980392156862, 0.9470588235294117, 0.9490196078431372, 0.9509803921568627, 0.9529411764705882, 0.9549019607843137, 0.9568627450980391, 0.9588235294117646, 0.9607843137254901, 0.9627450980392157, 0.9647058823529412, 0.9666666666666667, 0.9686274509803922, 0.9705882352941176, 0.9725490196078431, 0.9745098039215686, 0.9764705882352941, 0.9784313725490197, 0.9803921568627452, 0.9823529411764707, 0.9843137254901961, 0.9862745098039216, 0.9882352941176471, 0.9901960784313726, 0.9921568627450981, 0.9941176470588236, 0.996078431372549, 0.9980392156862745 ]) self.assertEqual(255, len(step_intensity))