Commit a0f6538e authored by Kristin Berry's avatar Kristin Berry
Browse files

Added documentation and a test for new LEVEL option for kerneldbgen.

parent b18a1e0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ PvlGroup SpiceDbGen::AddSelection(FileName fileIn, double startOffset, double en
        ssize_c(0, &cover);
        ssize_c(200000, &cover);

        // A SPICE SEGMENT is composed of SPICE INTERVALS, and is a more coarse measurement
        // A SPICE SEGMENT is composed of SPICE INTERVALS
        if (QString::compare(m_coverageLevel, "SEGMENT", Qt::CaseInsensitive) == 0 ) {
          ckcov_c(tmp.toLatin1().data(), body, SPICEFALSE, "SEGMENT", 0.0, "TDB", &cover); 
        }
+6 −1
Original line number Diff line number Diff line
@@ -47,6 +47,11 @@
 *   @history 2013-02-15 Steven Lambright - Added support for extra kernel dependencies
 *   @history 2018-01-10 Christopher Combs - Added passing startOffset and endOffset to allow
 *                           the passing of time offsets to to FormatIntervals. Fixes #5272.
 *   @history 2018-05-09 Kristin Berry - Added information about the Spice time coverage level
 *                            to this class: m_coverageLevel, setCoverageLevel, and this class will
 *                            now select spice "time intervals" at the level specified. This is
 *                            either a SPICE Segment (coarse) or a SPICE interval (fine.)
 *                            Fixes #5410. 
 *
 */
class SpiceDbGen {
@@ -66,7 +71,7 @@ class SpiceDbGen {
    Isis::PvlGroup GetIntervals(SpiceCell &cover);
    //private instance variables
    QString p_type;
    QString m_coverageLevel; 
    QString m_coverageLevel; //! The time coverage level of the database: INTERVAL or SEGMENT
    static const char *calForm;
};

+0 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ void IsisMain() {
  else if (ui.GetString("LEVEL") == "INTERVAL") {
    coverageLevel = "INTERVAL"; 
  }
  // add to Pvl? 
  sdg.setCoverageLevel(coverageLevel); 

  selections += PvlKeyword("RunTime", iTime::CurrentLocalTime());
+2 −2
Original line number Diff line number Diff line
@@ -153,8 +153,8 @@
      Fixes #5272.
    </change>
    <change name="Kristin Berry" date="2018-05-09">
      Added option to specify the time coverage level to be used for the generated database. SPICE segements are made up of SPICE intervals. 
      Segments (the only old option) are now the default, but interval can be selected if needed. 
      Added the LEVEL=(SEGMENT*, INTERVAL) option to specify the time coverage level to be used for the generated database. SPICE segements are made up of SPICE intervals. 
      Segments (the only option in the past) are now the default, but interval can be selected if needed. Fixes #5410. 
    </change>
  </history>

+38 −0
Original line number Diff line number Diff line
# Coverage Level Test for kerneldbgen
#
# This test creates an output database file from the kernel in the input file
# that follow the given filter for reconstructed ck file name patterns. A database
# is output with time coverage at the SPICE segment level and at the SPICE interval 
# level. (There will be one output entry for the spice segment, and several for the
# SPICE interval because a SPICE segment is composed of SPICE intervals.) 
#
# After the output PVL is created, when compared, the DIFF file indicates to
# ignore RunTime and File.  The File keyword is ignored since, depending on 
# where the test is run, files may have different paths. These paths can not be 
# removed since they may be long enough to take up multiple lines.
# 
# This test uses files from the TGO CaSSIS mission, as this is where the problem
# was identified. 
#
# history 2018-05-09 Kristin Berry - Added test for newly added time coverage 
#                                    LEVEL=(SEGMENT*, INTERVAL) option. See #5410
APPNAME = kerneldbgen
include $(ISISROOT)/make/isismake.tsts

commands:
	# Default output level=segment
	$(APPNAME) to=$(OUTPUT)/kernel_segment.db.pvl \
	  type=CK \
	  recondir=$(INPUT) \
	  reconfilter='em16_tgo_sc_??m_*.bc' \
	  sclk=\$$tgo/kernels/sclk/em16_tgo_step_????????.tsc \
          lsk=\$$base/kernels/lsk/naif0012.tls > /dev/null; 

	# Output with level=interval, needed for CaSSIS kernels and potentially other type-6 kernels
	$(APPNAME) to=$(OUTPUT)/kernel_interval.db.pvl \
	  type=CK \
	  level=INTERVAL \
	  recondir=$(INPUT) \
	  reconfilter='em16_tgo_sc_??m_*.bc' \
 	  sclk=\$$tgo/kernels/sclk/em16_tgo_step_????????.tsc \
          lsk=\$$base/kernels/lsk/naif0012.tls > /dev/null;