Commit 7ac63fee authored by Carlos H. Brandt's avatar Carlos H. Brandt
Browse files

Update HRSC readme

parent 390dec08
......@@ -3,76 +3,58 @@
[Neukem et al, 2004]: Neukem_etal-HRSC.pdf
HSRC data are available at different processing levels.
As explained in [Scholten et al, 2005] (hereafter S05) and overviewed in [Neukem et al, 2004]:
As explained in [Scholten et al, 2005][] (hereafter S05) and overviewed in [Neukem et al, 2004][]:
* Level-1: conversion of original data stream (transmitted to ground) to de-compressed data;
* Level-2: radiometric correction of the image data;
* Level-3: map projection of all data;
* Level-4: DTMs and orthoimages.
We are interested in Level-4 data: DTM/DEM. In particular, data taken from
instrument's Nadir observations; Figure [S05 Fig-1] pictures the different lines fo
We are interested in Level-4 data: DTM/DEM, and data taken from
instrument's Nadir observations; Figure [S05 Fig-1][] pictures the different lines fo
sight according to the different CCDs (Nadir represented as `ND`):
![HRSC/SRC technical parameters][S05 Fig-1]
[S05 Fig-1]: Scholten_etal_2005-Fig1_Technical_Params_HRSC_SRC.png
An script to download a set of observation (_e.g._, `0010`) data is available in the Appendix.
### Projection
Projection of level-4 data is **Sinusoidal planetocentric** in a sphere with radius **3396.0 Km**, **positive east**.
## Data archive
HRSC dataset is stored in PDS format (see [../../]).
HRSC dataset is stored in PDS format (see [../../](../../
Interfaces to access the archive are provided at:
* ;
* .
In particular, at
we will find HRSC level-4 data of our interest.
As a PDS archive, we will find there a well defined, standard files/directories
If we are going straight for the data, our interest is on directories
`browse` and `data`; `browse` provides a _view_ of each data file in a commonly
used format (`PNG`), and `data` provides the actual scientific data.
Metadata, documentation and other support material are found in the
other directories.
> The section below, [Archive Summary] and [Exploring the archive] go into the
structural and content of this archive. For detail I would like to defer the
reader to those sections.
The data (in `data` and `browse`) are split after the mission _orbit-ID_,
inside each _orbit_ directory we will find the respective images.
The number of images is not fixed, but we can generally expect on image
per sensor and per product -- DTM/DEM.
The following list of files was taken from section [Explorin the archive]
and represent the list of files found in orbit `0010`:
. Our interest is over files with indixes `nd`,`dt`,`da` for we want
Nadir, DTM, DEM view/content.
In particular, at
we will find the HRSC/DTM of our interest.
We notice there are no Label (metadata) files accompanying the images.
That's because the (label) metadata is positioned at the header of image files.
In the header we will find virtually all the information we need to know
about each image.
To extract the metadata from the data files is simple and can be done from a
typical shell command, since PDS Labels are _text_ data and obey a formal
syntax (ending always in `END`):
$ awk '{print $0; if($0 ~ /^END/){if($1 !~ /END_/){exit}}}' <datafile.img>
The `browse/` directory provides a _view_ of each data file in a commonly
used format (`PNG`), while `data/` provides the actual scientific data.
From [hrsc_eaicd.pdf](hrsc_eaicd.pdf):
> The Data Directory contains sub-directories for every orbit which is part of the data set, the diretory names are the four digits orbit number. The delivery contains level-4 data for the nadir sensor and the four color sensors. It also contains Digital Terrain Models (DTMs) with two different reference bodies [21,22]:
> - MOLA sphere (dt in the filename)
> - MOLA Areoid (da in the filename)
The _level-4 data_ we are talking about are PDS IMAGE objects. An IMAGE object is a two-dimensional array of values, all of the same type, each of which is referred to as a *sample*.
As IMAGE object is usually accompanied by a LABEL object which is a text file containing the IMAGE's metadata (or HEADER).
In MEX/HRSC, though, _header_ and _image_ are bound in the same (.IMG) file. (See the Appendix for a simple example to read the HEADER from IMAGE.)
For an example of accessing the `data`, see the section [Data access](#data-access), for an walkthrough `browse`, go to section [Browsing the data](#browsing-the-data).
#### Archive summary
Another important directory in a PDS archive is `index/`, in the file `` one will find the list of data records (files) in the archive. This `` provide simply the list of files -- path to the data -- and respective information about their release (version).
### Archive summary
Let's quickly summarize some information ([hrsc_eaicd.pdf) regarding the HRSC
PDS archive regarding name and structure conventions in place.
......@@ -142,9 +124,7 @@ The `BROWSE` directory mirrors/mimic the `DATA` structure.
> - improvement of orbit and attittude data [19,20]
> - generation of Digital terrain Models and Orthorectification of image data [19,20]
#### Exploring the archive
### Browsing the data
Our interest now is to access the Level-4, DTM data; Which is under
......@@ -238,12 +218,12 @@ The corresponding image (10,9) shaded relief, nadir and RGB orthophotos:
![H0010_0009 DTM-ND-RGB](assets/h0010_0009.png)
#### Data access
### Data access
Now that we browsed the images of orbit 0010, and we want `ND4`,`DT4`,`DA4`
files, we go to `DATA` directory, at the same address -- `0010/` -- to check
for the corresponding IMG data:
......@@ -264,11 +244,9 @@ with an `awk` call:
$ awk '{print $0; if($0 ~ /^END/){if($1 !~ /END_/){exit}}}' h0010_0009_nd4.img
, which output the IMG's Label content.
Section [Metadata] presents the content of such Label/header.
Section [Metadata](#metadata) presents the content of such Label/header.
##### Metadata
#### Metadata
In PDS Label files/content we find the concise description of the data of
reference (see [/datasets/](/datasets/
......@@ -427,3 +405,110 @@ misaligned data. It is a discussion between Matt and Trent on handling data in
ArcMap + GDAL:
# Appendix
## Download script
#set -ue
function usage() {
echo ""
echo "Usage:"
echo ""
echo " $ ${BASH_SOURCE} docs|meta|data"
echo ""
echo " docs : documents (txt) and light metadata"
echo " meta : essentially the INDEX (contains GEO_MARS.TAB)"
echo " data : data sample -- browse/extra files as well."
echo ""
echo "Variables can be used to change defaults/states:"
echo " ORBIT : sample data orbit #ID, default is '$ORBIT'"
echo " DRY_RUN : do not download data if defined (e.g., 'y'),"
echo " echoes what 'would be' run"
echo ""
echo "Examples:"
echo ""
echo " Download data for default Orbit, $ORBIT:"
echo ""
echo " $ ./ data"
echo ""
echo " With DRY_RUN set, just print what would be run for docs/meta:"
echo ""
echo " $ DRY_RUN=y ./ docs"
echo " $ DRY_RUN=y ./ meta"
echo ""
echo " Print (wget) commands for downloading Data for Orbit I957:"
echo ""
echo " $ DRY_RUN=y ORBIT=0103 ./ data"
echo ""
echo " Download from NASA instead of ESA (default):"
echo ""
echo " $ SRV=NASA ORBIT=0103 ./ data"
echo ""
if [ "$SRV" = 'ESA' ]; then
[ "$SRV" = 'NASA' ] || { echo '$SRV should be either ESA or NASA'; exit; }
function do_wget() {
# Input argument is a list (space-sep) of files/directories to download
for c in ${content[@]}; do
[ "$SRV" = 'NASA' ] && data=$(echo "$data" | tr '[:upper:]' '[:lower:]')
if [ ! -n "$DRY_RUN" ]; then
# download
wget -r -nH --cut-dirs=4 --directory-prefix=${SRV} ${data}
# dry-run
echo "wget -r -nH --cut-dirs=4 --directory-prefix=${SRV} ${data}"
case $opt in
echo "Downloading 'docs' .."
do_wget ${docs[@]}
echo "Downloading 'meta' .."
do_wget ${meta[@]}
echo "Downloading 'data' .."
do_wget ${data[@]}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment