Unverified Commit 7dda0459 authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Add local solar time option to phocube (#3912)

* Add local solar time option to phocube

* Add missing ticket number

* Added more documentation updates for adding localsolartime to phocube
parent b707fc2f
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ void IsisMain() {
  bool bodyFixedX = false;
  bool bodyFixedY = false;
  bool bodyFixedZ = false;
  bool localSolarTime = false;
  int raBandNum = 0;  // 0 based, if RA is 5th band, raBandNum will be 4

  if (!noCamera) {
@@ -125,6 +126,7 @@ void IsisMain() {
    if ((bodyFixedX = ui.GetBoolean("BODYFIXED"))) nbands++;
    if ((bodyFixedY = ui.GetBoolean("BODYFIXED"))) nbands++;
    if ((bodyFixedZ = ui.GetBoolean("BODYFIXED"))) nbands++;
    if ((localSolarTime = ui.GetBoolean("LOCALTIME"))) nbands++;
  }

  bool dn;
@@ -259,7 +261,9 @@ void IsisMain() {
  if (bodyFixedZ) {
    name += "Body Fixed Z";
  }

  if (localSolarTime) {
    name += "Local Solar Time";
  }
  bool specialPixels = ui.GetBoolean("SPECIALPIXELS"); 

  /**
@@ -456,6 +460,10 @@ void IsisMain() {
              index += 64 * 64;
            }
          }
          if (localSolarTime) {
            out[index] = cam->LocalSolarTime();
            index += 64 * 64;
          }
        }

        // Trim outer space except RA and dec bands
+15 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ xsi:noNamespaceSchemaLocation=
     <li>ALBEDORANK</li>
     <li><def link="Body Fixed Coordinate">BODYFIXED</def></li>
     <li>RADEC (<def link="Right Ascension">Right Ascension</def>, <def link="Declination">Declination</def> )</li>
     <li><def link="Local Solar Time">LOCALTIME</def></li>
     </ul>
	The following options are available for Level2 images:
     <ul>
@@ -312,6 +313,9 @@ xsi:noNamespaceSchemaLocation=
      merge causes the application to run longer. Changed the process function to be a lambda function
      to get rid of global variables.
    </change>
    <change name="Kristin Berry" date="2020-06-10">
      Added the LOCALTIME parameter to output a band with the local solar time for each pixel. Fixes #3850
    </change>
  </history>

  <category>
@@ -403,6 +407,7 @@ xsi:noNamespaceSchemaLocation=
              <item>NORTHAZIMUTH</item>
              <item>RADEC</item>
              <item>BODYFIXED</item>
              <item>LOCALTIME</item>
            </exclusions>
          </option>
        </list>
@@ -736,6 +741,16 @@ xsi:noNamespaceSchemaLocation=
	   Body Fixed Coordinates are in kilometers.
	 </description>
       </parameter>
      <parameter name="LOCALTIME">
         <type>boolean</type>
         <default><item>FALSE</item></default>
         <brief>Create a band with local solar time</brief>
         <description>
	   If this parameter is true, the <def>Local Solar Time</def> will be calculated for
	   every pixel in the output cube. The output cube label will contain "Local Solar Time"
	   in the BandBin group. Local Solar Time is in hours.
	 </description>
       </parameter>
    </group>
  </groups>

+3 −1
Original line number Diff line number Diff line
@@ -30,4 +30,6 @@ commands:
	  morphology=true \
	  albedo=true \
	  radec=true \
	  bodyfixed=true> /dev/null;  
	  bodyfixed=true \
	  localtime=true > /dev/null;