tdb2struct
|
Contents: Description, Arguments, Usage, Examples, Sub-Functions, Related Functions, Source Supported Under Version: > 1.13
Description
Arguments and Return Values Arguments: accepts a path to a tdb file and the desired resample xaxis. Return Value: a convenient davinci structure
Usage Syntax: tdb2struct(tdb_file = STRING/STRUCT [, lab1 = INT] [, lab1 = INT]) 'tdb_file_path' - full path to the tdb file (including the .000) 'tdb_file' - structure from load_tdb(), with distribute = 1 option 'lab1' = 1 resample to xlab1 (923 pt lab spectra (221.7 to 1999.8) (default)) 'lab1' = 1 resample to xlab2 (1971 pt lab spectra (200.5 to 3999.7))
Examples Example with an already existing structure from load_tdb() dv> a=load_tdb($DV_EX+"/wards_rocks.tdb.000",distribute=1)
struct, 100 elements
v[1]: struct, 4 elements
scope: "Double"
label: "1 Biotite Granite"
data: 936x1x1 array of double, bsq format [7,488 bytes]
xaxis: 936x1x1 array of double, bsq format [7,488 bytes]
v[2]: struct, 4 elements
scope: "Double"
label: "2 Muscovite-biotite Granite"
data: 936x1x1 array of double, bsq format [7,488 bytes]
xaxis: 936x1x1 array of double, bsq format [7,488 bytes]
v[3]: struct, 4 elements
scope: "Double"
label: "3 Biotite-hornblende Granite"
data: 936x1x1 array of double, bsq format [7,488 bytes]
xaxis: 936x1x1 array of double, bsq format [7,488 bytes]
.............................
dv> b=tdb2struct(a)
struct, 3 elements
data: 100x1x923 array of float, bsq format [369,200 bytes]
label: Text Buffer with 100 lines of text
1: 1 Biotite Granite
2: 2 Muscovite-biotite Granite
3: 3 Biotite-hornblende Granite
4: 4 Alkalic Granite
5: 5 Aplite
6: 6 Quartz-monzonite Porphyry
7: 7 Granodiorite
8: 8 Obsidian
9: 9 Pumice
10: 10 Rhyolite Tuff
xaxis: 1x1x923 array of float, bsq format [3,692 bytes]
Example using the path to the tdb file dv> a=tdb2struct($DV_EX+"/wards_rocks.tdb.000")
struct, 3 elements
data: 100x1x923 array of float, bsq format [369,200 bytes]
label: Text Buffer with 100 lines of text
1: 1 Biotite Granite
2: 2 Muscovite-biotite Granite
3: 3 Biotite-hornblende Granite
4: 4 Alkalic Granite
5: 5 Aplite
6: 6 Quartz-monzonite Porphyry
7: 7 Granodiorite
8: 8 Obsidian
9: 9 Pumice
10: 10 Rhyolite Tuff
xaxis: 1x1x923 array of float, bsq format [3,692 bytes]
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Recent Library Changes Created On: 11-29-2010 |