GeoscienceAustralia / agdc

Repository for Australian Geoscience Data Cube (AGDC) code
BSD 3-Clause "New" or "Revised" License
29 stars 24 forks source link

Modify the Retrieve Pixel Time Series tool so that bands are output in wavelength order #52

Closed simonoldfield closed 9 years ago

simonoldfield commented 9 years ago

The Retrieve Pixel Time Series tool, as implemented in 0.1.0-b20150427 (aka 0.1.0 2015-04-27 snapshot) puts the coastal aerosol blue band into the last column of the CSV.

It is preferred, by Leo :smile:, that it be in the first column so that the spectra contained in the text file are wavelength sequential.

See #24

simonoldfield commented 9 years ago

One way to address this may be to provide a default band output order but then allow that order to be overridden by explicit band specification when #25 is implemented.

simonoldfield commented 9 years ago

The Retrieve Pixel Time Series tool now supports the --band BAND [BAND BAND] command line argument to explicitly specify the bands for which values will be output.

When bands are explicitly specified in this manner they are output in the order specified.

For example...

retrieve_pixel_time_series.py --lon 120.25 --lat -20.25 --dataset-type ARG25 --acq-min 2012 --acq-max 2012 --band RED GREEN BLUE

will output

SATELLITE,ACQUISITION DATE,RED,GREEN,BLUE

whereas...

retrieve_pixel_time_series.py --lon 120.25 --lat -20.25 --dataset-type ARG25 --acq-min 2012 --acq-max 2012 --band BLUE GREEN RED

will output...

SATELLITE,ACQUISITION DATE,BLUE,GREEN,RED