lamp_mac/D17/
d17_xyconvert.pro
FUNCTION d17_xyconvert,win,oaxes,mainbeam,lambda=lambda,sanoff=sanoff,datp=datp LAMP function to take a workspace and convert its axes Works with monochromatic or TOF data For monochromatic data, the input workspace must have: x-pixel on the x-axis SAN or DAN on the y-axis Monochromatic data may be 3D For TOF data, the input workspace must have: x-pixel on the x-axis wavelength on the y-axis TOF data must be 2D then to re-bin the data for equally spaced points with x and y axes with physical meaning ARW 17.02.05 NECESSARY INPUT: win=input workspace oaxes=the output axes, put as a string Allowable options are: 'qxqz' = qx (x-axis) vs. qz (y-axis) 'pipf' = pi-pf (x-axis) vs. pi+pf (y-axis) the above options are available for TOF and monochromatic data sets 'tito' = theta out (x-axis) vs. theta in (y-axis) 'stth' = two theta (x-axis) vs san (y-axis) the above options are only available for monochromatic data sets 'ltth' = two theta (x-axis) vs wavelength (y-axis) the above options are only available for TOF datasets mainbeam=data file for the main beam, used to calibrate twotheta OPTIONAL INPUT: lambda=wavelength settings. This has two possibilities: Monochromator data: this is the actual wavelength, a single number. This should be stored with the data, but you have the option here of forcing it to another value e.g. lambda = 5.325 TOF data: this is a two element array with the minimum and maximum wavelengths for the calculation e,g. lambda = [2,20] (this happens to be the default) sanoff=an offset in SAN, which can exist if the sample angle calibration is out. This value is SUBTRACTED from the instrument-stored value of SAN to find the correct value for theta_in For an attempt to automatically find sanoff, use sanoff='auto' Otherwise, equate sanoff to a number Default is sanoff = 0 bin=option whether to rebin the data as equally spaced points bin=0 (default)for no rebinning - X and Y coordinates will be arrays the same size as win and can be viewed in the desired space using the 'Regular Grid' option in LAMP bin=1 for rebinning. The data will be interpolated on to a regular grid datp = the data structure for the workspace If unspecified, the program will take the data structure from the workspace (This is only useful if calling d17_xyconvert from inside another function, e.g. aw_qxspec) e.g. type at LAMP interface: w2=d17_xyconvert(w1,'qxqz',97936,sanoff='auto') Calls to: rdrun, d17_errmsg Last modified: PG 26.07.12 Iformation on how to load the maps into common plotting programs by saving the LAMP file in column format: Igor Pro: 1.Data:LoadWaves:LoadWaves 2.Filetype:DelimitedText 3.set Tweaks to cosider space as the delimiting character 4.Line containing column labels: 1 5.First line containing data: 2 6.Set number of lines containing data to the number of y-points 7.First column containing data: 2 8.Tick the 'Load columns into matrix' box 9.Tick the 'read column positions' box 10. Format the y-axis manually Origin: 1.File:Import:SingleAscii 2.Check the 'Partial import' box and go to 'Options' 3.Ti9ck the 'Delimited' tick box and chose space as the delimiter 4.Skip main header, number of lines: 1 5.Specify known subheader lines: 1 6.Max # of lines stored in the coumn header: 1 7.In the partial import dialog chose Row from 1 to the number of y-data points you have
Routines
Routine details
File attributes
Modification date: | Tue Oct 1 14:43:02 2013 |
Lines: | 369 |