<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Helper function used in MODIStsp_process to identify which
MODIS hdf layers are required for the current process. The required layers
include all MODIS original layers selected by the user, plus all those
required to compute the Spectral Indexes and Quality Indicators selected
by the user"><title>Identify the MODIS original bands needed for a given processing run — get_reqbands • MODIStsp</title><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/apple-touch-icon.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Identify the MODIS original bands needed for a given processing run — get_reqbands"><meta property="og:description" content="Helper function used in MODIStsp_process to identify which
MODIS hdf layers are required for the current process. The required layers
include all MODIS original layers selected by the user, plus all those
required to compute the Spectral Indexes and Quality Indicators selected
by the user"><meta property="og:image" content="https://docs.ropensci.org/MODIStsp/logo.png"><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--><!-- Matomo --><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css"><script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script><script src="https://ropensci.org/scripts/matomo.js"></script><noscript><p><img src="https://ropensci.matomo.cloud/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt=""></p></noscript><!-- End Matomo Code --></head><body>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
    

    <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
    <a href="https://ropensci.org" class="external-link"><img src="https://ropensci.org/img/icon_short_white.svg" id="hexlogo" alt="rOpenSci"></a>
    <a class="navbar-brand me-2" href="../index.html">MODIStsp</a>

    <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">2.1.0</small>

    
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto"><li class="nav-item">
  <a class="nav-link" href="../index.html">
    <span class="fa fa-home"></span>
     
  </a>
</li>
      </ul><form class="form-inline my-2 my-lg-0" role="search">
        <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>

      <ul class="navbar-nav"><li class="nav-item dropdown">
  <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown--articles">
    <span class="fas fa fas fa-book"></span>
     
    Articles
  </a>
  <div class="dropdown-menu" aria-labelledby="dropdown--articles">
    <a class="dropdown-item" href="../articles/installation.html">Installation</a>
    <a class="dropdown-item" href="../articles/interactive_execution.html">Interactive Execution - the MODIStsp GUI</a>
    <a class="dropdown-item" href="../articles/noninteractive_execution.html">Non-Interactive Execution from within R</a>
    <a class="dropdown-item" href="../articles/standalone_execution.html">Standalone Execution and Scheduled Processing</a>
    <a class="dropdown-item" href="../articles/output.html">Outputs Format and Naming Conventions</a>
    <a class="dropdown-item" href="../articles/analyze.html">Accessing and Analyzing Processed Data from R</a>
    <a class="dropdown-item" href="../articles/products_list.html">Supported MODIS Products</a>
  </div>
</li>
<li class="nav-item">
  <a class="nav-link" href="../articles/faq.html">
    <span class="fa fa-question-circle-o"></span>
     
    faq
  </a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../news/index.html">
    <span class="fa fa-newspaper-o"></span>
     
    news
  </a>
</li>
<li class="active nav-item">
  <a class="nav-link" href="../reference/index.html">
    <span class="fa fa-file-code-o"></span>
     
    functions
  </a>
</li>
<li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/ropensci/MODIStsp/">
    <span class="fa fa-github fa-lg"></span>
     
    github
  </a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../articles/lorenzo.html">
    <span class="fa fa-cross"></span>
     
    dedication
  </a>
</li>
      </ul></div>

    
  </div>
</nav><div class="container template-reference-topic">
<div class="row">
  <main id="main" class="col-md-9"><div class="page-header">
      <img src="../logo.png" class="logo" alt=""><h1>Identify the MODIS original bands needed for a given processing run</h1>
      <small class="dont-index">Source: <a href="https://github.com/ropensci/MODIStsp/blob/HEAD/R/get_reqbands.R" class="external-link"><code>R/get_reqbands.R</code></a></small>
      <div class="d-none name"><code>get_reqbands.Rd</code></div>
    </div>

    <div class="ref-description section level2">
    <p>Helper function used in MODIStsp_process to identify which
MODIS hdf layers are required for the current process. The required layers
include all MODIS original layers selected by the user, plus all those
required to compute the Spectral Indexes and Quality Indicators selected
by the user</p>
    </div>

    <div class="section level2">
    <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">get_reqbands</span><span class="op">(</span></span>
<span>  <span class="va">bands_indexes_matrix</span>,</span>
<span>  <span class="va">indexes_bandsel</span>,</span>
<span>  <span class="va">indexes_bandnames</span>,</span>
<span>  <span class="va">quality_bandsel</span>,</span>
<span>  <span class="va">quality_bandnames</span>,</span>
<span>  <span class="va">out_prod_folder</span>,</span>
<span>  <span class="va">file_prefix</span>,</span>
<span>  <span class="va">yy</span>,</span>
<span>  <span class="va">DOY</span>,</span>
<span>  <span class="va">out_format</span>,</span>
<span>  <span class="va">reprocess</span></span>
<span><span class="op">)</span></span></code></pre></div>
    </div>

    <div class="section level2">
    <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
    <dl><dt>bands_indexes_matrix</dt>
<dd><p><code>matrix</code> built by <code>set_bandind_matrix</code></p></dd>


<dt>indexes_bandsel</dt>
<dd><p><code>character array</code>Spectral Indexes to be computed starting from reflectance bands.
You can get a list of available quality layers for a given product
using function <code>MODIStsp_get_prodlayers</code> (e.g., MODIStsp_get_prodlayers("M*D13Q1")$indexes_bandnames),
Default: NULL</p></dd>


<dt>indexes_bandnames</dt>
<dd><p>names of all indexes available for the product being processed</p></dd>


<dt>quality_bandsel</dt>
<dd><p><code>character array</code> Quality Indicators to be computed starting from
bit fields of original MODIS layers. You can get a list of available quality layers for a given product
using function <code>MODIStsp_get_prodlayers</code> (e.g., MODIStsp_get_prodlayers("M*D13Q1")$quality_bandnames),
Default: NULL</p></dd>


<dt>quality_bandnames</dt>
<dd><p>names of all quality indicators available for the product being processed</p></dd>


<dt>out_prod_folder</dt>
<dd><p><code>character</code> Main folder where the MODIStsp processed
raster will be stored. Used to check if a given processed image already exists.</p></dd>


<dt>file_prefix</dt>
<dd><p>File prefix corresponding to the MODIS product being
processed. Used to check if a given processed image already exists.</p></dd>


<dt>yy</dt>
<dd><p>Year corresponding to the image being processed. Used to check if
a given processed image already exists.</p></dd>


<dt>DOY</dt>
<dd><p>DOY corresponding to the image being processed. Used to check if
a given processed image already exists.. Used to check if a given processed image already exists.</p></dd>


<dt>out_format</dt>
<dd><p><code>character ["ENVI" | "GTiff"]</code> Desired output format.</p></dd>


<dt>reprocess</dt>
<dd><p><code>logical</code> If TRUE, reprocess data for already existing dates.</p></dd>

</dl></div>
    <div class="section level2">
    <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
    

<p>req_bands_indexes</p>
    </div>
    <div class="section level2">
    <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
    <p>Lorenzo Busetto, phD (2017)</p>
    </div>

  </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
    </nav></aside></div>


    <footer><!-- begin footer --><div class="footer">
    <div class="container">
        <div class="row start top-4 bottom-8">
            <div class="col-2"> <img id="footerlogo" src="https://ropensci.org/img/icon_short_white.svg"></div>
            <div class="col-10">
                <div class="row">
                    <div class="col-md-4 col-xs-6">
                        <a href="https://github.com/ropensci" target="_blank" class="external-link"><div class="icon fab fa-github"></div></a>
                        <a href="https://github.com/ropenscilabs" target="_blank" class="external-link"><div class="icon fa fa-flask"></div></a>
                        <a href="https://hachyderm.io/@ropensci" target="_blank" class="external-link"><div class="icon fab fa-mastodon"></div></a>
                        <a href="https://vimeo.com/ropensci" target="_blank" class="external-link"><div class="icon fab fa-vimeo"></div></a>
                    </div>
                </div>
                <div class="row top-4">
                    <div class="col-md-2 col-sm-4">
                        <ul><h5 class="bottom-2">About</h5>
                            <li><a href="https://ropensci.org/about" class="external-link">About rOpenSci</a></li>
                            <li><a href="https://ropensci.org/software-review" class="external-link">Software Review</a></li>
                            <li><a href="https://ropensci.org/about#team" class="external-link">Our Team</a></li>
                            <li><a href="https://ropensci.org/careers" class="external-link">Jobs</a></li>
                            <li><a href="https://ropensci.org/donate" class="external-link">Donate</a></li>
                            <li><a href="https://ropensci.org/contact" class="external-link">Contact Us</a></li>
                        </ul></div>
                    <div class="col-md-3 col-sm-4">
                        <ul><h5 class="bottom-2">Community</h5>
                            <li><a href="https://ropensci.org/community/" class="external-link">Our Community</a></li>
                            <li><a href="https://ropensci.org/commcalls/" class="external-link">Community calls</a></li>
                            <li><a href="https://ropensci.org/events/" class="external-link">Events</a></li>
                            <li><a href="https://discuss.ropensci.org/" class="external-link">Join the Discussion</a></li>
                            <li><a href="https://ropensci.org/code-of-conduct" class="external-link">Code of conduct</a></li>
                        </ul></div>
                    <div class="col-md-2 col-sm-4">
                        <ul><h5 class="bottom-2">Resources</h5>
                            <li><a href="https://ropensci.org/packages/" class="external-link">Packages</a></li>
                            <li><a href="https://ropensci.org/usecases/" class="external-link">Use Cases</a></li>
                            <li><a href="https://ropensci.org/talks-papers/" class="external-link">Talks &amp; Publications</a></li>
                            <li><a href="https://docs.ropensci.org/" class="external-link">Documentation</a></li>
                            <li><a href="https://ropensci.org/news/" class="external-link">Newsletter</a></li>
                            <li><a href="https://ropensci.org/how-to-cite-ropensci/" class="external-link">Cite rOpenSci</a></li>
                        </ul></div>
                    <div class="col-md-4 col-xs-12">
                        <h5 class="bottom-2"></h5>

                        <p>rOpenSci is a fiscally sponsored project of <a href="http://numfocus.org" class="external-link">NumFOCUS</a>.</p>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- / end footer -->


    </footer></div>

  

  

  </body></html>

