Size: 923
Comment:
|
Size: 2097
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
#FORMAT wiki | ##pdf footerleft t ##pdf no-links unchecked ##pdf extra-titleauthor Planetary Science Institute ##pdf extra-dynamiccodeblock unchecked ##pdf pagemode document ##pdf headfootsize 10.5 ##pdf size letter ##pdf style book ##pdf permissionprint unchecked ##pdf footermiddle . ##pdf firstpage p1 ##pdf permissionmodify unchecked ##pdf toclevels 1 ##pdf tocheadermiddle . ##pdf extra-dynamiccodeblock-break unchecked ##pdf extra-codeblocklinenumbers unchecked ##pdf permissioncopy unchecked ##pdf extra-dynamiccodeblock-middot unchecked ##pdf footerright 1 ##pdf headerleft h ##pdf fontsize 10.5 ##pdf jpeg 100 ##pdf extra-titlecopyright Copyright 2016 Planetary Science Institute ##pdf headerright . ##pdf headingfont sans-boldoblique ##pdf numbered unchecked ##pdf bodyfont helvetica ##pdf extra-titledocnumber 1.00A ##pdf tocfooterleft t ##pdf titletext SPC Software User Manual ##pdf permissionannotate unchecked |
Line 3: | Line 33: |
##pdf headfootsize 10.0 ##pdf headfootfont sans ##pdf headingfont sans ##pdf embedfonts unchecked ##pdf bodyfont sans ##pdf title unchecked ##pdf format pdf14 ##pdf jpeg 100 ##pdf style book ##pdf extra-titleauthor PSI ##pdf extra-titlecopyright Copyright 2016 PSI ##pdf extra-titledocnumber 1.0 ##pdf size letter ##pdf footermiddle . ##pdf headerleft . ##pdf headerright . ##pdf toclevels 0 ##pdf tocheadermiddle . ##pdf toctitle ##pdf no-toc unchecked ##pdf numbered unchecked ##pdf tocfooterright . ##pdf pagemode document ##pdf extra-dynamiccodeblock unchecked ##pdf extra-dynamiccodeblock-break unchecked ##pdf extra-dynamiccodeblock-middot unchecked ##pdf extra-codeblocklinenumbers unchecked |
<<Include(coverage)>> <<Include(display)>> <<Include(image_map_mono)>> <<Include(image_map_rgb)>> <<Include(image_map_stereo)>> <<Include(Imager_MG)>> <<Include(limber)>> <<Include(make_pictlistX)>> <<Include(make_scriptA)>> <<Include(make_scriptP)>> <<Include(refresh_sumfiles)>> <<Include(make_sumfiles)>> <<Include(mosaic)>> <<Include(panaroma)>> <<Include(refresh_sumfiles)>> <<Include(showmap)>> <<Include(surface_imager)>> <<Include(view_shape)>> ## <<Include(NEW_IMAGES)>> does not exist yet ## <<Include(UTILITIES)>> does not exist yet <<Include(BIGLIST.TXT)>> <<Include(GEOID.TXT)>> <<Include(MAPTRANS)>> <<Include(MGRAV.TXT)>> <<Include(MOSAIC.TXT)>> ## <<Include(NEWFILES.TXT)>> does not exist yet <<Include(SEEDS)>> ## <<Include(SEEDS (by mission))>> does not exist yet <<Include(SGRAV.TXT)>> <<Include(LMRK_DISPLAY1.pgm)>> <<Include(SHAPEDC.TXT)>> |
Line 31: | Line 65: |
= Test PDF Output = == Heading 2 == === Heading 3 === ==== Heading 4 ==== ===== Heading 5 ====== This is some text to see how it is reproduced in pdf. ---- |
<<Include(Notes_on_Gravity)>> <<Include(Mgrav)>> <<Include(Sgrav)>> ## <<Include(Sacc)>> does not exist yet <<Include(Selv)>> ## <<Include(Slap)>> does not exist yet ## <<Include(Spot)>> does not exist yet ## <<Include(Sslpa)>> does not exist yet |
coverage
Category D |
Version 3.0 |
Generates global coverage of what has been tiled and processed (as per landmark files)
Input - files
view_maps.in (you get this from using update_infiles.e)
Input - stdin
- What type of maps to use (all, only with landmarks and/or limbs). Typically 2
- Resolution (start and ending resolution).
- If you are working with limbs, do you want to see that data also?
Example
~/bin/coverage.e 0. All maps 1. Maps with lmks or limbs 2. Maps with lmks 2 0,.1 n
Output
- coverage_g.pgm - a global map showing what has been tiled to the specified resolution
display
Category D |
Version ? |
Description
display appears to generate an image that shows the location of landmarks on it.
Input Files
- An image
Input stdin
display asks you for an image from which to show the landmarks.
Here's an example:
input picnm FC21A0006549 Show single landmark? (y/n) n gc TEMPFILE.pgm Size = 1024 1024 cp TEMPFILE.pgm ./Display/FC21A0006549R.pgm Current T1/KS: 6 KS = 64 Update T1? (y/n) y Input new T1/KS 6 64
Output Files
display makes the file TEMPFILE.pgm which is a view of the image with small white dots showing the location of the landmarks.
image_map_mono
Category ? |
Version ? |
Description
What this program does
Input Files
- Bigmap - filename given as stdin
- PICTFILES -
Input stdin
No prompt is given for the name of the bigmap
- A 6 character filename of a bigmap (which needs to be in ./MAPFILES). The program will append the required suffix "MAP" itself.
- The program asks for slant angle. 0 is straight down. I assume it goes from 0 to 90 degrees.
123456 Enter slant angle (degrees) 30 Input PICNM FC21A0011878
This input looks like the name of an image that has a SUMFILE with it. I am guessing that it this image contains the sun position and view angle for the map specified.
Output Files
- An output image, view.pgm
image_map_rgb
Category D |
Version 3.0 |
Description
ímage_map_rgb generates an image of the bigmap. It renders a 3D image using the red and blue colors to establish depth of view.
Input Files
- Bigmap - filename given as stdin
- PICTFILES -
Input stdin
- A 6 character filename of a bigmap (which needs to be in ./MAPFILES). The program will append the required suffix "MAP" itself.
- The program asks for slant angle. 0 is straight down. I assume it from 0 to 90 degrees.
123456 Enter slant angle (degrees) 30 Input PICNM
This looks like the name of an image that has a SUMFILE with it. I am guessing that it this image contains the sun position and view angle for the map specified.
Flatten? (y/n)
Not sure what this does
Magnification
Note sure what the values are. I've tried 1
Output Files
- An output image, view.ppm
image_map_stereo
Category D |
Version 3.0 |
Description
ímage_map_stereo creates an image from a bigmap that shows the surface, using low-tech stereo -- two images side by side that you can get to cross if you defocus your eyes.
Input Files
- Bigmap - filename given as stdin
- PICTFILES -
Input stdin
No prompt is given for the name of the bigmap
- A 6 character filename of a bigmap (which needs to be in ./MAPFILES). The program will append the required suffix "MAP" itself.
- The program asks for slant angle. 0 is straight down. I assume it goes from 0 to 90 degrees.
123456 Enter slant angle (degrees) 30 Input PICNM
This input looks like the name of an image that has a SUMFILE with it. I am guessing that this image contains the sun position and view angle for the map specified.
Output
- An output image, view.pgm
Imager_MG
Category D |
Version 3.0 |
Description
Imager_MG makes images from a set of maplets. You provide it with a 12 character image name (standard SPC name). Imager_MG will read the solar position and spacecraft pointing, position, focal length and number of samples/lines to generate model derived image that matches the observing parameters from the source image.
Setup
- To make images you'll first need the following directories/files in your working directory:
Directories:
- TEMPLATES/ - Empty (this is where the .RAW files will be placed)
- IMAGEFILES/ - Empty
- SUMFILES/ - Filled (you'll need to copy these files or generate new ones)
- MAPFILES/ - Filled (these .MAP files will be used to generate the images)
- SHAPEFILES/ - Filled
Files:
- MAPLIST.TXT - Contains a list of all of the .MAP files. (Can be built from the .MAP file list, but need to remove the ".MAP" from each line. Needs an "END" at the end of the file.
NOTE!
- If REFLECT in INIT_LITHOS.TXT is not "MCEWEN", "VESTA", "NOPHASE", or commented out, the resulting TEMPFILE.pgm will be blank.
Execution
$ Imager_MG input 12-character picture name P607165886A4 Save image as template? (y/n) y
This will make a .RAW file and place it in TEMPLATES. The format for the .RAW file is the same as a DAT file.
== Output ==
Two options exist. Either a TEMPLATE file, <imagename>.RAW will be created in the TEMPLATES directory or it will simply make a display image, TEMPFILE.pgm.
Output is an 8-bit image (DN range 0 to 255)
Other Support
A batch script exists to support creating a large number of these files, makeImages. The source is in the GitHub repository, OREXSupport.
Execution
sh makeImages.sh
This will make a .RAW file and place it in TEMPLATES. makeImages.sh should have an "exit" at the end of the loop which will make it generate one .RAW file and then stop. Once you have confirmation that the script is working you can comment out the "exit" so the rest of the script will run.
sh viewImages.sh
This will read the .RAW files and make thumbnails for viewing in IMAGEFILES. This shell script can be used even before makeImages.sh is finished, although it will generate some errors.
Be sure to comment out the "exit" in viewImages.sh to generate all the images. Thumbnails of the images will show up in ~/send/
img-list - Contains a list of all the image names. (Can be built from the .SUM file list, but need to remove the ".SUM" from each line. No need for an "END." Also no need for spaces before the image name.)
- makeImages.sh and viewImages.sh - need to get these from EEP
Be sure to comment out the "exit" in viewImages.sh to generate all the images. Thumbnails of the images will show up in ~/send/
limber
Description
limber is the key tool for creating shape models using image limbs.
Specifically, limber creates LIMBVECS.TXT, which is a list of limb intersections for each image in body fixed coordinates.
These vectors can be used to create a shape model or merged with an existing model.
Input Files
Limber uses the file LIMBER.IN to set parameters. It uses all of the images in PICTLIST.TXT unless a LIMBER.TXT exist. LIMBER.TXT is a list of images to allow using a subset of the image list.
If defined in INIT_LITHOS.TXT, it an use:
- BLOOM
- SHPSIG
It requires SUMFILES for each image
Output Files
It creates LIMBVECS.TXT, which is a list of all of the vectors. Each image has its own file that lists the limbs, which is stored in LIMBFILES. This directory must be created by hand.
Usage Notes
Procedures
Get a starting shape model. You can use triax to build an ICQ for a starting shape model. You only need a Q of about 8 to get started. You can use the distance to target to get a 1st order estimate of the image pixel scale. With that, you can review the first images and measure the a, b and c axis of the object. These you feed into triax to get a starting shape model. It is trivial to estimate the rotation period from the images if you have a rotation movie.
- Register the images. Make sure that the center of figure of the model and the images are aligned.
Get a pole. Use either register with the x option or some other tool to get the RA and Dec for the pole (external source). Right now, I am estimating that the solution needs to be within 10 degrees of the correct value for limber to function well.
- Run *Limber Loop* - Perform the following until the shape model is within 2 pixels of the images
Run limber to get LIMBVECS.TXT
Review LIMBVECS.TXT to ensure they are stable.
You can use gnuplot (deleting the first line) or vecs2shape then shape2maps then view_shape.
Review the coverage of limbs coverage. You can expect to see a reasonable field of white points denoting that the images are generating good limbs. Gaps are okay because concave objects lack portions that display limbs.
Merge with existing shape model. This is not required -- you can just use LIMBVECS.TXT by itself, but you are more likely to get spikes at the beginning of the model.
You might want to reduce the number of vectors in the old model using dumber. I'd suggest going from 64 to 8 (using a factor of 8) (JRW recommends having the previous shape be the same as the Q of LIMBVECS.TXT. Weird things happen when the previous shape is low res and you have little coverage in LIMBVECS.TXT)
bin/dumber SHAPEFILES/shape-step11.txt SHAPEFILES/dump-step1.TXT 8 y
cat SHAPEFILES/dump-step1.txt LIMBVECS.TXT > vecs-step2.txt
vi vecs-step2.txt
- Remove the two Q values and the "END"
Convert a point cloud (list of vectors) into a shape model ICQ
vecs2shape This builds a shape from the vectors using spherical harmonics, so it has smooth edges
vecs2cube The builds a shape using only vectors. It is more accurate, but more likely to have artifacts (spikes). If this method is used, it may be good to dumb that new model down and run it through vecs2shape to generate a more stable model.
Review the model using shape2maps then view_map - or the viewMaps.sh if available.
- Install the model. Copy or symbolically relink it
relink.sh step2-icq.txt SHAPE.TXT
- Register the images to the new shape model
- Evaluate the registration
evalReg PICTLIST.TXT
- Repeat until the model is good. Good is defined as the agreement between the cyan and magenta shapes are within 2 pixels. At some point, you can stop merging the old shape model
Useful Things to Know
- LIMBVECS.TXT will be a Q size of the installed shapemodel
- If dumbing down the previous shape cases vecs2cube or vecs2shape to crash, when you run those programs try using a Q that is the same as the dumb downed version of the previous shape.
- When using vecs2cube, use a Q that is equal or less than LIMBVECS.TXT. Sometimes the shape will go unstable if you scale up here.
- If you want to go to a higher Q, use vecs2shape.
make_pictlistX
Category ? |
Version 3.0 |
Description
The executable make_pictlistX creates the file PICTLISTX.TXT. This routine is useful because it extracts necessary information from all the sumfiles so that potentially thousands of files do not have to be opened in order to determine whether a maplet is visible in an image by the lithos program. In other words, lithos will use the images listed in PICTLISTX.TXT before PICTLIST.TXT if PICTLISTX.TXT is present in the working directory. PICTLISTX.TXT will be loaded faster in lithos than PICTLIST.TXT because PICTLISTX.TXT lists the pictures that have precomputed data, which lithos uses.
Input Files
> make_pictlistX
Output
Compiled by KD
make_scriptA
Category B |
Version 3.0 |
Description
This program generates the run script and .INN files required to batch autoregister new images.
Required Files
input file:
make_script.in - Text file containing the names of the images to batch autoregister.
seed file:
make_scriptA.seed - Text file containing the autoregister option commands for batch registering images.
processed files:
TESTFILES/ - Directory in which to store copies of LMRK_DISPLAY1.pgm (output by autoregister) for each image.
autoregister requires a number of directories and files. Refer to autoregister for more information.
Output Files
make_scriptA outputs:
- run_script.b - run script for batch image autoregistration
- .INN files - autoregister seed file for each image
run_script.b output:
- .OOT files - standard output from autoregister for each image
processed files output:
TESTFILES/ - A copy of LMRK_DISPLAY1.pgm (output by autoregister) is saved for each image.
SUMFILES/ - Landmarks are added to the image's SUMFILE. Spacecraft/camera position/attitude are updated when you accept alignment shifts.
LMKFILES/ - Image names are added to the LMKFILES.
Using make_scriptA
- Create Input Files
Here is a sample make_script.in file (see that entry for further information):
P00045000450 P00045000451 P00045000452 END
You must precede each image filename with a space.
Here is a sample make_scriptA.seed file (see that entry for further information):
a 0,65,.25,0,3 1 2 n 0 n o .5 4 b 0 q END
Run make_scriptA
make_scriptA generates a .INN file for each image. It consists of the image filename followed by the autoregister options contained in the make_scriptA.seed file.
Here is a sample .INN file for image P00045000450:
P00045000450 y 0.5 n a 0,65,.25,0,3 1 2 n 0 n o .5 4 b 0 q
make_scriptA also generates the run_script.b script. Here is a sample run script file for image P00045000450:
rm -f P00045000450.OOT /usr/local/bin/AUTOREGISTER < P00045000450.INN > P00045000450.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/P00045000450.pgm rm -f P00045000451.OOT /usr/local/bin/AUTOREGISTER < P00045000451.INN > P00045000451.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/P00045000451.pgm rm -f P00045000452.OOT /usr/local/bin/AUTOREGISTER < P00045000452.INN > P00045000452.OOT cp LMRK_DISPLAY1.pgm ./TESTFILES/P00045000452.pgm
- Batch Autoregister Images
autoregister uses the file LMRKLISTX.TXT to prescreen the maplets. If you have added or deleted maplets recently, you should run make_lmrklistX.
Here is a sample command line for running run_script.b:
sh run_script.b
The autoregister standard output for each image is captured in the .OOT files. The LMRKDISPLAY1.pgm file output by autoregister is copied and stored in TESTFILES/ once an image has been processed. You must review the .OOT files to ascertain the success of the batch image autoregistration process.
There is currently no find-nofit program for batch image autoregistration.
(Compiled by DL)
make_scriptP
Category B |
Version 3.0 |
Description
The program generates the run script and .INN files required to iterate maplets using lithosP.
Required Files
input file:
make_script.in - Text file containing a list of the landmarks to be processed, appended with the end-of-file identifier, 'END'.
seed file:
make_scriptP.seed - Test file containing the lithosP option commands for iterating each maplet.
processed files:
INIT_LITHOS - make_scriptP reads the USRMX (maximum number of core processors) value.
TESTFILES1/ - Directory in which to store copies of LMRK_DISPLAY.pgm (output by lithosP) for each landmark.
lithosP requires a number of directories and files. Refer to lithosP for more information.
Output Files
make_scriptP outputs:
- run.sh - Controlling run script for batch maplet iteration using parallel processing.
- run script for each core processor:
- run_script01.b
- run_script02.b
- etc ...
- run script for each core processor:
.INN files - lithosP command seed file for each maplet.
- rem_script.b - Script for removal of temporary files (working directory clean-up).
run_scriptnn.b outputs:
.OOT files - standard output from lithosP for each landmark.]
processed files outputs:
TESTFILES1/ - a copy of LMRK_DISPLAY.pgm (output by lithosP) is saved for each landmark;
SUMFILES/ - S/C and camera information are updated by lithosP as image shifts are accepted. New landmarks and limb fits are added to the SUMFILEs;
MAPFILES/ - MAPFILES are updated by lithosP.
lithosP requires a number of directories and files. Refer to lithos for more information.
User Warnings
You must set the correct number of core processors for USRMX, a variable contained in INIT_LITHOS. Refer to that entry for further information.
Using make_scriptP
For more information on iteration procedures, refer to the 'How-To': Standard_iteration.
- Create Input Files
The make_script.in file lists the names for the landmarks that should be processed.
Here is a sample make_script.in file:
EE0001 EE0002 EE0003 etc... END
Be sure that the list is ordered by:
- highest-to-lowest maplet ground sample distance
name (region identifier (e.g., FF) + unique numeric identifier (e.g., 0001))
Also, be sure that there are no duplicate entries. You can use duplicates to generate the make_script.in file.
Here is a sample make_scriptP.seed file (see that entry for for further information):
# This script performs two maplet iterations in parallel mode. # It reinitializes slope and albedo. # It recomputes maplet overlaps. # It recomputes limb fits. # It recomputes central maplet vector. # Topography determination from slopes is conditioned by: # Initial topography, # Overlapping topography, # Shadowing, # Differential stereo, # Limb heghts. # Dataless area slopes are set from the shape model. # # The script hides most of the screen output. In order to obtain the # full display replace H* by #H*. # # Modified 2011_12_31. Header and comments added. # Modified 2014_02_26. Hide screen output added. # H* x .025 # # Initialize slope and albedo. # a y y # # Begin first iteration. # 0 40 1 0 1 n 0 y u 0 40 # # Begin topo determination. # 2 8 fill no data with shape slope 2 condition with existing topo .01 7 condition with shadows .025 1 condition with overlapping maps 4 condition with limbs 1, 2.5, 3 6 condition with differential stereo y 0 begin integration .025 15 0 u 1 0 2 n 0 y 1 0 1 n 0 y u # # Begin second iteration. # 0 40 1 0 1 n 0 y u 0 40 # # Begin topo determination. # 2 8 2 .01 7 .025 1 4 1, 2.5, 3 6 y 0 .025 15 0 u 1 0 2 n 0 y H* 1 0 1 n 0 y H* u # # Begin overlaps and limb fits. # o RECENT y 1 o RECENT n 3 y 1, 3, 5 # # Central vector determination. # v RECENT q END
- Run make_scriptP
make_scriptP generates a .INN file for each maplet.
Here is a sample .INN file for maplet EE0001.INN:
01 i EE0001 H* x .025 0 40 etc ...
The first three lines of the .INN file supply a processor identifier (e.g., 01), and load the landmark in lithosP. The remainder of the .INN file lists a copy of the lithosP commands contained in make_scriptP.seed.
make_scriptP also generates the controller run script run.sh, which looks like this:
chmod +x run_script01.b chmod +x run_script02.b etc ... cd SHAPEFILES chmod +w SHAPE.TXT cp SHAPE.TXT TSHP01.TXT cp SHAPE.TXT TSHP02.TXT etc ... chmod -w SHAPE.TXT cd .. ./run_script01.b & ./run_script02.b & etc ...
make_scriptP also generates the run_script01.b, run_script02.b etc. files, which look like this:
rm -f EE0001.OOT /usr/local/bin/LITHOSP < EE0001.INN > EE0001.OOT cp LMRK_DISPLAY01.pgm TESTFILES1/EE0001.pgm rm -f EE0007.OOT /usr/local/bin/LITHOSP < EE0007.INN > EE0007.OOT cp LMRK_DISPLAY01.pgm TESTFILES1/EE0007.pgm rm -f EE0013.OOT etc ...
- Conduct Standard Iteration
Here is a sample command line for running run.sh:
sh run.sh
You can also run this in the background using this command line:
nohup sh run.sh &
The lithosP standard output for each image is captured in the .OOT files. The LMRKDISPLAY.pgm file output by lithosP is copied and saved in TESTFILES1/ once a landmark has been processed.
- Quality Check Iterated Maplets
You must review the .OOT files to ascertain the success of the iteration process. You can detect problem landmarks using find_nofitP. Refer to that entry for more information.
- Clean Working Directory
You can use rem_script.b to clean out the directory of make_scriptP working files once iteration is complete and you have quality checked the iterated maplets.
Here is a sample rem_script.b file:
rm -f *.INN rm -f *.OOT rm -f run_script*
(Compiled by DL)
refresh_sumfiles
Category D |
Version 3.0 |
Description
refresh_sumfiles rebuilds the sumfiles to make them match the maplets. When you receive new maplets and landmarks, the different lat/lon landmarks can have different names. This routine goes through the system and updates the sumfiles so they match the landmarks and maplets.
Input Files
- PICTLIST.TXT
- SUMFILES
Input stdin
- None
Output Files
- Updates the sumfiles in SUMFILES
make_sumfiles
Category B |
Version 3.0.1 |
Description
This program ingests images into SPC, building the sumfiles and nominals.
make_sumfiles reads metadata about the images from make_sumfiles.in, the position and pointing data from the kernels, and camera metadata from make_sumfiles.txt to generate body-fixed spacecraft position and pointing. It does the following:
Generates <filename>.SUM in SUMFILES
Generates <filename>.NOM in NOMINALS
Appends the image name onto PICTLIST.TXT
User Warnings
All the vectors in the sumfiles and nominals are in a body fixed frame with the origin at the center of the target body. The origin might be off a little bit, which means you may have to use shift eventually.
The ck and spk kernel names in make_sumfiles.txt must cover the time span of all the images being ingested. Otherwise, make_sumfiles will not work.
This program is non-standard. It frequently requires different versions for different missions to get the data in a form usable by SPC. Although the goal is to make a single version that does it all, each mission has a different image format.
If the image name is already listed in PICTLIST.TXT, make_sumfiles will not make NOMINALS or SUMFILES when you select option "0". (See below)
Changes from the ECR for 3.0.1
- Put in COM offset for the spacecraft -- See 15 June 2017 document from Brishen Hawkins and Coralie Jackman -
- Requirement SOR.5013 - account for the offset from the spacecraft center of mass of each camera
SCOBJ_SHIFT.TXT maintains the current required shift between the center of mass of the OREx spacecraft and the camera focal plane. There is one line per camera consisting of camera number, delta X, delta Y, delta Z. Units are in meters. The coordinate frame is _. If the file isn't present, then this processing step will just be skipped.
1 0 0 0 2 0 0 0 3 2000 3000 4000 4 1 1 30000 5 1 1 30000
1 0.d0 0.14351D-02 0.d0 mapcam 2 0.d0 0.64241D-04 0.d0 samcam 3 0.d0 -0.79251D-02 0.d0 polcam 4 0.d0 0.14540D-03 0.d0 navcam 5 0.d0 0.14508D-03 0.d0 nftcam
Input Files
- Spice kernel file (SPICE)
make_sumfiles.txt - list of SPICE kernels
make_sumfiles.in - list of files from process_fits
SCOBJ_SHIFT.TXT - adjustment for spacecraft center of mass to focal plane
TMP2FOCLEN.TXT - adjustment of focal length based on temperature
BIAS.TXT - a simple shift of the spacecraft position.
Output Files
IFRAME.TXT - picture properties
PICTLIST.TXT - list of pictures
NOMINALS - nominal navigation information and uncertainties
SUMFILES - camera properties and navigation information
RandV.TXT - File comtaining s/c inertial position and velocity ordered by time.
Using make_sumfiles
When new images have been run through process_fits, then you can finish the ingestion by running make_sumfiles. Option 0 brings in new images. Typically, you will have to update make_script.txt to include SPK and CK kernels that cover these new images. Typically, you want to wait until the reconstructed kernels have been published (although you can use predicted kernels and then update them using make_sumfiles, option 1).
Option 1 is used when there is an update to the kernels (typically updated CK or SPK). It can also be used to update that starting sigma for the NOMINALS, but dynamics is a better tool for that because updating the NOMINALS will update everything to the same value.
Option 2 must be used with care. This changes the existing SUMFILES, and it allows you to tweak specific parts. Care is needed because you don't want to overwrite anything that had been done by hand and is believed to be correct (most specifically, geometry).
The following sample shows the standard inputs and the list of options for make_sumfiles:
~/bin/e.make_sumfiles Use B-Frame? (y/n) n 0. Create SUMFILES & NOMINALS and .. 1. Update old NOMINALS and .. 2. Update old SUMFILES 0
Usually, the B-Frame is not selected. The author has never selected it.
Enter the appropriate option:
0 Create SUMFILES & NOMINALS and .. - Completes both operations and ends.
1 Update old NOMINALS and .. - Completes NOMINALS operation and ends.
2 Update old SUMFILES - Issues the following prompts:
Update UTC? (y/n) Update image thresholds? (y/n) Update camera parameters? (y/n) Reset geometry? (y/n) Reset sigmas? (y/n)
Update UTC - Updates time a picture was taken.
Update image thresholds - Changes image constraints.
Update camera parameters - Changes the camera focal length, K-matrix, etc.
Reset geometry - Resets position and pointing back to nominal.
Reset sigmas - Resets uncertainty back to nominal.
Additional Reference
Alternative Description
Combines the converted image file with the image number, spacecraft state, spacecraft position & velocity and pointing information along with the associated calculated errors (Sigmas).
[from MAKE_SUMFILES.f]
Option 0 creates .SUM and .NOM files for any new images but leaves all others C unchanged. Additionally, option 1 updates all .NOM files. Option 2 dies all of the C above and makes changes in all .SUM files. The possible changes, specified in new C entries in make_sumfiles.txt, are: C C Update UTC? (y/n) C Update image thresholds? (y/n) C Update camera parameters? (y/n) C Reset geometry? (y/n) C Reset sigmas? (y/n) C C The procedure first uses SPKEZ to calculate the spcaecraft - object vector SCOBJ and C the unit vector to the Sun in inertial space at the ephemeris time ET of an image. C It also determines the light time LT from the s/c to the target. It then determines C the transformation matrix from the camera frame (INST) to inertial space (TTVI) at C time ET using the SPICELIB routine PXFORM. Now all relevant quantities are available in C inertial space. In SPC all these quantities are used in the body-fixed frame, so we again C use PXFORM to translate from inertial to body-fixed (TIPM). We do this not at ET but at C ET-LT, since this is when the light forming the image left the target body.
(Compiled by KD)
mosaic
Description
Describe mosaic here.
MOSAIC.TXT - Lists all of the images that you want to put in the mosaic. Frequently, we use this to export the data for a specific (and single) image.
Versions
mosaic.f - (from Bob). Generates a scaled mosaic image from the images provided.
rawMoasic.f - This reads the exact values from the DAT file and allows explicit scaling of the data.
Running rawMosaic
~/bin/e.rawMosaic TSI003 4.6e-5<values from phase.img> 26.232<values from phase.img>
panaroma
Category ? |
Version ? |
This code was developed for the Mercator Project (LASER Program). The code uses Gaskell's basic infrastructure and data files.
Description
Panaroma will take a big map and generate a 360-degree view of the surface.
Input Files
- none
Input stdin
- Bigmap - 6 character name of a bigmap
- Location - x, y, z of where to make the image. x and y are based on pixels within the bigmap (rather than lat/lon or meters). Z is meters above the surface.
Here's an example input:
123456 390, 1990, 10
Output Files
- PANORAMA.pgm - The image file (in pgm format). Currently, I've been using a version that has lines at N, E, S and W. ~epalmer
refresh_sumfiles
Category D |
Version 3.0 |
Description
refresh_sumfiles rebuilds the sumfiles to make them match the maplets. When you receive new maplets and landmarks, the different lat/lon landmarks can have different names. This routine goes through the system and updates the sumfiles so they match the landmarks and maplets.
Input Files
- PICTLIST.TXT
- SUMFILES
Input stdin
- None
Output Files
- Updates the sumfiles in SUMFILES
showmap
Category D |
Version 3.0 |
Description
showmap takes a bigmap and generates an image of that specific map. The view is from directly above with a limited shaded relief. There are no controls to adjust the Sun angle.
Input Files
Bigmap - Filename given via stdin. The file must be in the MAPFILES subdirectory.
Input stdin
- The 6 character name of a bigmap. The suffix ".MAP" will be added by the program.
123456
Output Files
Generates an image (pgm) format from the bigmap. The output name is the same as the filename, except it has a different extension.
surface_imager
Category ? |
Version ? |
This code was developed for the Mercator Project (LASER Program). The code uses Gaskell's basic infrastructure and data files.
Description
surface_imager takes a bigmap and generates a surface image as if you are standing on (or near) the surface. It is designed to have a 100mm focal length lens and generate a 1024x1024 image.
Input Files
- none
Input stdin
- Bigmap name
- Location of the point of view (x, y, z). X and Y are pixel positions within the map. Z is in meters above the surface.
- Direction that you are looking (azimuth and elevation - in degrees). Zero azimuth is looking due north. Zero elevation is looking at the horizon.
- Sun position (azimuth and elevation - in degrees). Zero azimuth has the Sun due north. 90 elevation is the Sun straight up.
Here's a sample input:
123456 1733 1393 10 90, 0 60, 30 <- low sun angle
Output
- IMAGE.pgm - The output image. Normally, it is 1024x1024 of the field of view (about 24 degrees square).
view_shape
Category D |
Version 3.0 |
Description
view_shape generates a point-of-view image of the shape model.
SPC Tools Suite |
viewShape.sh -- helper app that copies geometery0*.in and runs view_shape |
Must have shape2maps run first. It creates the SHAPE[12345].MAP, etc.
Input Files
Shapefiles - filename given as stdin
geometry.in
Input geometry.in
'view' 1024 1024 8
- Filename, x and y number of pixels, and bit length
1500 40 40
- Focal length and FOV
-1 0 0 0 0 -1 0 -1 0 -1 3 0
- Sun position
0 50000 0
- Point of view, distance from object
Output Files
- The output image in pgm format
- Name: view.pgm (or as described in geometry.in)
CategoryPrograms CategorySPCTools
BIGLIST.TXT
Category ? |
Version 3.0 |
Description
This text file is created by bigmap and is a list of all bigmaps that are in the BIGFILES directory. Each new bigmap is appended to the list.
Here is a sample BIGLIST.TXT file:
T11T10 T11T05 T11EV1 T11EVB TEMP01 T11MEP T11T02 T11T01 END
(Compiled by TC)
GEOID.TXT
Description
Describe GEOID.TXT here.
Here's a sample GEOID.TXT:
128 -221.35344 -8.85696 139.06352 -220.47724 -6.14820 140.19961 -219.53262 -3.47455 141.37418 -218.59389 -0.73767 142.47990 -217.63467 1.98487 143.55628 -216.64763 4.58460 144.61879 -215.68697 7.22421 145.57019 -214.75280 9.87072 146.44022 -213.78082 12.50339 147.30178 -212.75323 14.99986 148.21306 -211.67113 17.50965 149.16230 -210.54611 20.09047 150.12774 ........
MAPTRANS
Description
These tools will allow you to visualize individual maplet translations.
getMapl.sh
Input Files
BEFORE running getMapl.sh, build a bigmap of the region you wish to study, and run RESIDUALS. USED_MAPS.TXT and MAPINFO.TXT need to be up to date. getMapl.sh should be run from your working directory.
Here's a sample input:
sh getMapl.sh Input region name. (ex: TAG1) >TAG1
Output Files
- TAG1mapl.txt
Temp Files
- .o
- .oo
Script File
File: getMapl.sh #!/bin/bash ######################## # USAGE: sh getMapl.sh # # # ######################## echo "Input region name. (ex: TAG1)" read ans file=$ans cp USED_MAPS.TXT .o sed '$d' .o > .oo list=`cat .oo` for i in $list do grep $i MAPINFO.TXT >> ${file}mapl.txt done rm .o .oo
calTrans.sh
Input Files
This should also be run from your working directory, and requires the output file from
getMapl.sh to be in that directory.
Here's a sample input:
sh calTrans.sh Input region name. (ex: TAG1) >TAG1 Input TAG1 mapinfo list. (ex: TAG1mapl.txt) >TAG1mapl.txt
Output files
- TAG1.txt
Temp Files
- CompOBJ.out
- fit
- *.obj
For each maplet within the bigmap that was created earlier, an .obj file is made. one at a time, and then delteted.
Script File
File: calTrans.sh #!/bin/bash ########################################## # USAGE: sh calTrans.sh # # # # N.B. You must have your region mapinfo # # file in your working directory. # ########################################## echo "Input region name. (ex: TAG1)" read ans1 file=$ans1 echo "Input $ans1 mapinfo list. (ex: TAG1mapl.txt)" read ans2 mapl=$ans2 list=`cat $mapl | cut -c -6` mv -f $file.txt old.$file.txt for i in $list do Maplet2FITS MAPFILES/$i.MAP fit FITS2OBJ --local fit $i.obj rm fit CompareOBJ --compute-optimal-translation $i.obj SHAPEFILES/shape3.4-truth.obj > CompOBJ.out rm $i.obj trans=`awk '/Translation/{print $2 " " $3 " " $4}' CompOBJ.out` coord=`grep $i $mapl | awk '{print $4 " " $5 " " $6}'` printf "\n$i $coord $trans" >> $file.txt done rm CompOBJ.out
plotVectors.sh
=== Input Files ====
Run this from your working directory, and keep the output from calTrans.sh there too.
Here's a sample input:
sh plotVectors.sh Input region name. (ex: TAG1) >TAG1 Input view Scaling factor. (ex: 1.5) >1.5
Output Files
- TAG1xyzV[000:015:165].png
- TAG1vec.gif
Temp Files
- pvTrans.gpi
Script File
File: plotVectors.sh #!/bin/bash ###################################### # USAGE: sh plotVectors.sh # # # # N.B. You must have the output from # # calTrans.sh in your working # # directory. # ###################################### echo "Input region name. (ex: TAG1)" read ans1 file=$ans1 echo "Input view scaling factor. (ex: 1.5)" read ans2 fac=$ans2 scale=0.00436 # Conversion from LON to m, change if r mag deviates from 0.25km # list='0 15 30 45 60 75 90 105 120 135 150 165' list2='000 015 030 045 060 075 090 105 120 135 150 165' arr=($list2) cnt=0 for i in $list do echo "set term x11" > pvTrans.gpi echo "unset key" >> pvTrans.gpi echo "unset border" >> pvTrans.gpi echo "unset xtics" >> pvTrans.gpi echo "unset ytics" >> pvTrans.gpi echo "unset ztics" >> pvTrans.gpi echo "scale="$scale >> pvTrans.gpi echo "fac="$fac >> pvTrans.gpi echo "set view 86,"$i",," >> pvTrans.gpi echo "splot '"$file".txt' using ((360-\$3)*scale):(\$2*scale):4:(\$5*fac):(\$6*fac):(\$7*fac) with vectors" >> $ echo " " >> pvTrans.gpi echo "set output '"$file"xyzV"${arr[$cnt]}".png'" >> pvTrans.gpi echo "set term png" >> pvTrans.gpi echo "replot" >> pvTrans.gpi echo "unset output" >> pvTrans.gpi gnuplot < pvTrans.gpi cnt=$(($cnt+1)) done rm pvTrans.gpi convert -delay 50 -loop 0 ${file}xyzV*.png ${file}vec.gif
MGRAV.TXT
Description
MGRAV.TXT is the output from Mgrav.e. This is a bigmap specific data file, similar to SGRAV.TXT. It contains the size of the map, as well as many useful parameters.
- Line one: imax and jmax (the width of the map)
- Line two: Position of v (center point?), a 3 component vector (v(k), k1,3)
- All following lines: (vertex i, j, k and potential, acceleration, slope, elevation). The vertex positions should be identical to the map (maplet or bigmap) that you specified (i.e., row and column format of equal spacing along the surface of the object).
- Column 4 is potential???.
- Column 5 is acceleration (km/s/s). From a review of the output, I grossly assume that it is the gravitational acceleration at that location with respect to a constant height over the entire map (from the middle point of the map).
- Column 6 is slope (degrees).
- Column 7 is elevation (km?). Elevation is based upon the deviation from the center point of the map. You will find that the middle of every map will be 0.
2049 2049 57.145420074462891 -15.315745353698730 -220.78500366210938 0.13277E+03 -0.71393E+02 -0.18624E+03 -0.69832E-01 0.24570E-03 0.95146E+02 -0.47969E+01 0.13276E+03 -0.71325E+02 -0.18628E+03 -0.69828E-01 0.24570E-03 0.11549E+03 -0.47811E+01 0.13276E+03 -0.71257E+02 -0.18632E+03 -0.69825E-01 0.24571E-03 0.11527E+03 -0.47653E+01 0.13275E+03 -0.71189E+02 -0.18636E+03 -0.69821E-01 0.24571E-03 0.11522E+03 -0.47512E+01 0.13275E+03 -0.71121E+02 -0.18640E+03 -0.69818E-01 0.24572E-03 0.64173E+02 -0.47387E+01 0.13274E+03 -0.71053E+02 -0.18643E+03 -0.69815E-01 0.24573E-03 0.11524E+03 -0.47271E+01 0.13274E+03 -0.70985E+02 -0.18646E+03 -0.69813E-01 0.24574E-03 0.64958E+02 -0.47172E+01 0.13273E+03 -0.70917E+02 -0.18650E+03 -0.69811E-01 0.24576E-03 0.11555E+03 -0.47081E+01 ....
Script
Here is a simple perl script that will rip off columns. You run this in unix by "perl scriptname > output.txt"
# Eric E. Palmer - 23 Sep 2012 # Perl script to read a file and output the absolute distance of the first 3 columns # or other columns # It is assumed that that is the distance that vector is from the center # and that it is reading an equa-spaced file open FILE, "MGRAV.TXT" or die $!; # Get the map sizes $data=<FILE>; chomp ($line); $data =~ s/\s+/\t/g; @items = split(' ', $data); # Break line into an array $i=$items[1]; $j=$items[2]; # Skip the next line $dump=<FILE>; # Loop until you run out of data $cnt=0; while (<FILE>) { chomp; # remove trailing linefeed $data = $_; # $data =~ s/\s+/\t/g; # convert blocks of spaces to tabs @items = split(' ', $data); # Break line into an array # Get data - uncomment out the item you want #printf ("%3.5e ", $items[4]); # elevation #printf ("%3.5e ", $items[5]); # acceleration #printf ("%3.5f ", $items[6]); # potential printf ("%3.5f ", $items[7]); # slope # Use this to get topography (or distance from center of gravity) #$a=$items[1]; # i #$b=$items[2]; # j #$c=$items[3]; # k #$dist = sqrt ($a*$a + $b*$b + $c*$c); # distance from center #printf ("%3.2f ", $dist); #distance (or topography) $cnt++; if ($cnt >= $i) { $cnt=0; printf ("\n"); }; } close (FILE); printf ("\n");
MOSAIC.TXT
Description
MOSAIC.TXT is a list of images that mosaic will use to construct an image.
These images will be registered and resampled based upon the bigmap you are using. You can use a single image if you'd like to see where the image lands on the bigmap.
JRW Edit: When working with MOSAICX (i.e. the line sample version of MOSAIC) I found the order of MOSAICX.TXT is the first image listed will be "on top". So in the example below, FC21A0014660 could be fully covered by the other images, such that none of the DN values from that image will show up in the mosaic. I assume MOSAIC works the same way.
FC21A0014661.DAT FC21A0016635.DAT FC21A0016636.DAT FC21A0022692.DAT FC21A0023442.DAT FC21A0023449.DAT FC21A0026846.DAT FC21A0026847.DAT FC21A0014660.DAT END
SEEDS
Here is a list of the all SEED files used by SPC
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS v1.0
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS v1.0
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS v1.0
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS v1.0
- Dawn - Vesta v1.0
- Dawn - Ceres v1.0
- OSIRIS v1.0
SGRAV.TXT
Description
SGRAV.TXT is similar to SHAPE.TXT with extra columns for surface acceleration, potential and laplacian (just as a check).
- First row is Q
- Second and following:
- V1, V2, V3 vector nodes (assuming)
- Columns 4, 5, and 6 are the acceleration vector in (i, j, k) space. (assuming)
- Column 7 is gravitational potential (assuming)
Column 8 is LaPlacian (assuming)
128 -218.72182 -8.78589 136.89489 0.11248E-04 0.30378E-06 -0.92691E-05 -0.38630E-02 0.70306E+01 -217.94953 -6.10207 138.09736 0.11205E-04 0.20447E-06 -0.93190E-05 -0.38612E-02 0.70200E+01 -217.59664 -3.46244 139.74751 0.11149E-04 0.69747E-07 -0.93677E-05 -0.38501E-02 0.56378E+01 -216.83911 -0.75086 140.98874 0.11093E-04 -0.83396E-07 -0.94265E-05 -0.38468E-02 0.61447E+01 -216.04842 1.95086 142.19411 0.11036E-04 -0.23663E-06 -0.94770E-0 .........
LMRK_DISPLAY1.pgm
Description
LMRK_DISPLAY1.pgm is the key file to see how the images are matching with the illuminated topography. When the template is built, this shows the inputs on the template from the images. Work should continue until the paired rows are nearly identical.
The file is a pgm, which is a binary bitmap. It is easy to program and write using fortran, but not easy to view. Here are some suggestions that can be used to view the file.
ImageMagick - Open source and very powerful. Unix based.
- display (/opt/local/bin/display)
convert <file.pgm> <file.jpg> Palmer's favorite
toyviewer - Unix program. https://www.macupdate.com/app/mac/12453/toyviewer
GraphicConverter - Commercial program. Gaskell's favorite
- xv (old X11 program)
Notes on Gravity
Description
(From email 7 September, 2012)
In the gravity folder there is a routine called Sgrav. It makes a file called SGRAV.TXT that is like SHAPE.TXT but with extra columns for surface acceleration, potential and laplacian (just as a check). This is for a non-rotating body with GM=1. Then Sacc, Spot, Sslp and Selv compute the surface acceleration, potential, slope and elevation (above geoid) for the body with the correct GM and omega. Selv also makes the geoid file.
The main subroutine is GRAVITY. It computes the gravity at any point in space, inside, outside or on the surface. I used it in my trajectory integration program for landing on Eros. GLATLON is a special program I wrote for someone who wanted various information for points on Eros. You can see how GRAVITY is used there. There are five subroutines called by gravity called D1-D5 that subdivide the surface elements if your point of interest is too near to a facet. Essentially it mimics a recursive call since you can't do that in FORTRAN.
Mgrav
Category ? |
Version ? |
Description
Mgrav.e takes a bigmap and generates four (4) ppm images depicting: elevation, acceleration, potential and slope. The images are RGB and are unscaled.
Input Files
bigmap - The is a bigmap that is maintained in MAPFILES/<whatever>.MAP
Required Files
These are important to consider because they can cause conflicts if you run more than one instance of the program.
MGRAV.IN - gets GM and omega
SGRAV.IN - ????? gets Q, K, I, J, F
SGRAV.TXT - Output from the gravity generation from the shape model
Working Files (generated)
view.gray - Temporary file that is used to write data before final images are generated
sml.imh - Temporary file that is used to write data before final images are generated
Input stdin
- What it asks for
Name of map file ZN0026
- Another argument
Output Files
- Original bigmap viewed in shaded relief
Sgrav
Category ? |
Version ? |
Description
Sgrav takes a shapefile and generates extra data showing gravity info on it, specifically the surface acceleration, potential and laplacian. This is for a non-rotating body with GM=1.
Input Files
Shapefile - Full path and extension is needed.
Input stdin
- What it asks for
input shapefile SHAPEFILES/SHAPE.TXT
Output Files
SHAPE.TXT but with extra columns for surface acceleration
- ?????
Parallel Conflict
- Minimal conflict
- Multiple runs in separate directory
- Shape file (SHAPE.TXT) must remain static.
Selv
Category ? |
Version ? |
Description
Provided the correct GM and Omega, Selv will use SGRAV.TXT file to create the surface elevation (same as geoid).
Required Files
- SGRAV.TXT
Input stdin
This is sometimes contained in MGRAV.IN
- What it asks for
GM (km^3/s^2), Omega (deg/day) 1.728e10 1617.250674
Output Files
- some large negative number (e.g., -65890511.606425241)
SHAPEFILES/GEOID.TXT - gives the geoid in X, Y, Z position. A 3 column file.
SHAPEFILES/SHAPEC.TXT - gives the height above the surface. A 4 column file.