{
"cells": [
{
"cell_type": "markdown",
"id": "7743b033-a592-4486-8444-27f550b0a7e9",
"metadata": {},
"source": [
"# Grid alignment, ASF PC\n",
"\n",
"Goal is to put ASF, PC data on the same grid in order to compare the two datasets with the layover-shadow mask of the ASF dataset applied to the PC dataset as well (maybe the inclusion of layover/shadow pixels in the PC dataset that are excldued from the ASF dataset is resonsible for the observed offset between the two when comparing spatial mean backscatter over time)\n",
"\n",
"Steps:\n",
"1. downsample: PC dataset is 10m resolution, ASF is 30m. want to downsample PC to spatial resolution of ASF (i'm using `interp_like()` currently)\n",
"2. once they are on the same grid, mask PC dataset where ASF = nan"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "ebe57314-108a-4b93-9956-311dd145f990",
"metadata": {},
"outputs": [],
"source": [
"import xarray as xr\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "92d3908a-2d41-45e0-912d-04cd76dc0aa4",
"metadata": {},
"outputs": [],
"source": [
"%store -r "
]
},
{
"cell_type": "markdown",
"id": "1d7118a1-f021-4eea-92aa-957c2db9c13d",
"metadata": {},
"source": [
"## Initial setup\n",
"\n",
"Read in data and subset both datasets to only common acquisitions between the two (drops a handful of time steps )"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "1a28e6d6-4d72-4aee-8839-093e511a4128",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
array(['Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with horizontal polarization with radiometric terrain correction applied.',\n",
" 'Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with vertical polarization with radiometric terrain correction applied.'],\n",
" dtype='<U173')
array(['Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with horizontal polarization with radiometric terrain correction applied.',\n",
" 'Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with vertical polarization with radiometric terrain correction applied.'],\n",
" dtype='<U173')
array(['Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with horizontal polarization with radiometric terrain correction applied.',\n",
" 'Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with vertical polarization with radiometric terrain correction applied.'],\n",
" dtype='<U173')
array('Terrain-corrected gamma naught values of signal transmitted with vertical polarization and received with vertical polarization with radiometric terrain correction applied.',\n",
" dtype='<U173')