CAMPT for LROC WAC images

A transfer from the original Astrodiscuss forum (from Compater)

For my current project I am using ISIS to calculate the subsolar and subspacecraft points for all pixels in map projected WAC images. Sato et al., [2014] describe the wide angle camera in detail and mention that the emission angle also depends on the band in question, i.e., the 415nm band in the visible file is up to 7.5 degree in along track direction while the 643nm band on the other hand is approximately 0 degree in along track direction. However, if I call the campt command for ground pixels to output the angles and subspacecraft point I only get one value. Which wavelength channel does this output represent? From my understanding when the images are map projected all channels are
“georeferenced” in between bands. So one pixel in the image cube all channels represent the same ground pixel. Therefore, a certain position on the ground would be captured from slightly different spacecraft positions and each channel should have a different subspacecraft point. The smallest emission angle, which is calculated based on the subspacecraft points and a vector [0,0,1] for the surface normal, in the entire image is usually approximately 6 - 7.5 degree. Am I, therefore, right if I assume that ISIS is calculating the values for the 415nm wavelength channel? I couldn’t find any information about which channel ISIS is using. Thank you for your help in advance.

transferred (from rbeyer)

The campt program is calculating the values for whichever LINE and SAMPLE you tell it to use in the image, which defaults to the center of the image, if you don’t specify it. Are you varying the LINE and SAMPLE arguments to campt?

That’s also lot of ISIS campt running (for each pixel in an image). You may want to explore using ISIS phocube which can calculate those values for each pixel in a single go.

However, you also say you’re running campt on map-projected images, which according to its documentation isn’t possible. It can only be run on camera-geometry images, not map-projected images.

Maybe you can share an example command line or two and the output so we can try and see what’s going on and how you’re getting the same answer twice when you’re expecting something different.

transferred (from Compater)

Thanks for the reply.

Because of the wide field of view the angles change significantly inside of a WAC image even between single pixels. Therefore, I want the information for each pixel. If I do it for level 1 data I don’t know how to determine the transformation of the Line and Sample positions to the map projected images. I can specify the type of coordinates as ground to give the campt command latitude and longitude values instead of LINE and SAMPLE. USGS: ISIS campt Application Documentation

You are right, if I run the campt program for every pixel individually it takes ages. However, I use the usecoordlist and coordlist options to provide a file, which I created with python that contains the latitude and longitude values for all pixels in the map projected images. An additional complication is that WAC images are split in even and odd channels that are mosaiced later. And for mosaiced images all camera information is lost. Following my code to call the command:

def call_campt_one_step(lat_range,lon_range,wac_id,data_folder,even_odd='even'):
    temp_name = '{}/temp/{}.{}.{}'.format(data_folder,wac_id.lower(),'vis',even_odd)

    list_coords_filename = '{}_coordlist.txt'.format(temp_name)
    output_file_name = '{}/{}_{}.txt'.format(data_folder,wac_id,even_odd)
    xv, yv = np.meshgrid(lon_range, np.flip(lat_range))
    lat_lon_df = pd.DataFrame({'lat':yv.flatten(),'lon':xv.flatten()},columns=['lat','lon'])

    campt_cmd = ['campt','from={}.map.cub'.format(temp_name),'to={}'.format(output_file_name),\

    except ProcessError as e:
    return output_file_name

This is for example the SubspacecraftLatitude for one part of the image and only the odd lines.


I didn’t necessarily expect a different result, but I was curious why I cannot specify the channel and which channel the results represent or if my interpretation of the WAC instrument is wrong. But maybe I 'm just using the wrong command. I previously only needed one value per image because I was working with much more narrow field of views. I didn’t know about the phocube command. Actually that might make it a lot easier. It appears that this also works on map projected images. I will try it out later.

transfered (from jmapel)

campt doesn’t do do different bands for input images, it could be added potentially. As a work around, you can specify the band you want the geometry of by tweaking the input band selection. For example:

campt from=my_image.cub+2 ...

will use the 2nd band of the image. To convert channels to bands look at the bandbin group on the cube label, it should specify the wavelengths for each band.