The below code has written for ASTER radiometric correction in Google Earth Engine but in visualization step, returns this error:
code link:https://code.earthengine.google.com/3ccaaaa0e9ce68bdf80b8056be5d057d
Map.centerObject(table);
Map.addLayer(table)
var ast = ee.ImageCollection("ASTER/AST_L1T_003")
.filterDate('2000-01-01','2020-01-01')
.filterBounds(table)
.filter(ee.Filter.calendarRange(7,9,'month'))
.select('B0[4-9]')
.map(function(img){
var gain4 = ee.Image(ee.Number(img.select('B04').get('GAIN_COEFFICIENT_B04')));
var gain5 = ee.Image(ee.Number(img.select('B05').get('GAIN_COEFFICIENT_B05')));
var gain6 = ee.Image(ee.Number(img.select('B06').get('GAIN_COEFFICIENT_B06')));
var gain7 = ee.Image(ee.Number(img.select('B07').get('GAIN_COEFFICIENT_B07')));
var gain8 = ee.Image(ee.Number(img.select('B08').get('GAIN_COEFFICIENT_B08')));
var gain9 = ee.Image(ee.Number(img.select('B08').get('GAIN_COEFFICIENT_B09')));
var b4 = img.select('B04').multiply(gain4).clip(table);
var b5 = img.select('B05').multiply(gain5).clip(table);
var b6 = img.select('B06').multiply(gain6).clip(table);
var b7 = img.select('B07').multiply(gain7).clip(table);
var b8 = img.select('B08').multiply(gain8).clip(table);
var b9 = img.select('B09').multiply(gain9).clip(table);
var stack = ee.Image.cat([b4,b5,b6,b7,b8,b9]);
return stack
}).median();
print(ast);
Map.addLayer(ast)