diff --git a/doc/equalize-histogram.rst b/doc/equalize-histogram.rst index 63e82fb..4a92923 100644 --- a/doc/equalize-histogram.rst +++ b/doc/equalize-histogram.rst @@ -69,12 +69,14 @@ equalization in :func:`xlandsat.equalize_histogram`. .. tip:: It can be helpful to do a bit of contrast stretching first, but to a lesser - degree than we did previously. + degree than we did previously. It's also a good idea to use "float32" for + the composite to give it a larger range of color values (but this requires + more RAM). .. jupyter-execute:: - rgb = xls.composite(scene, rescale_to=(0, 0.6)) - rgb_eq = xls.equalize_histogram(rgb, clip_limit=0.02, kernel_size=300) + rgb = xls.composite(scene, rescale_to=(0, 0.8), dtype="float32") + rgb_eq = xls.equalize_histogram(rgb, clip_limit=0.04, kernel_size=300) fig, ax = plt.subplots(1, 1, figsize=(10, 6)) rgb_eq.plot.imshow(ax=ax) diff --git a/doc/missing-values.rst b/doc/missing-values.rst index b9df8d3..0108010 100644 --- a/doc/missing-values.rst +++ b/doc/missing-values.rst @@ -1,7 +1,7 @@ .. _missing-values: -Filling missing values -====================== +Fill missing values +=================== Landsat Level 2 data can sometimes contain missing values, particularly around bright clouds with dark shadows. These pixels will have a value of @@ -11,7 +11,8 @@ can use the values of neighboring pixels to interpolate the missing values with Let's use our sample scene of the December 2015 eruption of `Momotombo volcano `__, Nicaragua, to demonstrate how -it's done. +it's done. The Level 2 version of this scene has several holes because of the +clouds and smoke from the volcano affecting the atmospheric correction method. First, we'll import the required packages and load the sample scene: @@ -32,7 +33,7 @@ the missing values don't simply show up as white: .. jupyter-execute:: # Make the composite and add it to the scene - rgb = xls.composite(scene, rescale_to=(0.04, 0.17)) + rgb = xls.composite(scene, rescale_to=(0, 0.2)) fig, ax = plt.subplots(1, 1, figsize=(10, 6)) @@ -49,7 +50,7 @@ We can fill these values with reasonable estimates using interpolation: scene_filled = xls.interpolate_missing(scene) - rgb_filled = xls.composite(scene_filled, rescale_to=(0.04, 0.17)) + rgb_filled = xls.composite(scene_filled, rescale_to=(0, 0.2)) fig, ax = plt.subplots(1, 1, figsize=(10, 6))