[GIS] Error in Google Earth Engine: ‘Error generating chart: No features contain non-null values of “system:time_start”‘

google-earth-enginesentinel 5p

I try to apply an expression to the satellite image and then try to chart the mean of the series of images but I'm getting this error:

"Error generating chart: No features contain non-null values of
"system:time_start"

Link to the code:
https://code.earthengine.google.com/c977a6ea5b61ec830b15835036e64c97

Code:

var app = function (image)
{
var conv = image.expression(
    'band/(4.4615*10**-4)',  //formula for coverting mol/m2 to DU(Dobson)
    {
        band: image.select('SO2_column_number_density'),   
  });

return  conv;
};

// Load the sentinel data
var sentinel = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_SO2')
.filterDate('2019-04-01', '2019-04-21')
.map(app)


//Identify country
var region = ee.FeatureCollection("ft:1p_3AqEj1T9fG0BNu6pGqmP6_HdDOalruzpk54Ne8");
Map.addLayer(region);

Map.addLayer(sentinel)



var TS5 = Chart.image.series(sentinel, region, ee.Reducer.mean(),1000, 'system:time_start').setOptions({
          title: 'pollutants Full Time Series',
          vAxis: {title: 'mol/m2'},
});
print(TS5);

Best Answer

using an image expression, the image will losse it's original properties. Copy the properties of the source (image) to the new image (conv):

var app = function (image)
{
var conv = image.expression(
    'band/(4.4615*10**-4)',  //formula for coverting mol/m2 to DU(Dobson)
    {
        band: image.select('SO2_column_number_density'),   
  });

return  ee.Image(conv.copyProperties(image)).set('system:time_start', image.get('system:time_start'));
};
Related Question