i2i tutorial
From DavinciWiki
|
Contents: Description, Arguments, Usage, Examples, Sub-Functions, Related Functions, Source Supported Under Version: > 1.05
Description Run through a variety of i2i() cases.
Arguments and Return Values Arguments: none. Return Value: none. GnuPlot is launched and displays a graph where appropriate
Usage Syntax: i2i_tutorial()
Examples dv> i2i_tutorial() read in ASU spectral library "asu = read($DV_HOME+'/examples/ASU_minlib.hdf')" data: 225x1x923 array of float, bsq format [830,700 bytes] label: Text Buffer with 225 lines of text 1: Andesine BUR-240 1 2: Spodumene HS-210.4B 2 3: Magnesiohastingsite HS-115.4B 3 4: Wollastonite WAR-8884 4 5: Albite WAR-0244 5 6: Bronzite BUR-1920 6 7: Pyroxmangite WAR-6894 7 8: Forsterite BUR-3720A 8 9: reject 10: reject xaxis: 1x1x923 array of float, bsq format [3,692 bytes] pausing Resample a lab spectrum to ASTER resolution and plot both vs wavenumber create lab1 x axis (default is wavenumber mode for spectrometers)
"xlab1 = make_band(lab1=1)"
pausing
create aster x axis in wavenumber mode
"xastercm = make_band(aster=1, cm=1)"
pausing
Resample 1 lab spectrum to ASTER resolution with wavenumber xaxis
"aster = i2i(asu.data[i], from = 'lab1', to = 'aster', cm=1)"
doing broadband
.............................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/aster_ir_spectral_response_cm.vic: VICAR bsq image: 6x1x401, 32 bits
pausing
plot lab and resampled ASTER spectra
"pplot({asu.data[i], aster}, {'Lab Spectrum', 'ASTER'}, {1,5}, xaxis={xlab1, xastercm}, xlabel = \
'Wavenumber', ylabel = 'Emissivity', key = '1400, .95')"
pausing
A simpler approach Resample to ASTER and return xaxis in wavenumber mode by using 'full' mode
"aster = i2i(asu.data[i], from='lab1', to='aster', cm=1, full=1)"
doing broadband
..............................................................................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/aster_ir_spectral_response_cm.vic: VICAR bsq image: 6x1x401, 32 bits
pausing
plot lab and resampled ASTER spectra
"pplot({asu.data[i], aster.data}, {'Lab Spectrum', 'ASTER'}, {1,5}, xaxis={asu.xaxis, aster.xaxis},\
xlabel = 'Wavenumber', ylabel = 'Emissivity', key = '1400, .95')"
pausing
Example of how to do a bunch of instruments and plot vs wavelength create aster x axis in wavelength mode (default is wavelength for broadband insts.)
"xaster = make_band(aster=1)"
pausing
create tims x axis in wavelength mode (default)
"xtims = make_band(tims=1)"
pausing
create themis x axis in wavelength mode (default)
"xthemis = make_band(themis=1)"
pausing
create lab1 x axis in wavelength mode
"xlab1wave = make_band(lab1=1, wave=1)"
pausing
create tes x axis in wavelength mode
"xteswave = make_band(tes=1, wave=1)"
pausing
Convert lab spectrum to lab resolution with wavelength xaxis
"lab1w = i2i(asu.data[i], from = 'lab1', to = 'lab1', wave=1)"
Axis are the same, no need for resample
pausing
Resample lab spectrum to TES resolution with wavelength xaxis (default)
"tes = i2i(asu.data[i], from = 'lab1', to = 'tes', wave=1)"
pausing
Resample lab spectrum to TIMS resolution with wavelength xaxis (default)
"tims = i2i(asu.data[i], from = 'lab1', to = 'tims')"
doing broadband
.......................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/tims_ir_spectral_response_avg_cm.vic: VICAR bsq image: 7x1x158, 64 bits
pausing
Resample lab spectrum to TIMS resolution with wavelength xaxis (default)
"themis = i2i(asu.data[i], from = 'lab1', to = 'themis')"
doing broadband
.........................................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/themis_ir_spectral_response_cm.vic: VICAR bsq image: 11x1x4000, 32 bits
pausing
Resample lab spectrum to ASTER resolution with wavelength xaxis (default)
"aster = i2i(asu.data[i], from = 'lab1', to = 'aster')"
doing broadband
.........................................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/aster_ir_spectral_response_cm.vic: VICAR bsq image: 6x1x401, 32 bits
pausing
plot lab and resampled TES, THEMIS, ASTER, and TIMS spectra
"pplot({lab1w, tes, themis, aster, tims}, {'Lab Spectrum', 'TES', 'THEMIS', 'ASTER', 'TIMS'}, {1,2,4,5,6},\
xaxis={xlab1wave, xteswave, xthemis, xaster, xtims}, xlabel = 'Wavelength', ylabel = 'Emissivity', \
key = '12.5, .94', x1=6., x2=16.)"
pausing
Again - a simpler approach using 'full' mode in i2i Resample lab spectrum to lab resolution with wavelength xaxis (default)
"lab = i2i(asu.data[i], from = 'lab1', to = 'lab1', wave=1, full=1)"
Axis are the same, no need for resample
pausing
Resample lab spectrum to TES resolution with wavelength xaxis (default)
"tes = i2i(asu.data[i], from = 'lab1', to = 'tes', wave=1, full=1)"
pausing
Resample lab spectrum to THEMIS resolution with wavelength xaxis (default)
"themis = i2i(asu.data[i], from = 'lab1', to = 'themis', wave=1, full=1)"
doing broadband
...............................................................
/themis /lib/dav_lib/library/script_files/instrument_parameters/themis_ir_spectral_response_cm.vic: VICAR bsq image: 11x1x4000, 32 bits
pausing
Resample lab spectrum to ASTER resolution with wavelength xaxis (default)
"aster = i2i(asu.data[i], from = 'lab1', to = 'aster', wave=1, full=1)"
doing broadband
.................................................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/aster_ir_spectral_response_cm.vic: VICAR bsq image: 6x1x401, 32 bits
pausing
Resample lab spectrum to TIMS resolution with wavelength xaxis (default)
"tims = i2i(asu.data[i], from = 'lab1', to = 'tims', wave=1, full=1)"
doing broadband
......................................................................
/themis/lib/dav_lib/library/script_files/instrument_parameters/tims_ir_spectral_response_avg_cm.vic: VICAR bsq image: 7x1x158, 64 bits
pausing
plot lab and resampled TES, THEMIS, ASTER, and TIMS spectra
"pplot({lab.data, tes.data, themis.data, aster.data, tims.data}, {'Lab Spectrum', 'TES', 'THEMIS', 'ASTER', 'TIMS'}, \
{1,2,4,5,6}, xaxis={lab.xaxis, tes.xaxis, themis.xaxis, aster.xaxis, tims.xaxis}, xlabel = 'Wavelength', \
ylabel = 'Emissivity', key = '12.5, .94', x1=6., x2=16.)"
pausing
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Related Functions
Recent Library Changes Created On: 09-08-2010 |