The documentation on this routine is incomplete. In the GUI, you can specify the output data type. In the GAINOFF_DOIT routine, it will return the same data type as the input unless you specify it, but the help doesn't document the 'OUT_DT' keyword. So, change your code to do something like the following:
envi_doit, 'gainoff_doit', $
fid=fid, pos=pos, dims=dims, out_dt=4, $
gain=gain, offset=offset, $
out_name=out_name, r_fid=r_fid
Where out_dt is set to '4' which is floating point output.
|