#### As of tetracorder 6, in the mapping directory after tetracorder runs, # simply do: ./cmd.get.average.spectra.of.mapped.materials dirs all # gets spectra for all tetracorder results ./cmd.get.average.spectra.of.mapped.materials box a b c d dirs all # gets spectra for all # tetracorder results within bounding pixel box # a= upper left x, b=upper left y, # c= lower right x, d= lower right y # range: 1 to size of cube in pixels ./cmd.get.average.spectra.of.mapped.materials dirs list_of_directories # only do these directories, # exmaple: group.1um group.2um case.veg.type ./cmd.get.average.spectra.of.mapped.materials box a b c d dirs list_of_directoriesa # bounding box, # selected directories ############################################################################# # below is the OLD manual way: Post tetracorder process, which created many files of results, to get average spectra, do the following. The examples will use EMIT data Create a specpr file for collecting the average spectra in the directory where a mappign runs has completed cubepath=`cat AAA.info/cubefilename.txt` cube=`basename $cubepath | cut -c 1-40` cp /sl1/usgs/library06.conv/startfiles/s06emitc.start spreslt1 sp_stamp spreslt1 spsettitle spreslt1 1 '************* spreslt1 ****************' -force spsettitle spreslt1 2 '**** extracted spectra from cube: *****' -force spsettitle spreslt1 3 "$cube " -force # cube isze: xpx=`cat AAA.info/image-xpixels.txt` ypx=`cat AAA.info/image-ypixels.txt` # get average spectra for all mapped materials: avspec='cmds.all.support/cmd.get.mapped.material.spectral.averages-v4' shortid=`cat AAA.info/shortcubeid.txt` # short cube ID up to 10 characters cscale=`cat AAA.info/cube-scale-factor` $avspec $shortid $cubepath $cscale spreslt1 box 1 1 $xpx $ypx The command creates specpr file spreslt1: cmds.all.support/make.spreslt1.file.for.spectral.extractions then run: cmds.all.support/cmd.get.mapped.material.spectral.averages-v4 cmds.all.support/cmd.get.mapped.material.spectral.averages-v4 shortcubeID cube scale_factor specproutputfile box upperleftx upperlefty lowerrightx lowerrighty Note: the cube size and the short cube ID after a tetracorder run are stored in the AAA.info directory: cube-bands.txt cubefilename.txt image-xpixels.txt image-ypixels.txt shortcubeid.txt example (cube size = 1000 x 1000): cmds.all.support/cmd.get.mapped.material.spectral.averages-v4 FRT03BFB ../cubes2/FRT00003BFB_07_IF166J_MTR3.v 0.00005 spreslt1 box 1 1 1000 1000 Note: the box size can be a small area, not just the full cube size. NOTE on cube: if the cube is an envi file with no vicar header give the envi hdr file, e.g. ../cube/f180625t01p00r07_rfl.hdr If the cube has a vicar header, use the cube file. Example: ../cube/f180625t01p00r07_rfl.v.hdr # envi header ../cube/f180625t01p00r07_rfl.v # image cube with vicar header then use: ../cube/f180625t01p00r07_rfl.v When complete, run specpr and assign the spreslt1 file to view the results.