From 9f993783e94b17bfe23cca6eb1194f17c26b6f52 Mon Sep 17 00:00:00 2001 From: Imam Alam Date: Tue, 3 Dec 2019 16:01:59 +1100 Subject: [PATCH] ARD intercomparison tools notebook niceness (#448) --- .../compare_products_opensource.ipynb | 411 +++++------------- .../settings/LS8_GA-LAM_USGS.cfg | 23 + .../settings/LS8_GA-NBART_USGS.cfg | 23 + .../settings/LS8_GA-NBAR_USGS.cfg | 23 + .../settings/LS8_GA-all_USGS.cfg | 23 + 5 files changed, 192 insertions(+), 311 deletions(-) create mode 100644 DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-LAM_USGS.cfg create mode 100644 DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBART_USGS.cfg create mode 100644 DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBAR_USGS.cfg create mode 100644 DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-all_USGS.cfg diff --git a/DEA_sandbox/ARD_Intercomparison/compare_products_opensource.ipynb b/DEA_sandbox/ARD_Intercomparison/compare_products_opensource.ipynb index 5b1ff645f..610350254 100644 --- a/DEA_sandbox/ARD_Intercomparison/compare_products_opensource.ipynb +++ b/DEA_sandbox/ARD_Intercomparison/compare_products_opensource.ipynb @@ -59,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 11, "metadata": { "extensions": { "jupyter_dashboards": { @@ -82,27 +82,28 @@ "outputs": [ { "data": { - "text/html": [ - "" - ], - "text/vnd.plotly.v1+html": [ - "" + "application/vnd.jupyter.widget-view+json": { + "model_id": "dd096d6a146d4da9949a8d2e084ebd65", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Box(children=(Box(children=(Label(value='Database source'), Text(value='examples/database_sources.txt')), layo…" ] }, "metadata": {}, "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of location/time loaded so far: 1\n", + "Combination of location and time: ((142.9382, -22.5273), ('2018-01-01', '2018-03-31'))\r\n", + "ls8_ard: Number of data: 6\r\n", + "ls8_usgs_l2c1: Number of data: 6\r\n", + "ls8_ard: Number of data: 6\r\n" + ] } ], "source": [ @@ -124,47 +125,12 @@ "from os.path import join as pjoin\n", "import os\n", "\n", - "plotly.offline.init_notebook_mode()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Step 1: Load relevant data from Datacube" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": { - "col": 4, - "height": 4, - "hidden": false, - "row": 54, - "width": 4 - }, - "report_default": { - "hidden": false - } - } - } - } - }, - "source": [ - "## Functions of setting up the GUI for data loading" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ + "plotly.offline.init_notebook_mode()\n", + "\n", + "# Step 1: Load relevant data from Datacube\n", + "\n", + "## Functions of setting up the GUI for data loading\n", + "\n", "def set_database_choices_against_config(sender):\n", " config_file = config_input.value\n", " try:\n", @@ -175,15 +141,8 @@ " database_choices.value = content[0]\n", " except FileNotFoundError:\n", " print(\"File not found. Check the path variable and filename\")\n", - " exit() " - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ + " exit() \n", + "\n", "def set_product_choices_against_database(change):\n", " database_choices.value = change['new']\n", " if '.csv' not in database_choices.value:\n", @@ -196,15 +155,8 @@ " list_products.value = db_listed_products[0]\n", " else: \n", " list_products.options = ['field_data']\n", - " list_products.value = list_products.options[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ + " list_products.value = list_products.options[0]\n", + "\n", "def set_band_choices_against_product(change):\n", " list_products.value = change['new']\n", " \n", @@ -217,84 +169,32 @@ " list_bands.options = list(meas.loc[meas.index.get_level_values(0) == list_products.value].index.get_level_values(1))\n", " list_bands.value = [list_bands.options[0]]\n", " mask_band.options = list(meas.loc[meas.index.get_level_values(0) == list_products.value].index.get_level_values(1))\n", - " mask_band.value = mask_band.options[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ + " mask_band.value = mask_band.options[0]\n", + "\n", "def get_band_values(change):\n", - " list_bands.value = change['new']" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ + " list_bands.value = change['new']\n", + "\n", "def get_mask_band_value(change):\n", - " mask_band.value = change['new']" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ + " mask_band.value = change['new']\n", + "\n", "def if_remove_partial(change):\n", - " remove_partial_scenes.value = change['new']" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ + " remove_partial_scenes.value = change['new']\n", + "\n", "def if_common_dates(change):\n", - " choose_common_dates.value = change['new']" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Step 2 Retrive relevant bands from loaded data and plot" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Functions to set up a GUI, define plotting options and plot the statistical value" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ + " choose_common_dates.value = change['new']\n", + "\n", + "# Step 2 Retrive relevant bands from loaded data and plot\n", + "\n", + "## Functions to set up a GUI, define plotting options and plot the statistical value\n", + "\n", "def retrieve_products_against_loctime(change):\n", " available_loc_time.value = change['new']\n", " orig_loc_time = convert2original_loc_time(available_loc_time.value) \n", " retrieved_products = sorted(list(set([list(prod.keys())[0] for prod in loaded_data_list[orig_loc_time] if prod])))\n", " if len(retrieved_products) > 0:\n", " available_products.options = retrieved_products\n", - " available_products.value = retrieved_products[0] " - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ + " available_products.value = retrieved_products[0] \n", + "\n", "def retrieve_bands_against_product(change):\n", " available_products.value = change['new']\n", " orig_loc_time = convert2original_loc_time(available_loc_time.value)\n", @@ -308,32 +208,13 @@ " bands.extend(plotting_bands_list)\n", " \n", " available_bands.options = sorted(list(set(bands)))\n", - " available_bands.value = [bands[0]]" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ + " available_bands.value = [bands[0]]\n", + "\n", "def retrieve_band_values(change):\n", - " available_bands.value = change['new'] " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Loading data via a GUI" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ + " available_bands.value = change['new'] \n", + "\n", + "## Loading data via a GUI\n", + "\n", "def on_add_prod_button_clicked(b):\n", " clear_output(wait=True)\n", " display(form) \n", @@ -381,15 +262,8 @@ " if exist == 0:\n", " added_product_reports.append((datacube_config, source_prod, all_bands_list, the_mask_band))\n", " else:\n", - " added_product_reports.append((datacube_config, source_prod, all_bands_list, the_mask_band)) " - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ + " added_product_reports.append((datacube_config, source_prod, all_bands_list, the_mask_band)) \n", + "\n", "def load_data(products_to_load, output_data_list):\n", " \n", " if len(products_to_load) > 0: \n", @@ -473,27 +347,13 @@ " print ('{}: Number of data: {}\\r'.format(prod_name, len(item[prod_name]['data'].time)))\n", " log.info('{}: Number of data: {}\\r'.format(prod_name, len(item[prod_name]['data'].time))) \n", " else:\n", - " print ('No products added for loading')" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ + " print ('No products added for loading')\n", + "\n", "def on_extract_button_clicked(b):\n", " clear_output(wait=True)\n", " display(form) \n", - " load_data(added_product, loaded_data_list)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ + " load_data(added_product, loaded_data_list)\n", + "\n", "def on_output_button_clicked(b):\n", " clear_output(wait=True)\n", " display(form)\n", @@ -502,15 +362,8 @@ " log.info('Step 1: load all bands ...')\n", " load_data(added_product_reports, loaded_data_list_reports)\n", " log.info('Step 2: produce output csv files ...')\n", - " produce_reports(report_folder, loaded_data_list_reports, choose_common_dates.value) " - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ + " produce_reports(report_folder, loaded_data_list_reports, choose_common_dates.value) \n", + "\n", "def on_load_setting_button_clicked(b):\n", " \n", " existing_settings = Dropdown(\n", @@ -546,15 +399,8 @@ " loc_input.selected_index = config.get('Settings', 'loc_input')\n", " \n", " added_product.extend(ast.literal_eval(config.get('Settings', 'added_product')))\n", - " added_product_reports.extend(ast.literal_eval(config.get('Settings', 'added_product_reports')))" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [], - "source": [ + " added_product_reports.extend(ast.literal_eval(config.get('Settings', 'added_product_reports')))\n", + "\n", "def on_save_setting_button_clicked(b):\n", " \n", " setting_file = pjoin(settings_folder, '{}.cfg'.format(new_setting.value))\n", @@ -589,49 +435,8 @@ " out_txt.write('added_product = {}\\n'.format(added_product))\n", " out_txt.write('added_product_reports = {}\\n'.format(added_product_reports))\n", " \n", - " out_txt.close()" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": { - "col": 0, - "height": 41, - "hidden": false, - "row": 60, - "width": null - }, - "report_default": { - "hidden": false - } - } - } - }, - "scrolled": false - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "a10c0fdaace74d1f873e0ee1b7b4459e", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Box(children=(Box(children=(Label(value='Database source'), Text(value='examples/database_sources.txt')), layo…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ + " out_txt.close()\n", + "\n", "# set up log file\n", "log_folder = create_sub_folder('.', 'logs')\n", "log_file = pjoin(log_folder, '{}.log'.format(str(datetime.now())))\n", @@ -798,9 +603,38 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "4618514665634f798a84634bb66277eb", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Box(children=(Box(children=(Label(value='location and time'), Dropdown(options=(\"(142.9382, -22.5273) and ('20…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "56c8c5bc22584c70877e2491c1fa9818", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "interactive(children=(Text(value='', description='Min value'), Text(value='', description='Max value'), Dropdo…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "def on_extract_band_button_clicked(b):\n", " clear_output(wait=True)\n", @@ -827,15 +661,8 @@ " loaded_prod_band_list[loc_time_orig][prod]['find_list'] = a_prod_data[prod]['find_list']\n", " break\n", " else:\n", - " print ('Select a location and time first')" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [], - "source": [ + " print ('Select a location and time first')\n", + "\n", "def on_plot_button_clicked(b):\n", " clear_output(wait=True)\n", " display(form) \n", @@ -872,46 +699,8 @@ " else:\n", " print ('No bands selected for plotting')\n", " else:\n", - " print ('Select a location and time first')" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "37c38342949b4214ad2ebe94fd7d592a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Box(children=(Box(children=(Label(value='location and time'), Dropdown(options=(\"(142.9382, -22.5273) and ('20…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "33a921324699486ea1d2f0f3035050ef", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Text(value='', description='Min value'), Text(value='', description='Max value'), Dropdo…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ + " print ('Select a location and time first')\n", + "\n", "log.info('\\n')\n", "log.info('Select and plot bands')\n", "\n", @@ -1057,7 +846,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.6.8" }, "toc": { "nav_menu": {}, @@ -1089,5 +878,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-LAM_USGS.cfg b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-LAM_USGS.cfg new file mode 100644 index 000000000..0d35f0cec --- /dev/null +++ b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-LAM_USGS.cfg @@ -0,0 +1,23 @@ +[Settings] +config_input = examples/database_sources.txt +database_choices_options = ('default',) +database_choices_value = default +list_products_options = ('fc_percentile_albers_annual', 'fc_percentile_albers_seasonal', 'ga_ls5t_ard_3', 'ga_ls7e_ard_3', 'ga_ls8c_ard_3', 'ga_s2a_ard_nbar_granule', 'ga_s2b_ard_nbar_granule', 'high_tide_comp_20p', 'item_v2', 'item_v2_conf', 'landsat_barest_earth', 'low_tide_comp_20p', 'ls5_ard', 'ls5_fc_albers', 'ls5_level1_usgs', 'ls5_nbart_geomedian_annual', 'ls5_nbart_tmad_annual', 'ls5_pq_albers', 'ls5_usgs_l2c1', 'ls7_ard', 'ls7_fc_albers', 'ls7_level1_usgs', 'ls7_nbart_geomedian_annual', 'ls7_nbart_tmad_annual', 'ls7_pq_albers', 'ls7_usgs_l2c1', 'ls8_ard', 'ls8_barest_earth_albers', 'ls8_fc_albers', 'ls8_level1_usgs', 'ls8_nbart_geomedian_annual', 'ls8_nbart_tmad_annual', 'ls8_pq_albers', 'ls8_usgs_l2c1', 'mangrove_cover', 'multi_scale_topographic_position', 'nidem', 's1_gamma0_geotif_scene', 's2a_ard_granule', 's2a_l1c_aws_pds', 's2a_level1c_granule', 's2a_nrt_granule', 's2b_ard_granule', 's2b_l1c_aws_pds', 's2b_level1c_granule', 's2b_nrt_granule', 'sentinel2_wofs_nrt', 'usgs_ls5t_level1_1', 'usgs_ls7e_level1_1', 'usgs_ls8c_level1_1', 'weathering_intensity', 'wofs_albers', 'wofs_annual_summary', 'wofs_apr_oct_summary', 'wofs_filtered_summary', 'wofs_nov_mar_summary', 'wofs_summary') +list_products_value = ls8_usgs_l2c1 +list_bands_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +list_bands_value = ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2') +mask_band_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +mask_band_value = quality +remove_partial_scenes = True +choose_common_dates = True +acq_min_input = 2018-01-01 +acq_max_input = 2018-03-31 +lon_input = 142.9382 +lat_input = -22.5273 +loc_file_input = examples/3_points.txt +window_size_input = 90.0 +single_polygon_input = examples/shp/test_plgon.shp +multiple_polygon_input = examples/shape_files.txt +loc_input = 0 +added_product = [('default', 'ls8_ard', ('lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'fmask'), 'fmask'), ('default', 'ls8_usgs_l2c1', ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality'), 'quality')] +added_product_reports = [('default', 'ls8_ard', ['azimuthal_exiting', 'azimuthal_incident', 'exiting', 'fmask', 'incident', 'lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_contiguity', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'nbar_coastal_aerosol', 'nbar_blue', 'nbar_contiguity', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'nbart_coastal_aerosol', 'nbart_blue', 'nbart_contiguity', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'relative_azimuth', 'relative_slope', 'satellite_azimuth', 'satellite_view', 'solar_azimuth', 'solar_zenith', 'terrain_shadow', 'timedelta'], 'fmask'), ('default', 'ls8_usgs_l2c1', ['sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2'], 'quality')] diff --git a/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBART_USGS.cfg b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBART_USGS.cfg new file mode 100644 index 000000000..7d140eab5 --- /dev/null +++ b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBART_USGS.cfg @@ -0,0 +1,23 @@ +[Settings] +config_input = examples/database_sources.txt +database_choices_options = ('default',) +database_choices_value = default +list_products_options = ('fc_percentile_albers_annual', 'fc_percentile_albers_seasonal', 'ga_ls5t_ard_3', 'ga_ls7e_ard_3', 'ga_ls8c_ard_3', 'ga_s2a_ard_nbar_granule', 'ga_s2b_ard_nbar_granule', 'high_tide_comp_20p', 'item_v2', 'item_v2_conf', 'landsat_barest_earth', 'low_tide_comp_20p', 'ls5_ard', 'ls5_fc_albers', 'ls5_level1_usgs', 'ls5_nbart_geomedian_annual', 'ls5_nbart_tmad_annual', 'ls5_pq_albers', 'ls5_usgs_l2c1', 'ls7_ard', 'ls7_fc_albers', 'ls7_level1_usgs', 'ls7_nbart_geomedian_annual', 'ls7_nbart_tmad_annual', 'ls7_pq_albers', 'ls7_usgs_l2c1', 'ls8_ard', 'ls8_barest_earth_albers', 'ls8_fc_albers', 'ls8_level1_usgs', 'ls8_nbart_geomedian_annual', 'ls8_nbart_tmad_annual', 'ls8_pq_albers', 'ls8_usgs_l2c1', 'mangrove_cover', 'multi_scale_topographic_position', 'nidem', 's1_gamma0_geotif_scene', 's2a_ard_granule', 's2a_l1c_aws_pds', 's2a_level1c_granule', 's2a_nrt_granule', 's2b_ard_granule', 's2b_l1c_aws_pds', 's2b_level1c_granule', 's2b_nrt_granule', 'sentinel2_wofs_nrt', 'usgs_ls5t_level1_1', 'usgs_ls7e_level1_1', 'usgs_ls8c_level1_1', 'weathering_intensity', 'wofs_albers', 'wofs_annual_summary', 'wofs_apr_oct_summary', 'wofs_filtered_summary', 'wofs_nov_mar_summary', 'wofs_summary') +list_products_value = ls8_usgs_l2c1 +list_bands_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +list_bands_value = ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2') +mask_band_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +mask_band_value = quality +remove_partial_scenes = True +choose_common_dates = True +acq_min_input = 2018-01-01 +acq_max_input = 2018-03-31 +lon_input = 142.9382 +lat_input = -22.5273 +loc_file_input = examples/3_points.txt +window_size_input = 90.0 +single_polygon_input = examples/shp/test_plgon.shp +multiple_polygon_input = examples/shape_files.txt +loc_input = 0 +added_product = [('default', 'ls8_ard', ('nbart_coastal_aerosol', 'nbart_blue', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'fmask'), 'fmask'), ('default', 'ls8_usgs_l2c1', ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality'), 'quality')] +added_product_reports = [('default', 'ls8_ard', ['azimuthal_exiting', 'azimuthal_incident', 'exiting', 'fmask', 'incident', 'lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_contiguity', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'nbar_coastal_aerosol', 'nbar_blue', 'nbar_contiguity', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'nbart_coastal_aerosol', 'nbart_blue', 'nbart_contiguity', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'relative_azimuth', 'relative_slope', 'satellite_azimuth', 'satellite_view', 'solar_azimuth', 'solar_zenith', 'terrain_shadow', 'timedelta'], 'fmask'), ('default', 'ls8_usgs_l2c1', ['sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2'], 'quality')] diff --git a/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBAR_USGS.cfg b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBAR_USGS.cfg new file mode 100644 index 000000000..63662c243 --- /dev/null +++ b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-NBAR_USGS.cfg @@ -0,0 +1,23 @@ +[Settings] +config_input = examples/database_sources.txt +database_choices_options = ('default',) +database_choices_value = default +list_products_options = ('fc_percentile_albers_annual', 'fc_percentile_albers_seasonal', 'ga_ls5t_ard_3', 'ga_ls7e_ard_3', 'ga_ls8c_ard_3', 'ga_s2a_ard_nbar_granule', 'ga_s2b_ard_nbar_granule', 'high_tide_comp_20p', 'item_v2', 'item_v2_conf', 'landsat_barest_earth', 'low_tide_comp_20p', 'ls5_ard', 'ls5_fc_albers', 'ls5_level1_usgs', 'ls5_nbart_geomedian_annual', 'ls5_nbart_tmad_annual', 'ls5_pq_albers', 'ls5_usgs_l2c1', 'ls7_ard', 'ls7_fc_albers', 'ls7_level1_usgs', 'ls7_nbart_geomedian_annual', 'ls7_nbart_tmad_annual', 'ls7_pq_albers', 'ls7_usgs_l2c1', 'ls8_ard', 'ls8_barest_earth_albers', 'ls8_fc_albers', 'ls8_level1_usgs', 'ls8_nbart_geomedian_annual', 'ls8_nbart_tmad_annual', 'ls8_pq_albers', 'ls8_usgs_l2c1', 'mangrove_cover', 'multi_scale_topographic_position', 'nidem', 's1_gamma0_geotif_scene', 's2a_ard_granule', 's2a_l1c_aws_pds', 's2a_level1c_granule', 's2a_nrt_granule', 's2b_ard_granule', 's2b_l1c_aws_pds', 's2b_level1c_granule', 's2b_nrt_granule', 'sentinel2_wofs_nrt', 'usgs_ls5t_level1_1', 'usgs_ls7e_level1_1', 'usgs_ls8c_level1_1', 'weathering_intensity', 'wofs_albers', 'wofs_annual_summary', 'wofs_apr_oct_summary', 'wofs_filtered_summary', 'wofs_nov_mar_summary', 'wofs_summary') +list_products_value = ls8_usgs_l2c1 +list_bands_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +list_bands_value = ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2') +mask_band_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +mask_band_value = quality +remove_partial_scenes = True +choose_common_dates = True +acq_min_input = 2018-01-01 +acq_max_input = 2018-03-31 +lon_input = 142.9382 +lat_input = -22.5273 +loc_file_input = examples/3_points.txt +window_size_input = 90.0 +single_polygon_input = examples/shp/test_plgon.shp +multiple_polygon_input = examples/shape_files.txt +loc_input = 0 +added_product = [('default', 'ls8_ard', ('nbar_coastal_aerosol', 'nbar_blue', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'fmask'), 'fmask'), ('default', 'ls8_usgs_l2c1', ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality'), 'quality')] +added_product_reports = [('default', 'ls8_ard', ['azimuthal_exiting', 'azimuthal_incident', 'exiting', 'fmask', 'incident', 'lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_contiguity', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'nbar_coastal_aerosol', 'nbar_blue', 'nbar_contiguity', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'nbart_coastal_aerosol', 'nbart_blue', 'nbart_contiguity', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'relative_azimuth', 'relative_slope', 'satellite_azimuth', 'satellite_view', 'solar_azimuth', 'solar_zenith', 'terrain_shadow', 'timedelta'], 'fmask'), ('default', 'ls8_usgs_l2c1', ['sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2'], 'quality')] diff --git a/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-all_USGS.cfg b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-all_USGS.cfg new file mode 100644 index 000000000..466455759 --- /dev/null +++ b/DEA_sandbox/ARD_Intercomparison/settings/LS8_GA-all_USGS.cfg @@ -0,0 +1,23 @@ +[Settings] +config_input = examples/database_sources.txt +database_choices_options = ('default',) +database_choices_value = default +list_products_options = ('fc_percentile_albers_annual', 'fc_percentile_albers_seasonal', 'ga_ls5t_ard_3', 'ga_ls7e_ard_3', 'ga_ls8c_ard_3', 'ga_s2a_ard_nbar_granule', 'ga_s2b_ard_nbar_granule', 'high_tide_comp_20p', 'item_v2', 'item_v2_conf', 'landsat_barest_earth', 'low_tide_comp_20p', 'ls5_ard', 'ls5_fc_albers', 'ls5_level1_usgs', 'ls5_nbart_geomedian_annual', 'ls5_nbart_tmad_annual', 'ls5_pq_albers', 'ls5_usgs_l2c1', 'ls7_ard', 'ls7_fc_albers', 'ls7_level1_usgs', 'ls7_nbart_geomedian_annual', 'ls7_nbart_tmad_annual', 'ls7_pq_albers', 'ls7_usgs_l2c1', 'ls8_ard', 'ls8_barest_earth_albers', 'ls8_fc_albers', 'ls8_level1_usgs', 'ls8_nbart_geomedian_annual', 'ls8_nbart_tmad_annual', 'ls8_pq_albers', 'ls8_usgs_l2c1', 'mangrove_cover', 'multi_scale_topographic_position', 'nidem', 's1_gamma0_geotif_scene', 's2a_ard_granule', 's2a_l1c_aws_pds', 's2a_level1c_granule', 's2a_nrt_granule', 's2b_ard_granule', 's2b_l1c_aws_pds', 's2b_level1c_granule', 's2b_nrt_granule', 'sentinel2_wofs_nrt', 'usgs_ls5t_level1_1', 'usgs_ls7e_level1_1', 'usgs_ls8c_level1_1', 'weathering_intensity', 'wofs_albers', 'wofs_annual_summary', 'wofs_apr_oct_summary', 'wofs_filtered_summary', 'wofs_nov_mar_summary', 'wofs_summary') +list_products_value = ls8_usgs_l2c1 +list_bands_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +list_bands_value = ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2') +mask_band_options = ('sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2') +mask_band_value = quality +remove_partial_scenes = True +choose_common_dates = True +acq_min_input = 2018-01-01 +acq_max_input = 2018-03-31 +lon_input = 142.9382 +lat_input = -22.5273 +loc_file_input = examples/3_points.txt +window_size_input = 90.0 +single_polygon_input = examples/shp/test_plgon.shp +multiple_polygon_input = examples/shape_files.txt +loc_input = 0 +added_product = [('default', 'ls8_ard', ('lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'nbar_coastal_aerosol', 'nbar_blue', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'nbart_coastal_aerosol', 'nbart_blue', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'fmask'), 'fmask'), ('default', 'ls8_usgs_l2c1', ('coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality'), 'quality')] +added_product_reports = [('default', 'ls8_ard', ['azimuthal_exiting', 'azimuthal_incident', 'exiting', 'fmask', 'incident', 'lambertian_coastal_aerosol', 'lambertian_blue', 'lambertian_contiguity', 'lambertian_green', 'lambertian_nir', 'lambertian_red', 'lambertian_swir_1', 'lambertian_swir_2', 'nbar_coastal_aerosol', 'nbar_blue', 'nbar_contiguity', 'nbar_green', 'nbar_nir', 'nbar_red', 'nbar_swir_1', 'nbar_swir_2', 'nbart_coastal_aerosol', 'nbart_blue', 'nbart_contiguity', 'nbart_green', 'nbart_nir', 'nbart_red', 'nbart_swir_1', 'nbart_swir_2', 'relative_azimuth', 'relative_slope', 'satellite_azimuth', 'satellite_view', 'solar_azimuth', 'solar_zenith', 'terrain_shadow', 'timedelta'], 'fmask'), ('default', 'ls8_usgs_l2c1', ['sr_aerosol', 'coastal_aerosol', 'blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'quality', 'radsat_qa', 'lwir1', 'lwir2'], 'quality')]