X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 May 2016 04:56 PM by  anon
question about ENVITask('ApplyGainOffset')
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
06 May 2016 04:56 PM
    I am trying to use the ENVITask('ApplyGainOffset') to calibrate my data. I set the these values"GAIN, IGNORE_VALIDATE, INPUT_RASTER, OFFSET, OUTPUT_RASTER_URI" 1). when i run the program, i found that the program could not ignore the value (for example, 0). how can i ignore 0 value when using the task? 2) how to change the out put data format? I try to run the FLAASH module after applied gain and offset task, but it give me the following error : "problem: Flaash input file must be of byte, integer, long, float, or unsigned in the data type". I found that the out put data type of ENVITask('ApplyGainOffset') is double, so how can i change the data type?? Thanks!!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    09 May 2016 07:57 AM
    The data ignore value is not used when applying gain and offset in this case. The tool does not accept an input mask either. However, applying the gains and offsets do not effect adjacent pixels so the background data ignore values should all have the same value after you apply them. After using the tool, you can then create and apply a mask to set the background value to the value of your choice. To convert the data type from double to float, you can use the Stretch data tool or Band Math: float(b1) then use Map variable to input file to convert all bands to float. Are you unable to use the Radiometric Calibration tool? This applies gains and offsets from metadata and can prepare the data so that it is ready for input to FLAASH.

    Deleted User



    New Member


    Posts:
    New Member


    --
    09 May 2016 02:30 PM
    Thanks, I use the following code to add 'data ignore value' for the input data, It successufly remoe the back 0 value when processing. IF (metadata.HasTag ('data ignore value')) THEN BEGIN metadata.UpdateItem, 'data ignore value', 0.0 ENDIF ELSE BEGIN metadata.AddItem, 'data ignore value', 0.0 ENDELSE The second question: the output data from the the envitask'RadiometricCalibration' is BSQ format, the FLAASH dose not support the BSQ format. So what should i do to change the output data format in the envitask''RadiometricCalibration'' I want to use this code Task.Output_Interleave='BIL' but the envitask ''RadiometricCalibration'' does not support this method. Thanks so much for your help

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    10 May 2016 01:51 PM
    No, that routine does not support the keyword for converting interleave. The tasks have been modularized in many ways so you would need to export a new raster with the interleave you desire. For example: raster=e.OpenRaster(file) newfile=e.gettemporaryfilename('dat') raster.export,newfile,'envi',interleave='bip' However, there is no FLAASH API. This is a UI tool only. You could use Quac instead. http://www.harrisgeospatial.com/docs/...
    You are not authorized to post a reply.