I am trying to convert ASTER image from DN values to reflectance. For this I require gain coefficient of each image in the collection I have gathered.
//Defining geometry
var geometry = ee.Geometry.Polygon([[72.8,29.8], [74.7,28.27], [77.6,30.1], [75.6,31.6], [72.8,29.8]]);
//Creating collection
var collection = ee.ImageCollection('ASTER/AST_L1T_003')
.filterBounds(geometry)
.filterMetadata('CLOUDCOVER', 'less_than', 2)
//.filterDate('2004-01-01', '2004-03-28')
;
print('Collection: ', collection);
//Filtering data for specific day of year
var collection_121_134 = collection.filter(ee.Filter.dayOfYear(121,134));
Now this collection_121_134 contains 59 elements (i.e. 59 image tiles). For each tile I want to access its gain coefficient value which is found in: Collection>>features( total no of tiles)>>any tile selected>>properties>>'GAIN_COEFFICIENT_B01'.
Please suggest a method through which I can access this information, which will help me in converting the images to their reflectance values.
.map()
over a collection you can access the metadata with.get()
(in your case.get("GAIN_COEFFICIENT_B01")
). All you need to do is create a function to calculate the reflectance and then use map to apply it to every image in the collection.