commonx

From DavinciWiki
Jump to: navigation, search

Description

Resamples all of the given spectra to a common xaxis (linearly)

Spectra should be in the z-direction

Arguments and Return Values

Arguments: a structure of data with N elements and a structure of xaxes with N elements

Return Value: a structure containing a resampled data element and a new xaxis element

Usage

Syntax: commonx(data,xaxis)

'data' a structure of data with potentially three dimensional data and spectra in the z direction

'xaxis' a structure of xaxes with the data in the z direction

See Structure operations for more information on creating a structure on the fly.

Examples

dv> a
struct, 10 elements
   array_data: 2x2x143 array of float, bsq format [2,288 bytes]
   array_xaxis: 1x1x143 array of float, bsq format [572 bytes]
   lab2_data: 1x1x1869 array of float, bsq format [7,476 bytes]
   lab2_xaxis: 1x1x1869 array of float, bsq format [7,476 bytes]
   lab_data: 1x1x1971 array of float, bsq format [7,884 bytes]
   lab_xaxis: 1x1x1971 array of float, bsq format [7,884 bytes]
   tes_data: 1x1x143 array of float, bsq format [572 bytes]
   tes_xaxis: 1x1x143 array of float, bsq format [572 bytes]
   thm_data: 1x1x10 array of float, bsq format [40 bytes]
   thm_xaxis: 1x1x10 array of float, bsq format [40 bytes]

dv> out=commonx({lab_data=a.lab_data,a.tes_data,a.thm_data,array_data=a.array_data},\
{lab_xaxis=a.lab_xaxis,a.tes_xaxis,a.thm_xaxis,array_xaxis=a.array_xaxis})
struct, 2 elements
   data: struct, 4 elements
       lab_data: 1x1x2266 array of float, bsq format [9,064 bytes]
       : 1x1x2266 array of float, bsq format [9,064 bytes]
       : 1x1x2266 array of float, bsq format [9,064 bytes]
       array_data: 2x2x2266 array of float, bsq format [36,256 bytes]
   xaxis: 1x1x2266 array of float, bsq format [9,064 bytes]

dv> xplot(out.data[1],out.data[2],out.data[3],out.data[4],Xaxis=out.xaxis) 

dv> plim(2000,10,.6,1.05)

Images

Several different data sets with common xaxes are plotted on the same plot. The four pink lines correspond to the array_data of 2x2xZ. commonx.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 04-21-2007
Modified On: 01-17-2008

Personal tools