I am trying to multiply a monthly imageCollection by a different number depending on the month. What I want is to multiply all the pixels of the first 12 months by 0.85, the following 12 months by 0.95, the following 12 by 0.65. All this for a total of 468 months from 1981 to 2019 (the example contains only 2 years, 24 months).
var monthly_sum = ee.List.sequence(0, 2*12).map(function(n) { // .sequence: number of years from starting year to present
var start = ee.Date('1981-01-01').advance(n, 'month'); // Starting date
var end = start.advance(1, 'month'); // Step by each iteration
return ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.filterDate(start, end)
.sum()
.set('system:time_start', start.millis());
});
print(monthly_sum)
var my_list = ee.List([]);
var otherList = ee.List([0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.884748080310752,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95,
0.95
])
Which would be the easiest way to multiply each monthly image by the corresponding multiplicative factor creating a new imageCollection?
Thanks,