aivazis / qed

A web based visualizer of large datasets
BSD 2-Clause "Simplified" License
4 stars 6 forks source link

The app is now more accessible from the command line #54

Closed aivazis closed 4 months ago

aivazis commented 4 months ago

There is now a way to register datasets entirely from the command line. qed requires four pieces of information:

The reader is specified with the reader command line argument, or its r alias. Certain readers, such NISAR, GDAL, and ISCE2 under the right circumstances, are able to determine the rest of the necessary information from the data product itself. The command

qed -r=nisar.rslc rslc.h5

opens rslc.h5 with the NISAR RSLC reader and registers the datasets it contains. Similarly,

qed -r=native.gdal dem.tiff

will load dem.tiff using GDAL as the reader. Similar considerations apply to ISCE2 datasets that have an XML companion file. The three ISCE2 readers, isce2.slc, isce2.int, and isce2.unw, can parse the companion file and extract pixel type and shape information.

The pixel type specification can happen in two slightly different ways. The cell command line argument accepts a value directly using the standard mnemonics:

Alternatively, one can use a set of flags to set the pixel type directly:

where the less obvious aliases are borrowed from mdx. So the commands

qed -r=native.flat -cell=complex128 c16.dat

and

qed -r=native.flat -c16 c16.dat

both open the file c16.dat using the native.flat reader and specify that the image pixels are double precision complex values.

The image shape can be specified using the shape command line argument that takes a pair of values separated by a comma. The command

qed -r=native.flat -c16 -shape=(1160,1400) c16.dat

tells the native.flat reader to expect an image whose height is 1160 lines and whose width is 1400 samples. Alternatively, one can specify the lines and samples separately:

One can mix and match these, as the regular pyre priority rules for configuration events are applied. If the command line does not provide enough information for the shape to be determined, qed will issue a warning and suggest plausible values for the shape.