DSKMOD User's Guide =========================================================================== Last revised on 2021 DEC 15 by F. S. Thomson. Abstract -------------------------------------------------------- DSKMOD is a command-line program that allows users to modify the contents of segment descriptors contained in binary Digital Shape Kernel (DSK) files. Summary -------------------------------------------------------- DSKMOD is a program for modifying the DSK segment descriptor values contained in one or more binary DSK files. Although the file extension *.bds is recommended for DSK files to maintain consistency with NAIF naming conventions, DSKMOD has no input or output file extension requirement. Candidate binary DSK files must be in a binary file format that is native to the computing platform upon which the files are to be modified by DSKMOD; see the NAIF document ``Converting and Porting SPICE Binary Data Files'' for more details. Current URLs for all NAIF documents referenced in this User's Guide are provided in the ``References'' section below. The DSK descriptor fields that may be modified are: -- Body Center ID Code (integer). -- Surface ID Code (integer). -- Data Class Code (integer). -- Reference Frame Code (integer). -- Coordinate System Bounds (double-precision pair). -- Start Time (double-precision number or valid time string). -- Stop Time (double-precision number or valid time string). DSK descriptor modifications requested when DSKMOD executes are applied to every matching segment descriptor contained in the DSK files specified by the DSKMOD command. Several binary DSK files may be altered at one time by specifying the name of a text file that contains a list of binary DSK file names the user wishes to modify. This is true for all descriptor modifications except coordinate bounds changes, as described in the ``Usage'' section of this document. Upon successful execution, DSKMOD creates one or more new, uniquely-named DSK files that contain the commanded changes to the original DSK file. If only one DSK file is to be modified, then the user can use the key -dskout to specify the name of the output file. The user may also command DSKMOD to overwrite the original DSK files with any modifications made to the segment descriptors. Invalid inputs to DSKMOD yield an error message, and no output files are created. For further details regarding DSK segments, descriptor fields, etc. please refer to NAIF ``DSK Required Reading''. A note of caution: Altering NAIF ID codes and other segment descriptor values in a DSK file can lead to erroneous results when the file is used by SPICE library routines, or other software that utilizes DSK files for calculations. These sorts of errors may not trigger any warnings, and can sometimes be difficult to detect. Please be sure of what you are doing before making any changes to DSK file descriptors. Usage -------------------------------------------------------- DSKMOD is executed from the command line using the following syntax: dskmod [-key] [key value]... Only one segment descriptor field should be modified per execution of DSKMOD. For example, if the user intends to change both the Body ID code and the Surface ID code in a given DSK file, then DSKMOD must be run twice to make those changes. There are no limitations on the order of the keys or the case of the keys or key values, but DSKMOD does expect the value or values associated with a given key to immediately follow that key on the command line. For example, the if the key -dskin (described below) is entered, then the input DSK filename should immediately follow that key on the command line. The command line keys recognized by DSKMOD are: -v Displays the current DSKMOD version information, then terminates the execution of the program. -u Displays an abbreviated description of DSKMOD usage, including a list of command keys, then terminates the execution of the program. Use -h or -help for more detailed usage information. -h, -help Displays a description of DSKMOD usage and keys, then terminates the execution of the program. -dskin Identifies an ASCII text file name that contains a list of binary DSK files. This file should specify one DSK file per line. This key is ignored if -dskin is also provided as input to DSKMOD. If the key -dsklist is used but the text file it refers to is empty, DSKMOD exits with the message ``No DSKs have been written or modified.'' -dskout Identifies the DSK descriptor field to be modified. Available key values are ``BODY'', ``SURFACE'', ``CLASS'', ``FRAME'', ``CBOUND', ``START'', ``STOP'', or ``EPOCHS''. Values are not case sensitive. -from Current value of the DSK descriptor field. Double-precision number or string if the key value of -mod is START or STOP; otherwise, an integer. Not used with the EPOCHS or CBOUND mod key values. -to Desired (modified) value of the DSK descriptor field. Double-precision number or string if the key value of -mod is START or STOP; otherwise, an integer. Not used with the EPOCHS or CBOUND mod key values. -cb Minimum and maximum values of coordinate bound ``n'' to be modified, where n = 1, 2, or 3. This key may only be used with -mod CBOUND, and must be accompanied by the -segno key to explicitly define which DSK segment is to be modified. See below for a more detailed explanation and an example. -start