Commit 29d29651 authored by Kaj Williams's avatar Kaj Williams
Browse files

renamed albedo and morphology to more generic names. ref #4008

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7786 41f8697f-d340-4b68-9986-7bafba869bb8
parent c9636bb6
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -79,8 +79,8 @@ bool ephemerisTime;
bool UTC;
bool localSolarTime;
bool solarLongitude;
bool morphology;
bool albedo;
bool morphologyRank;
bool albedoRank;



@@ -100,7 +100,7 @@ struct MosData {
  double m_albedo;
};

// Computes the special MORPHOLOGY and ALBEDO planes
// Computes the special MORPHOLOGYRANK and ALBEDORANK planes
MosData *getMosaicIndicies(Camera &camera, MosData &md);
// Updates BandBin keyword
void UpdateBandKey(const QString &keyname, PvlGroup &bb, const int &nvals, 
@@ -194,8 +194,8 @@ void IsisMain() {
  UTC = false;
  localSolarTime = false;
  solarLongitude = false;  
  morphology = false;
  albedo = false;  
  morphologyRank = false;
  albedoRank = false;  
  
  
  if (!noCamera) {
@@ -246,8 +246,8 @@ void IsisMain() {
    if ((UTC = ui.GetBoolean("UTC"))) nbands++;
    if ((localSolarTime = ui.GetBoolean("LOCALSOLARTIME"))) nbands++;
    if ((solarLongitude = ui.GetBoolean("SOLARLONGITUDE"))) nbands++;   
    if ((morphology = ui.GetBoolean("MORPHOLOGY"))) nbands++; 
    if ((albedo = ui.GetBoolean("ALBEDO"))) nbands++;
    if ((morphologyRank = ui.GetBoolean("MORPHOLOGYRANK"))) nbands++; 
    if ((albedoRank = ui.GetBoolean("ALBEDORANK"))) nbands++;
    
  }
  if((dn = ui.GetBoolean("DN"))) nbands++;
@@ -327,8 +327,8 @@ void IsisMain() {
  if (UTC) name += "Coordinated Universal Time";
  if (localSolarTime) name += "Local Solar Time";
  if (solarLongitude) name += "Solar Longitude";
  if (morphology) name += "Morphology";
  if (albedo) name += "Albedo";
  if (morphologyRank) name += "morphologyRank";
  if (albedoRank) name += "albedoRank";
  
  

@@ -670,13 +670,13 @@ void camdev(Buffer &out) {
          index += 64 * 64;
        }
        // Special Mosaic indexes
        if (morphology) {
        if (morphologyRank) {
          if (!p_mosd) { p_mosd = getMosaicIndicies(*cam, mosd); }
          out[index] = mosd.m_morph;
          index += 64 * 64;
        }

        if (albedo) {
        if (albedoRank) {
          if (!p_mosd) { p_mosd = getMosaicIndicies(*cam, mosd); }
          out[index] = mosd.m_albedo;
          index += 64 * 64;
@@ -706,7 +706,7 @@ template <typename T>
  }


// Computes the special MORPHOLOGY and ALBEDO planes
// Computes the special morphologyRank and albedoRank planes
MosData *getMosaicIndicies(Camera &camera, MosData &md) {
  const double Epsilon(1.0E-8);
  Angle myphase;
@@ -723,14 +723,14 @@ MosData *getMosaicIndicies(Camera &camera, MosData &md) {

  md = MosData();  // Nullifies the data
  if (myemission.isValid()) {
    // Compute MORPHOLOGY
    // Compute morphologyRank
    double cose = cos(myemission.radians());
    if (fabs(cose) < Epsilon) cose = Epsilon;
    // Convert resolution to units of KM
    md.m_morph = (res / 1000.0) / cose;

    if (myincidence.isValid()) {
      // Compute ALBEDO
      // Compute albedoRank
      double cosi = cos(myincidence.radians());
      if (fabs(cosi) < Epsilon) cosi = Epsilon;
      //  Convert resolution to KM
+19 −16
Original line number Diff line number Diff line
@@ -121,8 +121,8 @@
     <li>UTC</li>
     <li>LOCALSOLARTIME</li>
     <li>SOLARLONGITUDE</li>
     <li>MORPHOLOGY</li>
     <li>ALBEDO</li>
     <li>MORPHOLOGYRANK</li>
     <li>ALBEDORANK</li>
     </ul>
    The following options are available for Level2 images:
     <ul>
@@ -216,6 +216,9 @@
    <change name="Makayla Shepherd" date="2015-09-22">
      Original version.
    </change>
    <change name="Kaj Williams" date="2017-06-09">
      Renamed albedo to albedoRank, renamed morph (or morphology) to morphRank (or morphologyRank). Ref #4008.
    </change>
  </history>

  <category>
@@ -319,8 +322,8 @@
              <item>NORTHAZIMUTH</item>
              <item>LOCALSOLARTIME</item>
              <item>SOLARLONGITUDE</item>
              <item>MORPHOLOGY</item>
              <item>ALBEDO</item>
              <item>MORPHOLOGYRANK</item>
              <item>ALBEDORANK</item>
            </exclusions>
          </option>
        </list>
@@ -807,20 +810,20 @@
          in band sequence of the output file. Solar Longitude is in degrees.
        </description>
      </parameter>
      <parameter name="MORPHOLOGY">
      <parameter name="MORPHOLOGYRANK">
         <type>boolean</type>
         <default><item>FALSE</item></default>
         <brief>Create a Morphology index band</brief>
         <brief>Create a Morphology rank band, used for ranking images based on favorable local emission angles.</brief>
         <description>
           <p>
             This band is computed from the <def link="Pixel Resolution">pixel resolution</def>
             and <def link="Emission Angle">emission angle</def> using the following formula:<br />  
             <br />Morphology = PixelResolution / cos(EmissionAngle)<br /> <br />
             <br />MorphologyRank = PixelResolution / cos(EmissionAngle)<br /> <br />
             The resulting output band can be used by <i>automos</i> to create a 
             morphology-based mosaic product.  This option uses the 
             morphologyRank-based mosaic product.  This option uses the 
             <def link="Local Emission Angle">local emission angle</def> if the input file
             is initialized (spiceinit) with an elevation model (DEM); otherwise, it  
             uses the default calculation (from the ellipsoid).  All computed values are 
             uses the default calculation (from the ellipsoid).  All computed cosines are 
             tested for zero.  If the result is zero, then the value is set to a constant 
             value very close to zero.
           </p>
@@ -830,29 +833,29 @@
               Append the following parameters to the <i>automos</i> command line to utilize this backplane band:
             </dt>
             <dd>
               <b>priority=band type=keyword keyname=Name keyvalue=morphology criteria=lesser</b>.
               <b>priority=band type=keyword keyname=Name keyvalue=morphologyRank criteria=lesser</b>.
             </dd>
             </dl>  
             See <i>automos</i> documentation for further details.
           </p>
         </description>
      </parameter>
      <parameter name="ALBEDO">
      <parameter name="ALBEDORANK">
        <type>boolean</type>
        <default><item>FALSE</item></default>
        <brief>Create an Albedo index band</brief>
        <brief>Create an Albedo rank band, used for ranking images based on favorable emission and incidence angles.</brief>
        <description>
          <p>
            This band is computed from the <def link="Pixel Resolution">pixel resolution</def>, 
            <def link="Incidence Angle">incidence angle</def> and <def link="Emission Angle">emission angle</def> 
            using the following formula:<br /><br /> 
            Albedo = PixelResolution * [(1 / cos(EmissionAngle)) + (1 / cos(IncidenceAngle))]<br /><br />
            The resulting output band can be used by <i>automos</i> to create an albedo-based
            AlbedoRank = PixelResolution * [(1 / cos(EmissionAngle)) + (1 / cos(IncidenceAngle))]<br /><br />
            The resulting output band can be used by <i>automos</i> to create an albedoRank-based
            mosaic product.  This option always uses the  
            <def link="Local Emission Angle">local emission angle</def>  and 
            <def link="Local Incidence Angle">local incidence angle</def> if the input file
            is initialized (spiceinit) with an elevation model (DEM); otherwise, it  
            uses the default calculation (from the ellipsoid).  All computed values are 
            uses the default calculation (from the ellipsoid).  All computed cosines are 
            tested for zero.  If the result is zero, then the value is set to a constant 
            value very close to zero.
          </p>
@@ -862,7 +865,7 @@
              Append the following parameters to the <i>automos</i> command line to utilize this backplane band:
            </dt>
            <dd>
            <b>priority=band type=keyword keyname=Name keyvalue=albedo 
            <b>priority=band type=keyword keyname=Name keyvalue=albedoRank 
              criteria=lesser</b>.  
            </dd>
            </dl>