<jupyter_start><jupyter_text>Swow On and Free Scenes<jupyter_code>from plot_helpers import *

plt.style.use('fivethirtyeight')
casi_data = PixelClassifier(CASI_DATA, CLOUD_MASK, VEGETATION_MASK)
hillshade = RasterFile(HILLSHADE, band_number=1).band_values()

snow_on_diff_data = RasterFile(SNOW_ON_DIFF, band_number=1)
band_values_snow_on_diff = snow_on_diff_data.band_values()
band_values_snow_on_diff_mask = band_values_snow_on_diff.mask.copy()

snow_free_diff_data = RasterFile(SNOW_FREE_DIFF, band_number=1)
band_values_snow_free_diff = snow_free_diff_data.band_values()
band_values_snow_free_diff_mask = band_values_snow_free_diff.mask.copy()<jupyter_output><empty_output><jupyter_text>Snow Pixels comparison<jupyter_code>band_values_snow_free_diff.mask = casi_data.snow_surfaces(band_values_snow_free_diff_mask)
band_values_snow_on_diff.mask = casi_data.snow_surfaces(band_values_snow_on_diff_mask)

ax = box_plot_compare(
    [
        band_values_snow_free_diff,
        band_values_snow_on_diff,
    ],
    [
        'SfM Bare Ground\n- Lidar Bare Ground', 
        'SfM Snow\n- Lidar Snow', 
    ],
)
ax.set_ylabel('$\Delta$ Elevation (m)')
ax.set_ylim([-1, 1]);
color_map = LinearSegmentedColormap.from_list(
    'snow_pixels',
    ['royalblue', 'none'],
    N=2
)

plt.figure(figsize=(6,6), dpi=150)
plt.imshow(hillshade, cmap='gray', clim=(1, 255), alpha=0.5)
plt.imshow(
    band_values_snow_on_diff.mask,
    cmap=color_map,
)
set_axes_style(plt.gca())
plt.xticks([])
plt.yticks([]);<jupyter_output><empty_output><jupyter_text>Stable Ground<jupyter_code>lidar_data = RasterFile(LIDAR_SNOW_DEPTH, band_number=1)
band_values_lidar = lidar_data.band_values()

sfm_data = RasterFile(SFM_SNOW_DEPTH, band_number=1)
band_values_sfm = sfm_data.band_values()
band_values_lidar.mask = casi_data.stable_surfaces(band_values_lidar.mask)
band_values_sfm.mask = casi_data.stable_surfaces(band_values_sfm.mask)
band_values_snow_on_diff.mask = casi_data.stable_surfaces(band_values_snow_on_diff_mask)
band_values_snow_free_diff.mask = casi_data.stable_surfaces(band_values_snow_free_diff_mask)

data_sources = [
    band_values_lidar,
    band_values_sfm,
    band_values_snow_on_diff,
    band_values_snow_free_diff,
]

labels=[
    'Lidar Snow\n Depth',
    'SfM Snow\n Depth',
    'Snow On\n Scenes',
    'Bare Ground\n Scenes',
]

ax = box_plot_compare(data_sources, labels)

ax.set_ylim([-1.2, 1.2]);
color_map = LinearSegmentedColormap.from_list(
    'snow_pixels',
    ['sienna', 'none'],
    N=2
)


plt.figure(figsize=(6,6), dpi=150)
plt.imshow(hillshade, cmap='gray', clim=(1, 255), alpha=0.5)
plt.imshow(
    band_values_snow_on_diff.mask,
    cmap=color_map,
)
set_axes_style(plt.gca())
plt.xticks([])
plt.yticks([]);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11924610366074664, 'fraction_numerical': 0.012685755708590069, 'mean_word_length': 6.645429362880886, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '3566', 'license': 'MIT', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1175, 'n_words': 132, 'path': 'notebooks/Lidar_comparison_AGU_2019/ERW_snow_on.ipynb', 'repo_name': 'jomey/raster_compare', 'size': '2759'}