Page 1 of 1

gpt MosaicGeneral

Posted: Wed Feb 17, 2021 12:45 am America/New_York
by avmehta
Hello,
  Could you please  explain the following segment in the xml file from https://seadas.gsfc.nasa.gov/help/GptCookbook/gptCookbookMosaic.html
   <conditions>
            <condition>
                <name>condition_0</name>
                <expression>${qualityExpression}</expression>
                <output>false</output>
            </condition>
        </conditions>
        <combine>OR</combine>

Not sure what condition_0 is and also   <combine>OR</combine>.
   Corresponding parameter  file is also available after the xml file at the above link.
Thanks.
Amita

gpt MosaicGeneral

Posted: Wed Feb 17, 2021 9:27 am America/New_York
by gnwiii
condition_0 is an arbitrary name for the qualityExpression, but it is helpful to use a descriptive name such as "valid_range"   The Help documentation has many pages of information on Mosaic (under Raster/Geometry/Mosaic and the GPT Cookbook) that explains how a qualityExpression is used.   The Raster/Geometry/Mosaic help includes a section for Conditions.   To make sure you understand what the conditions do you should experiment in the GUI with your data (one product) and different conditions.

gpt MosaicGeneral

Posted: Wed Feb 17, 2021 9:39 am America/New_York
by avmehta
Thank you so much.
Amita

gpt MosaicGeneral

Posted: Wed Feb 17, 2021 9:48 am America/New_York
by gnwiii
condition_0 is an arbitrary name for the "qualityExpression".  It is helpful to use a descriptive name such as "flags_masked" or "valid_range"   The Help documentation has many pages of information on Mosaic (under Raster/Geometry/Mosaic and the GPT Cookbook) that explains how a "qualityExpression" is used.   The Raster/Geometry/Mosaic help includes a help section for the "Variables & Conditions" tab.   To make sure you understand what the conditions do you should experiment with your data in the GUI and different conditions.  The GUI allows you to use the Expression editor, which can help avoid erros in entering expressions.   Setting "Output" to "true" ("Outp." seems to be an abbreviation for "Output" -- maybe the tab wasn't wide enough for the full name) helps you determine how often a condition was triggered.

If something in Help documents is unclear please suggest how it can be improved.

gpt MosaicGeneral

Posted: Thu Feb 18, 2021 11:43 am America/New_York
by OB SeaDAS - knowles
Hi Amita,

As previously noted in this thread, rhos_412 and other surface reflectances can in fact be negative, and for that matter could be greater than 1.0 as well.  Cloud shadow and cloud tops are 2 possible instances in which this might occur.  There could be other instances.  The fill value (-32767.0) is another instance.

The likelihood that the float value rhos_412 precisely equals zero is extremely small.  Most likely you want something like (rhos_412 > 0.0 && rhos_412 <= 1.0) instead of (rhos_412 != 0) in your expression.  If you wish to retain the "official" range then you want (rhos_412 >= -0.05 && rhos_412 <= 1.0).

gpt MosaicGeneral

Posted: Thu Feb 18, 2021 12:40 pm America/New_York
by avmehta
Thanks so much Danny - will try this.
Amita

gpt MosaicGeneral

Posted: Mon Feb 22, 2021 10:15 am America/New_York
by avmehta
Hi,
The xml file does not like && ! Any way I am  going to use IDL to do mosaics as I want minimum, mean, and median values  for the mosaics.
Thanks for your help.
Amita

gpt MosaicGeneral

Posted: Mon Feb 22, 2021 4:22 pm America/New_York
by gnwiii
You should be able to enter each inequality as a separate expression and set the "combine" method to "AND" in the xml file.