gpt MosaicGeneral

Please enter here to ask a question about any NASA Science related topics!
Post Reply
avmehta
Posts: 154
Joined: Mon Feb 03, 2020 10:27 am America/New_York

gpt MosaicGeneral

by avmehta » Wed Feb 17, 2021 12:45 am America/New_York

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

Tags:

gnwiii
Posts: 618
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

gpt MosaicGeneral

by gnwiii » Wed Feb 17, 2021 9:27 am America/New_York

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.

avmehta
Posts: 154
Joined: Mon Feb 03, 2020 10:27 am America/New_York

gpt MosaicGeneral

by avmehta » Wed Feb 17, 2021 9:39 am America/New_York

Thank you so much.
Amita

gnwiii
Posts: 618
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

gpt MosaicGeneral

by gnwiii » Wed Feb 17, 2021 9:48 am America/New_York

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.

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 224
Joined: Mon Apr 07, 2008 4:40 pm America/New_York

gpt MosaicGeneral

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

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).

avmehta
Posts: 154
Joined: Mon Feb 03, 2020 10:27 am America/New_York

gpt MosaicGeneral

by avmehta » Thu Feb 18, 2021 12:40 pm America/New_York

Thanks so much Danny - will try this.
Amita

avmehta
Posts: 154
Joined: Mon Feb 03, 2020 10:27 am America/New_York

gpt MosaicGeneral

by avmehta » Mon Feb 22, 2021 10:15 am America/New_York

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

gnwiii
Posts: 618
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

gpt MosaicGeneral

by gnwiii » Mon Feb 22, 2021 4:22 pm America/New_York

You should be able to enter each inequality as a separate expression and set the "combine" method to "AND" in the xml file.

Post Reply