Differences between revisions 8 and 26 (spanning 18 versions)
Revision 8 as of 2016-02-05 09:58:40
Size: 5563
Editor: tcampb
Comment:
Revision 26 as of 2016-07-24 07:56:32
Size: 7744
Editor: BMittan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
===== (Compiled by TC) =====
||Category B||Version 3.0||
Line 5: Line 6:
Densify is used to increase the resolution of a shape model by interpolating heights
between known surface points. It first constructs a reference surface by interpolating

Thi
s program is used to increase the resolution of a shape model by interpolating heights
between landmarks.

'''densify'''
first constructs a reference surface by interpolating
Line 8: Line 12:
the reference there is a vector V0 from the model center to that point and the reference, there is a vector V0 from the model center to that point and
Line 12: Line 16:
model's surface, so the new surface vector is V = V0 + A*N0.

{{{
                ___...-------...___
model's surface. The new surface vector is V = V0 + A*N0.

The picture below is a visual representation of the paragraph above
.

{{{
                ___...-------...___ maplet
Line 24: Line 30:
Because, especially at the early stages, there are mismatches in maplet locations
simply due to the formal uncertainties of the estimation process, we have
found it better to average the maplet normals N at each point, keeping a
small randomly selected set of the A as conditioning heights.

The initial inputs to the procedure are the names of the input and output SHAPE
file along with a line with a multiplicative scaling factor K (usually 2), a limit in km specifying how far
along the surface normal the program should search for a maplet, and a random
seed in the form of a large integer. This seed will be superceeded if one is
entered on the command line following the densify invocation.
The new surface vector V will differ from V0 more noticeably when tiling at lower resolution because there are mismatches in maplet locations simply due to the formal uncertainties of the estimation process. Therefore, we have found it better to average the maplet normals N at each point, keeping a small randomly selected set of the A as conditioning heights.

== Required Files ==
 * [[LMRKLIST.TXT]] - List of all landmarks to be used
 * [[LMKFILES]]/ - Directory of .LMK files for each maplet
 * [[MAPFILES]]/ - Directory of .MAP files
 * [[SHAPEFILES]]/ - Directory of built shapes

== Optional Files ==
 * [[LMRKLISTR.TXT]] - Specific list of landmarks desired

== Output Files ==
 * [[SIGMA.TXT]] - list of sigma values associated with the shape model (found in [[SHAPEFILES]]/)
 * Shape file in ICQ format

----------

== Using densify ==

Although '''densify''' can be run interactively, the input commands are usually prearranged in a file (e.g., "tmpRun.txt") and you invoke the program from the command line like this:
{{{
~/bin/densify < tmpRun.txt
}}}

Here is an annotated sample "tmpRun.txt" file showing the input commands:

{{{
SHAPEFILES/PreviousShapeFile (input shape)
2 100 1.67773 (K (power of 2), search range (km), random seed)
SHAPEFILES/CurrentShapeFile (output shape) <--At this point the map-averaged shape at a higher resolution is made
1 (more iteration) <--At this point we begin the slopes to heights integration
.005 (fraction of points used for conditioning) <--These are sample heights we select for the slope->heights integration
.025 (conditioning weight)
1 (more iterations) <--More slope to heights integration
1
1
1
1
1
1
1
1
1
1
1
1
1
0 (end program)
}}}

The input commands are:
 * '''line 1''' - The input SHAPE file
 * '''line 2''' - A multiplicative scaling factor K (usually 2), a limit (in km) specifying how far along the surface normal the program should search for a maplet, a random seed in the form of a large integer
  /!\ This random seed is superseded if you enter one on the command line after you invoke densify.
 * '''line 3''' - The output SHAPE file
 * '''line 4''' - 1 = an iteration
 * '''line 5''' - The fraction of points used for conditioning (usually .005)
 * '''line 6''' - The conditioning weight
 * '''line 7''' ... - 1 = an iteration (as many as you need)
 * '''last line''' - 0 = end program
Line 37: Line 93:
integration procedes without any randomly chosen conditioning heights from these
areas.  In some cases, such as fast flybys of small bodies, only a small fraction
of the surface is visible - vast areas are unknown. In these cases, conditioning
heights are also taken from the input model as well. This option is specified by
integration proceeds without any randomly chosen conditioning heights from these
areas.

In some cases, such as fast flybys of small bodies, only a small fraction
of the surface is visible and vast areas are unknown. In these cases, conditioning
heights are also taken from the input model as well. Specify this option by
Line 43: Line 101:
The procedure now determines the average height along each surface normal from  (!) In this case we use a negative value for K (-2) because, for every location in the
shape model for which we don't have map coverage, '''densify''' will print on the screen.
Setting the value to -2 will block printing to the standard output.

'''densify''' then determines the average height along each surface normal from
Line 47: Line 109:
called SIGMA.TXT that has an extra column representing the uncertainty. This
latter file
can be displayed as an image to show areas that might need further
work.  The program now gives the options:
called [[SIGMA.TXT]] that has an extra column representing the uncertainty. [[SIGMA.TXT]] can be displayed as an image to show areas that might need further
work.

After it completes the commands in the file, '''densify'''
gives these options:
Line 56: Line 119:
If '0' is chosen, the output shape model will be the height averaged result.
The entire script, with the output model called SHAPEX.TXT, is:
If you enter '0', the output shape model will be the height averaged result.

          * This shows the first step in increasing the resolution of the shape model by a factor of 2
          Still this is the stage where we only average the map heights to construct a higher res shape
          If we enter 0 then we skip the slope to heights integration. We don't want to do that.
          This part is already described in the example script above.
  
The entire script, with the output model called SHAPEX.TXT and '0' entered to the perform no iterations, looks like this:
Line 67: Line 136:
If '1' is chosen, the program asks for: If you enter '1' to perform an iteration, the program prompts:
Line 73: Line 142:
the fraction of averaged heights (and empty heights if K<0) used to condition the integration (usually .005) and: Enter the fraction of averaged heights (and empty heights if K<0) used to condition the integration (usually '.005').

The
program prompts:
Line 79: Line 150:
the weight given to the conditioning heights (usually .025).

The program produces an output SHAPE file and gives the options:
Input the weight given to the conditioning heights (usually '.025').

The program produces an output SHAPE file and gives these options:
Line 89: Line 160:
The interim shape can be viewed to see whether we want to change the weight given to
the conditioning heights using a procedure described below. Usually, we just
The interim shape can be viewed to see whether you want to change the weight given to
the conditioning heights using the procedure described below. Usually, you just
Line 92: Line 163:
     
By tradition, we usually use SHAPE0 for Q=64, SHAPE1 for Q=128, SHAPE2 for Q=256
and SHAPE3 for Q=512, so after this is run, if there have been no problems, we want to:
      

By tradition, usually use:
 *
SHAPE0 for Q=64
 *
SHAPE1 for Q=128
 *
SHAPE2 for Q=256
 * SHAPE3 for Q=512
I
f there have been no problems after you complete this run, at the command line enter:
{{{
Line 97: Line 172:
      
After another densification, when SHAPEX.TXT is Q=512, we would:
      
}}}
After another densification, when SHAPEX.TXT is Q=512, at the command line enter:
{{{
Line 101: Line 176:
      
SHAPE.TXT is also Q=512 and we want to update that as well. For historical reasons,
some scripts change permissions on SHAPE.TXT to read only, so we want to:
}}}
SHAPE.TXT is also Q=512 and you need to update that as well.

/!\ For historical reasons, some scripts change permissions on SHAPE.TXT to read only.

A
t the command line enter:
{{{
Line 107: Line 185:

== Requires ==
 * [[LMRKLIST.TXT]] - list of all landmarks to be used
 * [[LMKFILES]]/ - directory of .LMK files for each maplet
 * [[MAPFILES]]/ - directory of .MAP files
 * [[SHAPEFILES]]/ - directory of built shapes
=== Optional ===
 * [[LMRKLISTR.TXT]] - specific list of landmarks desired

== Input ==
The commands sent to densify are usually prearranged in a file which can be used as follows:
{{{
~/bin/densify < tmpRun.txt
}}}
=== Input File ===
{{{
SHAPEFILES/PreviousShapeFile (input shape)
2 100 1.67773 (K (power of 2), search range (km), random seed)
SHAPEFILES/CurrentShapeFile (output shape)
1 (more iteration)
.005 (fraction of points used for conditioning)
.025 (conditioning weight)
1 (more iterations)
1
1
1
1
1
1
1
1
1
1
1
1
1
0 (end program)
}}}

== Output ==
 * [[SIGMA.TXT]] - list of sigma values associated with the shape model (found in [[SHAPEFILES]]/)
 * Shape file in ICQ format
}}}
=== Interactive ===

If you want to run '''densify''' interactively, the initial inputs are:
 * the input SHAPE file
 * the output SHAPE file
 * scaling factor K (usually 2), limit (in km) , random seed (large integer)
  /!\ This random seed is superceded if you enter one on the command line after you invoke densify.

'''densify''' will then prompt you for the remaining inputs and iterations.

-----------

''(Compiled by TC)''

CategoryPrograms

densify

Category B

Version 3.0

Description

This program is used to increase the resolution of a shape model by interpolating heights between landmarks.

densify first constructs a reference surface by interpolating the surface points of a lower resolution shape model. At each point of the reference, there is a vector V0 from the model center to that point and a normal N0 to the surface. That normal is extended some distance until it pierces one or more of the ensemble of maplets, and the average A of those distances is taken to represent the piercing point on the new model's surface. The new surface vector is V = V0 + A*N0.

The picture below is a visual representation of the paragraph above.

                ___...-------...___ maplet
                   |           |
                   |           |A*N0
             ______|___________|_________ reference
                   \          /
                    \        / V0
                     \      /

The new surface vector V will differ from V0 more noticeably when tiling at lower resolution because there are mismatches in maplet locations simply due to the formal uncertainties of the estimation process. Therefore, we have found it better to average the maplet normals N at each point, keeping a small randomly selected set of the A as conditioning heights.

Required Files

Optional Files

Output Files

  • SIGMA.TXT - list of sigma values associated with the shape model (found in SHAPEFILES/)

  • Shape file in ICQ format


Using densify

Although densify can be run interactively, the input commands are usually prearranged in a file (e.g., "tmpRun.txt") and you invoke the program from the command line like this:

~/bin/densify < tmpRun.txt

Here is an annotated sample "tmpRun.txt" file showing the input commands:

SHAPEFILES/PreviousShapeFile       (input shape)
2 100 1.67773                      (K (power of 2), search range (km), random seed)
SHAPEFILES/CurrentShapeFile        (output shape) <--At this point the map-averaged shape at a higher resolution is made
1                                  (more iteration) <--At this point we begin the slopes to heights integration
.005                               (fraction of points used for conditioning) <--These are sample heights we select for the slope->heights integration 
.025                               (conditioning weight)
1                                  (more iterations) <--More slope to heights integration
1
1
1
1
1
1
1
1
1
1
1
1
1
0                                  (end program)

The input commands are:

  • line 1 - The input SHAPE file

  • line 2 - A multiplicative scaling factor K (usually 2), a limit (in km) specifying how far along the surface normal the program should search for a maplet, a random seed in the form of a large integer

    • /!\ This random seed is superseded if you enter one on the command line after you invoke densify.

  • line 3 - The output SHAPE file

  • line 4 - 1 = an iteration

  • line 5 - The fraction of points used for conditioning (usually .005)

  • line 6 - The conditioning weight

  • line 7 ... - 1 = an iteration (as many as you need)

  • last line - 0 = end program

In most cases, the maplets will cover most of the surface. Where it is not covered, the normals to the input model provide the "slopes" and the integration proceeds without any randomly chosen conditioning heights from these areas.

In some cases, such as fast flybys of small bodies, only a small fraction of the surface is visible and vast areas are unknown. In these cases, conditioning heights are also taken from the input model as well. Specify this option by using a negative value for K (usually -2).

  • (!) In this case we use a negative value for K (-2) because, for every location in the

shape model for which we don't have map coverage, densify will print on the screen. Setting the value to -2 will block printing to the standard output.

densify then determines the average height along each surface normal from each reference point of the densified shape. It also determines the average maplet surface normal and the standard deviation of the heights, used as a measure of uncertainty. It produces the output SHAPE file and a similar file called SIGMA.TXT that has an extra column representing the uncertainty. SIGMA.TXT can be displayed as an image to show areas that might need further work.

After it completes the commands in the file, densify gives these options:

     0. end program
     1. proceed to iteration

If you enter '0', the output shape model will be the height averaged result.

  • This shows the first step in increasing the resolution of the shape model by a factor of 2 Still this is the stage where we only average the map heights to construct a higher res shape If we enter 0 then we skip the slope to heights integration. We don't want to do that. This part is already described in the example script above.

The entire script, with the output model called SHAPEX.TXT and '0' entered to the perform no iterations, looks like this:

     densify
     SHAPEFILES/SHAPE1.TXT        < input shape
     2, 1.0, 5639                 < K, search range (km), random SEED
     SHAPEFILES/SHAPEX.TXT        < output shape
     0                            < end program

If you enter '1' to perform an iteration, the program prompts:

     input fraction

Enter the fraction of averaged heights (and empty heights if K<0) used to condition the integration (usually '.005').

The program prompts:

     input weight

Input the weight given to the conditioning heights (usually '.025').

The program produces an output SHAPE file and gives these options:

     0. end program
     1. more iteration
     2. change weight

The interim shape can be viewed to see whether you want to change the weight given to the conditioning heights using the procedure described below. Usually, you just continue iterating or, finally, exit the program.

By tradition, usually use:

  • SHAPE0 for Q=64
  • SHAPE1 for Q=128
  • SHAPE2 for Q=256
  • SHAPE3 for Q=512

If there have been no problems after you complete this run, at the command line enter:

     cp SHAPEFILES/SHAPEX.TXT SHAPEFILES/SHAPE2.TXT

After another densification, when SHAPEX.TXT is Q=512, at the command line enter:

     cp SHAPEFILES/SHAPEX.TXT SHAPEFILES/SHAPE3.TXT

SHAPE.TXT is also Q=512 and you need to update that as well.

  • /!\ For historical reasons, some scripts change permissions on SHAPE.TXT to read only.

At the command line enter:

     chmod +w SHAPE.TXT
     cp SHAPEFILES/SHAPEX.TXT SHAPEFILES/SHAPE.TXT

Interactive

If you want to run densify interactively, the initial inputs are:

  • the input SHAPE file
  • the output SHAPE file
  • scaling factor K (usually 2), limit (in km) , random seed (large integer)
    • /!\ This random seed is superceded if you enter one on the command line after you invoke densify.

densify will then prompt you for the remaining inputs and iterations.


(Compiled by TC)

CategoryPrograms

densify (last edited 2016-07-24 08:08:51 by BMittan)