Lunar Procedures
Before beginning, make sure to install an official global shape model. This will ensure that the DTM generated will be tied to the official coordinate system.
Use JMars for the Moon (or some other appropriate program) to determine which images will be used to build the DTM. Use the calibrated images. Ex. M102165049LC
Use processLRO-orig.f to ingest the images. The SPICE kernels for each image will need to be added to LRO/PROCESS_IMG.IN.
<Depricated> In JRW's experience, the SPICE kernels are poor enough that the image position/pointing will need to be updated before building the DTM. Perhaps this step will not be needed if using an official global shape model. Nonetheless, it would be good to find a low emission low resolution image (such as a WAC image), and align all the images to it. A low emission image is key to minimize projection problems; for LRO, there should be WAC images with only a few degrees emission angle. All the images should then be aligned to this image using "x.register". </Depricated>
If images are poorly aligned to the shape, make sure the clock kernel is current. Aligning NAC images to WAC images shouldn't be needed, and may actually increase the error, though this hasn't been tested. WAC images seem to have some sort of distortion at the edges of the image.
After this step, all the normal SPC procedures can be used. However, be careful with using lots of AUTOREGISTER and GEOMETRY Opt 2. Always make a backup before doing either, and try to minimize the number of times you run these programs. Since we are now aligning the images before generating the DTM, frequently updating the position/pointing is probably okay, but in the past JRW has gotten into trouble by using these programs too much.
Notes on Making ISIS Cubes
This is an incomplete description of how to build the ISIS cubes. Portions of this are being filled in over time. JRW 08 Feb 2020
Start here. Steps to build -- The details of how to build cubes.
Fixing errors that showed up during MOSAICX for Phase.
The process for fixing these errors in Phase is the same as for that in Emission. Here I have a different programs and procedures only because the names of files are different.
- Check the original Phase cube to fine a portion of the cube that has no phase (in this case, it will be the "Offset" value from the "meta" file from the merge program.
cd img-{LastFive} qview rawP-RG3ED1.cub
- Update dumpMapLRO_fixErrorsLastFivePhase.f if it does not match the needed location of the image (i.e. upper left, center, upper right, etc.). Search for "checkI =". Change the checkI value and compile if needed. Note: Since I have to keep updating this code, I just leave the output as "a.out".
cd working/ ~/X-files/source/a.out MapName LastFive 1000
- Check the offset value output by the program (you may have to scroll up a lot to find it) and make sure it is close to the value in "NEW_IMAGES/{Modified PDS Img Name}-meta", there will be slight differences due to how the float is saved. If it looks correct, proceed.
mv RG3ED1-fixed-p.txt ../img-{LastFive}/
- Now make the cube and set up all the proper links to have a paper trail...
cd img-{LastFive} ascii2isis from=RG3ED1-fixed-p.txt to=RG3ED1-fixed-p.cub samples=1415 lines=1415 mv rawP-RG3ED1.txt orig-rawP-RG3ED1.txt mv rawP-RG3ED1.cub orig-rawP-RG3ED1.cub relink.sh RG3ED1-fixed-p.cub rawP-RG3ED1.cub relink.sh RG3ED1-fixed-p.txt rawP-RG3ED1.txt qview orig-rawP-RG3ED1.cub rawP-RG3ED1.cub
- Link the two cubes together so you can zoom in on the same portion of the image. Next we want to make the dark pixels more noticeable. Click the "Contrast Tool" copy the lower number into the higher number, and increment the value by one. Do this for both images. Then zoom in on an area in the orig cube to make sure the pixels have been fixed.
Better, stronger, faster way to make cubes
Bob uses calibrated images (i.e. image ID. ends in C), no need to ever use the engineering images (i.e. image ID ends in E). You do need to re-ingest the calibrated images using e.processLRO-jrw to preserve data values for I/F. e.processLRO-orig re-scales the data values to maximize the number range in bit space, and we don't want that here. Use e.rawMOSAICXjrw to preserve I/F values when writing the I/F file, and phasei to output the angles directly from SPC. Then all you have to do is use ascii2isis!
What to include in a delivery.
- ISIS cube for relevant images (or all images if there are a small number)
- I/F
- Phase
- Incidence
- Emission
- Lat/lon of 4 corners and center of the bigmap (Upper left is 1,1; Center is Q,Q; Lower right is Q*2+1, Q*2+1)
- PDS Image name for all cubes
FlatMap and FlatAlbedo for bigmap
- SHOWMAP for bigmap
How to ingest PDS IMG DTM into a bigmap
* Use PDS2BIG