diff --git a/python/s2snow/lis_constant.py b/python/s2snow/lis_constant.py index 6491a59043593474342d017481314ac4aa961b82..79aa847009d574d666dfad2900ebd1e2cb87fa4b 100755 --- a/python/s2snow/lis_constant.py +++ b/python/s2snow/lis_constant.py @@ -121,3 +121,6 @@ OUTPUT_UNDEFINED = 9 MUSCATE_DATETIME_FORMAT = "%Y%m%d-%H%M%S-%f" LANDSAT_DATETIME_FORMAT = "%Y%m%d" LIS_DATETIME_FORMAT = "%Y%m%dT%H%M%S" + +# DOI +DOI_URL = "https://doi.org/10.24400/329360/F7Q52MNK" diff --git a/python/s2snow/snow_detector.py b/python/s2snow/snow_detector.py index b5b48a507080722fb975dfede8455d7e9d1994a1..5079230cd17ab69c47e6d853d22bc06f46b10b8a 100755 --- a/python/s2snow/snow_detector.py +++ b/python/s2snow/snow_detector.py @@ -40,7 +40,7 @@ from s2snow.lis_constant import N_GREEN, N_SWIR, N_RED, GDAL_OPT, LABEL_NO_DATA, NO_DATA_MASK, DEM_RESAMPLED, CLOUD_PASS1, HISTOGRAM, \ SLOPE_MASK, GREEN, RED, SWIR, SNOW_PASS2, SNOW_PASS2_VEC, \ SNOW_PASS3, SNOW_PASS3_VEC, SNOW_MASK, SNOW_ALL, NDSI, FSCTOC, SNOW_VEC, METADATA, SNOW_PASS1, TMP_DIR, \ - MODE_SENTINEL2, MISSION_S2 + MODE_SENTINEL2, MISSION_S2, DOI_URL from s2snow.qc_flags import edit_lis_fsc_qc_layers from s2snow.resolution import define_band_resolution, adapt_to_target_resolution @@ -821,7 +821,7 @@ def create_metadata(final_mask_file, output_dir, product_id, zs): root = etree.Element("Source_Product") etree.SubElement(root, "PRODUCT_ID").text = product_id - etree.SubElement(root, "DOI").text = "https://doi.org/10.24400/329360/F7Q52MNK" + etree.SubElement(root, "DOI").text = DOI_URL egil = etree.SubElement(root, "Global_Index_List") etree.SubElement(egil, "QUALITY_INDEX", name='ZS').text = str(zs) etree.SubElement( diff --git a/python/s2snow/snow_synthesis.py b/python/s2snow/snow_synthesis.py index 6e4e89ac8d1615715f8eb8e935deb29a8a057f8d..805423d3a126775a18e49dcff19f6f837bcf2707 100755 --- a/python/s2snow/snow_synthesis.py +++ b/python/s2snow/snow_synthesis.py @@ -35,7 +35,7 @@ from otbApplication import ImagePixelType_uint8, ImagePixelType_uint16 # Import python decorators for the different needed OTB applications from s2snow.compute_NOBS import compute_NOBS from s2snow.compute_SOD_SMOD import compute_SOD_SMOD -from s2snow.lis_constant import TMP_DIR, OUTPUT_DATES_FILE +from s2snow.lis_constant import TMP_DIR, OUTPUT_DATES_FILE, DOI_URL from s2snow.lis_exception import NoProductMatchingSynthesis from s2snow.otb_wrappers import band_math, super_impose, band_mathX, gap_filling, get_app_output from s2snow.snow_product import SnowProduct @@ -200,7 +200,7 @@ def create_snow_annual_map_metadata(product_list, output_dir): metadata_path = op.join(output_dir, "LIS_METADATA.XML") logging.info("Metadata file: %s", metadata_path) root = etree.Element("INPUTS_LIST") - etree.SubElement(root, "DOI").text = "https://doi.org/10.24400/329360/F7Q52MNK" + etree.SubElement(root, "DOI").text = DOI_URL for product_path in product_list: logging.debug("Product path: {}".format(product_path)) product_name = op.basename(str(product_path))