X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 20 Apr 2018 12:26 PM by  MariM
DarkSubtractionCorrection Task
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Russell Ives



New Member


Posts:4
New Member


--
20 Apr 2018 10:56 AM
    Running the 'DarkSubtractionCorrection' task in an API on reflectance values from a calibrated Worldview 2 data where the image boundary data has a pixel state of 1 are being calculated as negative values on the output raster. How do I stop this? Here is the section of code doing the calculation (with forcing 'data ignore value' param).

    ;***Add data ignore value to the metadata ****
    IF (metadata.HasTag ('data ignore value')) THEN BEGIN
    metadata.UpdateItem, 'data ignore value', 0.
    ENDIF ELSE BEGIN
    metadata.AddItem, 'data ignore value', 0.
    ENDELSE


    RS_Task = ENVITASK('DarkSubtractionCorrection')

    ;
    ; props = RS_Task.parameterNames()
    ; print, props

    ; Define inputs
    RS_Task.INPUT_RASTER = TOARRas
    RS_Task.VALUES = scats
    Rs_Task.OUTPUT_RASTER_URI = Rrs_out

    RS_Task.Execute

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    20 Apr 2018 12:26 PM
    Dark Subtraction is an older Classic tool that has never accepted masks and does not honor the data ignore value. You will need to mask those areas/values after running the process. If you choose to use the Band Minimum in the calculation, I would first calculate that minimum using a mask with the original data and using Calculate Statistics. Then provide this minimum as a user provided value in Dark Subtraction.
    You are not authorized to post a reply.