Console basics
PlanetServer (PS) console allows for quick and easy access to certain functions, either restricted to the console itself (e.g. return or a certain value, parameter), or affecting the various views or widget, such as Map, Diagram. It is available when a certain CRISM observation (data product/granule) is loaded, either interactively from the main WebGUI or directly with a URL.
For example, CRISM IR could be reached through (see spectral range in “Diagram” widget):
http://planetserver.jacobs-university.de/?productid=frt00012613_07_if164l_TRR3
while CRISM VNIR of the same granule (see spectral range in “Diagram” widget):
http://planetserver.jacobs-university.de/?productid=frt00012613_07_if164s_TRR3
Please note that features and capabilities are evolving. Updates will be posted in this blog and eventual corrections applied to existing documentation/blog posts, including this one. Current information refers to the stable client on http://planetserver.eu (September 2013).
More general information is contained in the PlanetServer 101 post.
Binning
Averaging pixels for extracting spectra is possible on PlanetServer, using a certain kernel size, e.g. the default in collecting a spectra is a 3×3 pixel kernel over the point of collection/query. The maximum bin is 7×7. The bin size can be changed using the bin() function in the console:
WCPC> bin(5)
Using bin 5x5
WCPC> bin(100)
Using maximum bin of 7×7
Stretch
The stretch applied to the original floating point values of each band of the hyperspectral CRISM cube can be modified, when rendering in 8-bit (0:255) original data for display on the WebGUI. The default is zero.
WCPS> minstretch
0
setting it to a different value affects all following image display (either single band or e.g. indexes) e.g.
WCPS> minstretch = 0.01
Single band, RGB composites
To load a single bands on the main window through a console command one could directly call for a single band number (as listed in the Table of Contents), e.g. for
http://planetserver.jacobs-university.de/?productid=frt00012613_07_if164l_TRR3
WCPS> image("band197")
The same could be expressed in nanometers, e.g.:
WCPS> image(nm2band(2300))
which shows in both cases such a result:
RGB images with a band colour composite can be obtained with, e.g.:
WCPS> rgbimage("band402","band247","band99")
which provides, as a result:
Band ratios
Ratios between different bands can be produced and visualised with, e.g.:
WCPS> image("band200 / band24")
corresponding to:
Indexes / summary products
Mineral indexes are implemented in PS and its console, their formula is returned as console output, e.g., after loading a certain CRISM observation and its IR channel:
WCPS> sp.olindex
(data.106 / (0.1*data.12 + 0.1*data.32 + 0.4*data.50 + 0.4*data.71 ) ) - 1
where “sp” stands for “summary product”.
Indexes can also be visualized interactively in the map window, e.g. on this data product (CRISM VNIR):
http://planetserver.jacobs-university.de/?productid=frt00012613_07_if164l_TRR3
WCPS> image(sp.olindex)
returns on the console:
WCPS> image(sp.olindex)
for data in ( frt00012613_07_if164l_trr3_1_01 ) return encode( (char) (255 / (max((data.106 / (0.1*data.12 + 0.1*data.32 + 0.4*data.50 + 0.4*data.71 ) ) - 1) - 0)) * (((data.106 / (0.1*data.12 + 0.1*data.32 + 0.4*data.50 + 0.4*data.71 ) ) - 1) - 0), "png" )
and on the main window:
This list summarizes the summary products one could extract and visualize with PS (see Pelkey et al., 2007, DOI:10.1029/2006JE002831 for description and explanations).
Summary products can be listed from the console (also reproduced in the lists below) with:
WCPS> show(sp)
Hyperspectral Summary Products IR:
olindex2
bd1900r bd1980 |
bd2200
doub2200 bd2230 |
bd2500 |
Spectral Summary Products VNIR:
r770rbr
bd530 sh600 |
bd640
bd860 bd920 rpeak1 |
bdi1000
visr440 irr1 |
Spectral Summary Products IR
bdi1000ir
ira olindex lcpindex hcpindex var islope1 bd1435 bd1500 icer1 bd1750 bd1900 |
bdi2000
bd2100 bd2210 bd2290 d2300 sindex icer2 bdcarb bd3000 bd3100 bd3200 bd3400 |
cindex
bd1270o2 bd1400h2o bd2000co2 bd2350 bd2600 irr2 r2700 bd2700 irr3 |
CAVEAT: on the stable client/WebGUI the IR and VNIR channels are separate and not all indexes are available (e.g. sp.olindex is not available on VNIR, but only on the IR spectral range), e.g. in VNIR the console returns:
WCPS> sp.olindex
(data.0 / (0.1*data.0 + 0.1*data.0 + 0.4*data.0 + 0.4*data.0 ) ) - 1
Metadata and other parameters
Similarly, available metadata can be listed with:
WCPS> show(hsdataset)
crs
prj
productid
point
mapoptions
collection
nodata
metadata
xmin
xmax
ymin
ymax
width
height
bands
bbox
lonlat
Minimum, maximum of a certain band can be returned by the console, either expressed as band number or, as in this example, in nanometers:
WCPS> max(nm2band(2300))
0.249158
WCPS> min(nm2band(2300))
0.169802
WCPS> max("band24")
0.249158
WCPS> min("band48")
0.169802
Band depths
A function for calculating band depth is also available, providing low, center, high in nanometers, e.g, for
http://planetserver.jacobs-university.de/?productid=frt00012613_07_if164s_TRR3
WCPS> banddepth(440, 530, 709)
(1 - (data.25 / ((0.6588279348436623 * data.12) + (0.3411720651563377 * data.53))))
one could visualise the image of the desired band depth:
WCPS> bdimage(440, 530, 709)
Console interaction with Menu button functions

WCPS> s(1)
WCPS> p(1)
lon=-48.123179292514,lat=-8.6719934825689
WCPS> p(1).lon
-48.123179292514
WCPS> histogram(nm2band(550), 10)