I'm trying to download all the images for a certain month (February) for 2018 from Proba-V. Proba-V produces images every 2 days. Here is the link of the product. I am following this post on how to do it. When running my code I receive the following error:
Line 36: Required argument (image2) missing to function: Image.first(image1, image2)
Selects the value of the first value for each matched pair of bands in image1 and image2. If either image1 or image2 has only 1 band, then it is used against all the bands in the other image. If the images have the same number of bands, but not the same names, they're used pairwise in the natural order. The output bands are named for the longer of the two inputs, or if they're equal in length, in image1's order. The type of the output pixels is the union of the input types.
Args:
image1 (Image): The image from which the left operand bands are taken.
image2 (Image): The image from which the right operand bands are taken.
How can I download all images (not as layer stack) for February 2018?
Here is the code:
// Project the image to Mollweide.
var wkt = ' \
PROJCS["World_Mollweide", \
GEOGCS["GCS_WGS_1984", \
DATUM["WGS_1984", \
SPHEROID["WGS_1984",6378137,298.257223563]], \
PRIMEM["Greenwich",0], \
UNIT["Degree",0.017453292519943295]], \
PROJECTION["Mollweide"], \
PARAMETER["False_Easting",0], \
PARAMETER["False_Northing",0], \
PARAMETER["Central_Meridian",0], \
UNIT["Meter",1], \
AUTHORITY["EPSG","54009"]]';
var proj_mollweide = ee.Projection(wkt);
var era5_2mt = ee.ImageCollection('VITO/PROBAV/C1/S1_TOC_100M')
.select('NDVI')
.filter(ee.Filter.calendarRange(2018,2018,'year'))
.filter(ee.Filter.calendarRange(02,02,'month'))
// clip to your study area
.map(function(image) {return image.clip(table)});
var study_area = era5_2mt.map(function(img){
var s_ts = img.get('system:time_start') // get the 'system:time start' property from the image
img = ee.Image(img)
.subtract(20)
.divide(250)
.set({'system:time_start': s_ts}); // set the 'system:time_start' property from the output image
return(img);
});
var merged = study_area.toBands();
var image_mollweide = merged.first();
// export image to Google Drive
Export.image.toDrive({
image: merged,
description: 'era5_2mt',
scale: 100,
region: table
});
And the shapefile I am using.