{'fraction_non_alphanumeric': 0.023792724992160553, 'fraction_numerical': 0.011798369394794606, 'mean_word_length': 4.746171171171171, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Meter-Scale Slopes of Candidate InSight Landing Sites from Point Photoclinometry

Photoclinometry was used to analyze the small-scale roughness of areas within the proposed Mars InSight landing ellipse. The landing ellipse presented in this study is in Elysium Planitia.This study was able to constrain surface slopes on length scales comparable to the HiRISE image resolution (0.25 meters/pixel and coarser). The InSight mission has various engineering constraints that each candidate landing ellipse must satisfy. These constraints indicate that the statistical value of the slopes at one, two, and five meter baselines are an important criterion. This technique estimates surface slopes across large swaths of each image, and builds up slope statistics for the images in the landing ellipse. The slopes I derived for the InSight landing site ellipse in this study are within the small-scale roughness constraints put forth by the InSight project. These results have provided input into the landing hazard assessment process.


Introduction
The InSight mission (Banerdt et al. 2013) will be sending a lander to the surface of Mars in 2018. In order to reduce the risks of damage during landing, the InSight project has determined a set of engineering constraints (Golombek et al. 2014) that potential landing ellipses need to satisfy and has carried out a complete landing site assessment (Golombek et al. 2016). Among these constraints are those that indicate that the percentage of slopes in the landing ellipse greater than 15 degrees should be less than 1 % of the area at 2 m length scales.
The engineering constraints identify slopes on several length scales that are relevant to the mission. On length scales of hundreds of meters, steeper slopes may contribute to poor predictions of the target altitude by the landing radar during descent, and on length scales Fig. 1 A portion of HiRISE image ESP_034783_1850 on the left, and on the right the results of applying the point photoclinometry algorithm to that image. The slopes are only evaluated in the down-Sun direction which is why the slopes are not radially symmetric as one would expect for a crater. However, the interior slopes of the crater which are in the down-Sun direction are correctly represented, as are the slopes on the dunes within the crater of several meters-the size of the spacecraft-steep slopes may affect lander stability at touchdown and deployment of the solar panels and instruments.
The best data set available to evaluate surface slopes on the meter scale is that of the High Resolution Imaging Science Experiment (HiRISE, McEwen et al. 2007, 2010. The point photoclinometry technique used in this paper to analyze calibrated HiRISE images compliments and extends stereogrammetry (Howington-Kraus et al. 2015;Fergason et al. 2016). This point photoclinometry method allows estimation of many slope measurements on all available HiRISE images and can be used to build up statistics for the images that are in a given landing ellipse without the need for stereo images or stereogrammetry for deriving digital terrain models (DTMs) and derived slopes. This method normalizes the photometry for emission and incidence angles, as well as atmospheric conditions. This photoclinometry study began with the final four candidate landing ellipses (Golombek et al. 2016), but only information on the final landing ellipse, known as E9, is presented here.

Method
Photoclinometry, or shape-from-shading, is the general technique of obtaining slopes or topography from the brightness values in an image. It can be applied in a number of different ways depending on how the individual brightness values of the pixels are integrated together (or not) and how ambiguity in slope azimuth is resolved to produce final slope values for those pixels. Beyer et al. (2003) and  detail a simplified point photoclinometry approach which this work uses to measure the brightness of a single pixel in order to yield a slope measurement, and in turn these point measurements of slope are used to perform statistical analysis directly. An example of the technique can be seen in Fig. 1.
In the case of the InSight landing site ellipse, the size of the ellipse (130 km by 27 km) made acquiring complete stereo coverage impractical. Instead, the surface was sampled by eight DTMs distributed across the ellipse, and I used this photoclinometry technique to estimate slopes in the areas between those DTMs, and also used them as a reference to help calibrate the slopes being derived from this method.
The technique measures the slope of each pixel directly. In this work, I do not produce a profile of heights in the down-sun direction, and therefore avoid the cumulative elevation errors involved in profiling photoclinometry. Similarly I am not solving for a smoothed topographic surface like area photoclinometry does. Despite these differences, the point photoclinometry technique I use here does share the two major sources of error that photoclinometry algorithms generally suffer from: haze and albedo variations, which are detailed below.

Image Processing
All HiRISE images in this study have been calibrated with the Integrated Software for Imagers and Spectrometers (ISIS version 3.4.9) (e.g. Anderson et al. 2004;Becker et al. 2007;US Geological Survey 2016). Previous efforts (Beyer et al. 2003; began with processing the raw HiRISE Planetary Data System (PDS) Experiment Data Records (EDRs). However, the HiRISE team also provides radiometrically calibrated products for each observation that they call NOMAP products. During the course of processing these data, I found that the detailed photometric processing performed by the HiRISE team to produce their NOMAP products was superior to the processing that had been deemed adequate in the past, and was better at correcting the various forms of detector noise that have become more present in the HiRISE data as the instrument ages.
Previously, processing required assembly of the HiRISE EDRs into a complete observation via ISIS and required several steps. The steps were: conversion of the PDS files to ISIS format (hi2isis), radiometric calibration (hical), stitch the channel files together into single CCD files (histitch), attach SPICE information (spiceinit and spicefit), remove camera distortions from the CCD images (noproj), jitter analysis (hijitreg), and final mosaic of individual CCDs into one unified image file for the observation (handmos). Now these steps are simply replaced by performing std2isis to convert the JPEG2000 NOMAP file to an ISIS cube, and after that the processing for the technique is identical to the previous method (described below).
All of the detailed steps in the old method are done by the HiRISE team processing, and they perform additional kinds of image processing, as well. As a result the NOMAP product has a better image quality. The NOMAP image cannot be converted to I/F units because there is a scaling step in the NOMAP processing where the range of I/F values are scaled to occupy all of a 10 bit range. The input maximum and minimum I/F values are not retained and are different for each image. Fortunately, the point photoclinometry technique does not require the images be in I/F units, only that the pixel brightnesses be correct relative to one another, which the NOMAP data are.
Most of the photometric information that is required for the technique, such as image resolution, incidence angle, and emission angle, was extracted from the labels of the calibrated images, which were derived from the SPICE data (e.g. Acton 1996Acton , 1999. Using a realistic photometric function is essential for obtaining reasonable results, Beyer et al. (2003) and  demonstrated that the lunar-Lambert photometric function after McEwen (1991McEwen ( , 1986, works well and it was also used in this study. Slope statistics vary strongly with spatial scale (Shepard et al. 2001), and while the original HiRISE images have a ground scale as good as 0.25 m/pixel, the scale varies from image to image. Since this technique works best with camera-geometry images and not map-projected images, the ground scale can vary across an image but the variance was minimal for these images of the InSight ellipses. Similarly, the DTMs derived from HiRISE stereo images have a post spacing of 1 m/pixel (Fergason et al. 2016), the InSight lander foot pad span is approximately 2 m, and is about 5.5 m across from the tips of its deployed solar panels. In order to meaningfully compare the results to one another, to other data sets, and to apply them to length scales physically meaningful to the mission, I down-sampled the images by averaging their pixels together to one, two, five, and ten meter scales and then ran the photoclinometry algorithm on each image at its native resolution, as well as all of the down-sampled ones and collected statistics at each stage (providing results like those seen in Fig. 3). Averaging pixels together simulates the view from a camera with poorer resolution, which allows evaluation of slopes over longer baselines.

Haze Compensation
The Martian atmosphere scatters incident sunlight both towards the camera and nondirectionally onto the surface, where it acts as a diffuse illumination source that brightens the image while contributing minimally to topographic shading. Additionally, there must be some scattered light within the HiRISE camera itself and an offset calibration residual within each image. These factors can be grouped together and treated as a uniform brightness contribution to the image, or "haze" in the scene. This has an effect on the observed topography which causes both the human eye and the photoclinometry algorithm to misinterpret the value of the slopes. If the atmosphere were dusty, the observed surface would be brighter from the diffuse light and the derived slope values would be less than what are actually there. Therefore, a haze estimate for each image must be made, and subtracted from the brightness values so that the algorithm does not report gentle slopes where the true slopes are steeper. A simple assumption is to assume that the darkest pixel in the image is a shadow. If there were no atmosphere, then this shadow should be completely black, but if the value of the darkest pixel isn't zero, then it is bright because of these combined factors that I'm calling 'haze.' This minimum pixel method has been used before to estimate haze (Beyer et al. 2003;, but it rests on assumptions which may not always be robust. Typically, after I have processed many of the images from the same region, some will have anomalously high slope statistics. Upon inspection, these images typically have some very obvious image acquisition or processing error. Sometimes, they will have a large number of albedo variations (see below) that confound the technique. These cases are relatively easy to flag.
Sometimes, there is no obvious explanation or defect that would lead to these higher slopes, and so we must question the minimum pixel assumption. In these cases the slope standard deviation can be ten degrees higher than other similar images in the region, but the assumption that the minimum pixel is really recording a true shadow is simply not correct (perhaps there are no true shadows in the scene) and a smaller amount for the haze must be subtracted. In this situation nearby images can be used to estimate expected slope characteristics, and the haze subtraction can be adjusted until the slopes for the anomalous image are inline with the others.
Ideally, there would be some independent measure of the haze that would guide the subtraction. For example, if the amplitude of the topography is known from another method such as stereogrammetry, then the haze value can be adjusted until the slopes reported by photoclinometry matched those of the topography from stereogrammetry or altimetry (e.g. Soderblom et al. 2002). Eight HiRISE stereographic DTMs were created across the ellipse (Fergason et al. 2016), and for each pair of constituent images, the slopes were tuned via the method described below in Sect. 3.1, and then I used the same technique to interpolate tuned slopes between the stereogrammetric DTMs.

Compensation for Albedo Variations
Photoclinometry interprets light and dark shading in the scene as slopes on a surface of uniform albedo. If there are patches of significantly darker or lighter material than the majority of the scene, then the photoclinometry algorithm will misinterpret those variations as resulting from topography. Unfortunately, this is quite difficult to compensate for. Albedo variations commonly persist over large areas whereas there is a limit to how much dark or bright slopes do so. Therefore broad changes in brightness are more likely to be the result of albedo variations and it is helpful to filter such broad changes. Similarly, the albedo itself is a free parameter, and it must be adjusted to give a zero mean slope to the slope statistics for photoclinometry. Our application of a divide boxcar filter (Beyer et al. 2003; to the images adjusts for both of these issues. This process also removes the signal of regional slope from the results. In the case of landing site evaluation, if such regional slopes are too steep, they would be flagged by independent inspection of the Mars Orbiter Laser Altimeter (MOLA) data. However, for other kinds of studies, these regional slopes could be 'added' back in to the photoclinometry slopes by estimating them from the MOLA data.
The images in this study typically have solar incidence angles of 60 to 70 • making the lighting geometry very favorable for the technique. No large anomalous albedo regions were found in these data, but this area is carpeted by small impacts (probably secondaries from Corinto) which have significantly brighter exposed rims and ejecta than the surrounding dusty plains (shown in Golombek et al. 2016). This albedo anomaly makes the slope estimate for the rims of these craters incorrectly high. However, they cover a small enough area, when compared to a whole HiRISE image that they did not significantly skew the slope statistics. More importantly for application of the point photoclinometry technique, the In-Sight landing site is somewhat dusty with a thin layer of bright atmospheric dust coating the site (Golombek et al. 2016). This means that the entire surface in the E9 ellipse has a fairly uniform albedo which substantially reduces this uncertainty for point photoclinometry results in this region. Other small-scale albedo variations that remain within images will cause the slope models in those areas to be steeper or shallower than they truly are.

Slope Azimuth
The azimuth, or dip direction, of slopes in real terrain will be oriented in various directions. The difficulty is in determining what that azimuth is. If the azimuth of a given slope is not specified, then there isn't a unique brightness for that slope. The technique that I use here (Beyer et al. 2003;) assumes a very simple geometry in which the azimuth of the measured model slopes are constrained to be in the direction of solar illumination. Therefore the Sun, the spacecraft, and the portion of the surface imaged define a plane. It is within this plane that the model slopes are obtained, and that plane intersects the surface in a line, so the slopes derived either dip down towards one end of the line or the other, a situation referred to as bidirectional. The assumption of this constraint allows us to have a unique relationship between a given slope and a given brightness. This assumption yields the smallest slope for the given image contrast, and therefore likely underestimates the slope. However, previous work (Beyer et al. 2003; has demonstrated that over large areas these bidirectional slopes are √ 2 smaller than the true adirectional slope distribution (the steepest measure of slope can be in any direction). All slope estimates derived in this work are bidirectional slopes.

Haze Tuning
As mentioned above, if the terrain is known a priori, one can tune the "haze" parameter in the photoclinometry algorithm to get the slope statistics that result from photoclinometry to match those that result from actually measuring DTMs. In this case, there are eight DTMs spread across the ellipse area with a 1 m/post ground scale (Fergason et al. 2016). I extracted east-west bidirectional slopes from these models (very close to the down-Sun direction without resampling the data), and computed their RMS values (solid circles in Fig. 2). Initially, all of the images were run through the photoclinometry algorithm with their minimum pixel value subtracted as the haze value, according to previous practice from Beyer et al. (2003), . This over-estimated the steepness of their slopes as seen in the open triangles in Fig. 2.
For each pair of images that constituted a DTM, their haze parameters were iterated until a best fit to the DTM RMS slope value was achieved. The standard deviation of the photoclinometry slopes is equivalent to the RMS distribution because the mean slope is zero. For those images which did not directly correspond to a DTM, the haze value was adjusted until the resulting RMS slope matched a value interpolated between the RMS slopes of the DTM to the east and west. For those images eastward and westward of the easternmost and westernmost DTMs, their haze values were adjusted to produce an RMS slope value that simply matched the closest DTM. I refer to this independent adjustment of the haze value for each image as the 'tuned' haze value, and can be seen in the filled triangles in Fig. 2. Figure 2 shows that the tuned results show a fairly constant standard deviation across the ellipse. Of course, this is because they are tuned to match the stereo-derived slopes, which show that distribution. The fact that they can be tuned to match so well suggests there are no unaccounted for or complicating factors in the analysis and thus the photoclinometry results are representative of the real slopes across the ellipse. The slight rise in slope standard deviation around longitude 136 • E correlates with an increase in rock density (Golombek et al. 2016, Fig. 17) because this area has more craters (which produce more rocks). All of this is consistent with slightly higher slopes at small scales in this region.
This process also allows us to compare how robust the minimum pixel haze estimation technique is. In this terrain, it appears to overestimate the slopes by three to five degrees.
The point photoclinometry technique that was used in this study is not yielding exact slope measurements, due to the albedo variations in the data and the haze estimations that were employed. However, by conservatively measuring the images and tuning the haze parameter to match with ground truth slope distributions of the DTMs, I was able to yield good Fig. 3 Each curve represents the RMS slopes from a single image derived from photoclinometry after the haze-tuning had been applied. There were 56 HiRISE images evaluated in this way that overlapped the E9 landing ellipse. The red curve represents an average of the measurements at each length scale estimates for the down-sun slopes in the images measured. The slope values reported by this photoclinometry measurement technique should not be looked at in isolation, they are one more piece of information on which to judge the safety of any given landing ellipse. They should not be considered without also looking at the images that were measured to create them.

Comparison to Previous Landing Sites
In order to gain an estimation for the precision and accuracy of the technique, it was applied to HiRISE images taken of the regions around the Viking 1, Viking 2, Pathfinder, and Mars Exploration Rover (MER) Spirit landing sites .
MSL has landed safely and encountered benign slopes (e.g. Arvidson et al. 2014) which suggests that the  predictions and the greater predictions of safety from Golombek et al. (2012) were correct.
In general, previous photoclinometry results with this technique for the Viking 1, Viking 2, Pathfinder, MER Spirit, and MSL landing sites show those regions to be smooth at the meter scale. This is reassuring due to the meter-scale smoothness observed by the landers themselves. For these locales on the Martian surface for which there is ground truth, this technique reports slopes similar to those observed by the landers.

Application to the InSight Landing Site
Previous applications of this technique focused on narrowing down the large number of sites for more in-depth characterization, and InSight was no exception. In addition, the tuned photoclinometry products were used to provide slope measures in the areas between the HiRISE DTMs in the InSight entry, descent, and landing simulations.
Statistics for the fifty-six images I analyzed in the E9 landing ellipse can be seen in Figs. 3 and 4. After being tuned, their slope statistics all fall into a tight band with about 3 degrees RMS slope at 25 cm/pixel (Fig. 3). That figure also shows how downsampling the image allows an estimate of slopes at different length scales relevant to the mission. The 100 m length scale allows these slopes to be compared to MOLA and SHARAD-derived Fig. 4 The heavy curve represents a cumulative slope distribution of all evaluated pixels in the E9 landing site ellipse. Ninety-seven percent of all slopes are less than 5 degrees and 99.4 % of all slopes are less than ten degrees, and 99.54 % for all slopes are less than 15 • . Curves from previous landers are also plotted (Beyer et al. 2003; slopes (Golombek et al. 2016, Sect. 7.6.2.3). The 2 m length scale is the approximate size of the lander and is relevant to spacecraft landing and EDL simulations. The 25 cm length scale is relevant to the size of the instruments, and informs estimates of their safe deployability.
If one were to take all of the pixels in each 2 m slope image, and treat them as a population of slopes, their cumulative histogram can be seen in Fig. 4, with 97 % of all slopes less than 5 • and 99.4 % of all slopes less than 10 • . The InSight landing site constraint (Golombek et al. 2016) indicates that 99 % of all 2 m slopes must be less than 15 • , and in ellipse E9, 99.85 % of all slopes are less than 15 • , satisfying the requirement. When compared to the other martian landing site curves in that figure, it can be seen that the InSight E9 landing site may be the smoothest location that we will have ever landed at on the surface of Mars.
The application of this haze tuned point photoclinometry technique was vital to supplementing the stereogrammetry-derived DTMs of Fergason et al. (2016) and creating a 2 m length scale slope map across the ellipse (Golombek et al. 2016, Fig. 22) that was used for landing site safety simulations to determine the greater than 99 % probability of success for InSight landing at ellipse E9.
Finally, there is a landing site constraint for instrument deployment (Golombek et al. 2016, Sect. 2.8). The estimation of 25 cm length-scale slopes that this technique provides are more relevant to instrument placement than the 1 m length scale of stereogrammetricallyderived DTMs, and thus slope estimates from this technique give a better indication of the slopes relevant to instrument deployment. That being said, the constraint is the same 1 % area greater than 15 • for the instruments as for the lander itself.

Conclusions
This technique allowed me to measure slope characteristics at the meter scale for several candidate landing ellipses and to provide detailed slope statistics on all HiRISE images taken of the final E9 site (Fig. 5). This work demonstrates that the E9 site has slope characteristics within the acceptable constraints for the InSight landing system (Fig. 4). This point photoclinometry method continues to agree well with results from the highest quality topographic information from stereogrammetry and continues to pass the test of ground truth at the MSL landing site. The two major uncertainties in point photoclinometry have been minimized in this study, as the 'tuning' against stereogrammetric terrain models helps control the haze uncertainty, and the slightly dusty terrain of the E9 ellipse provides a very uniform albedo over the region. My method in this study provides an estimate of the down-sun slope statistics of the images, not a true slope measurement. However, I have shown that when a more refined haze estimate for an image is available, this technique is able to provide more accurate slope statistics (e.g. matching results to slope statistics from a stereo-derived DTM via hazetuning). Additionally, this method is able to operate on and process a large number of images rather quickly.
This technique is ideal for landing site evaluation in all stages of landing site selection. Early on, when there are large numbers of sites to choose from, this technique can quickly help sort potential sites by roughness. In the latter stages of site selection, when large areas of the ellipse are being covered by high-resolution imagery, this technique can obtain roughness data in advance of stereo methods (although without haze tuning), or to extend slope information beyond the edges of stereo DTMs (with the benefit of haze tuning), where only single-image coverage exists. It can also provide another consistency check with stereoderived terrain information.