Black image after band math in ENVI

Hello everyone,

When I use Snap to export resampled file to ENVI format. But the problem happened as i use band math in Envi (B1/10000) to convert to ToA data. The image after bandmath is black image. I don;t expect to get a black image like this. Do I use wrong band math ? Anybody can help me ?

As this is not an ENVI forum you might not get the best answers here.
However, I could imagine that the resulting band is integer and thus all values are 0. If you’re target band is floating point you will get values between 0.0 - 1.0.

if so, how can I get data from Snap in float before export to Envi ?

Actually they should be written correctly as integer values along with a gain value which scales them to the correct value.
The following shows the hdr file for B1. ‘data type = 12’ means unsigned 16 bit integer and ‘data gain values = {1.0E-4}’ divides the values by 10000.

ENVI
description = {Reflectance in band B1 - Unit: dl - Wavelength: 443.0nm}
samples = 805
lines = 433
bands = 1
header offset = 0
file type = ENVI Standard
data type = 12
interleave = bsq
byte order = 1
band names = { B1 }
map info = {UTM,404.0,218.0,733500.0,9850300.0,60.0,60.0,36,South,World Geodetic System 1984,units=Meters}
coordinate system string = {PROJCS["WGS 84 / UTM zone 36S", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 33.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 10000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","32736"]]}
wavelength = {443.0}
data gain values = {1.0E-4}
data offset values = {0.0}

Maybe it is not necessary to turn the data into float in SNAP, maybe it is already sufficient if you change the expression in ENVI a bit. Maybe “B1/10000.0” works or you can specify the data type of your target band in ENVI.
However, you can convert the bands to float by using 'Convert Dataype’ from ‘Raster / Conversion’ in the menu.