Rank: 4557 based on 22 downloads (last 30 days) and 1 file submitted
photo

Peter T. S. DeVore

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Peter T. S. DeVore
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 May 2014 Screenshot Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore spectroscopy, chemistry, physics, aerospace, earth science, spectral lineshape 22 4
  • 5.0
5.0 | 1 rating
Comments and Ratings by Peter T. S. DeVore View all
Updated File Comments Rating
27 May 2014 ticklabelinside Moves tick labels to the inside of the plot axis. Author: Andrew Bliss

Also would be nice if it handled YDir = reverse, XDir = reverse.

26 May 2014 ticklabelinside Moves tick labels to the inside of the plot axis. Author: Andrew Bliss

Good for plots with default settings.

Improvement request: please add support for XAxisLocation = top, YAxisLocation = right.

10 May 2014 Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore

Thank you Iliya for the comment, it should be fixed now. Please go ahead and test the new version with CO2.

04 Feb 2014 Break X Axis Splits the x-axis into 2 disjoint regions in order to hide an uninteresting portion of a figure. Author: Peter

Would be nice if it could support multiple breaks. I, in particular, need that.

20 Aug 2013 Voigt lineshape spectrum simulation GUI This GUI program simulates Voigt spectral lineshape and absorption from HiTRAN output file. Author: Chong Tao

The code would not run with HiTran 2012 data until I made this fix to SimuLS_Callback(source, eventdata) as follows:

C = textscan(fid, ...
['%2f' '%1f' '%12f' '%10f' '%10f' ...
'%5f' '%5f' '%10f' '%4f' '%8f' ...
'%15c' '%15c' '%15c' '%15c' '%6c' ...
'%12c' '%1c' '%7f' '%7f'], 'delimiter', '' ...
, 'whitespace', '');
fclose(fid); %% returned C is a cell

N = length(C{1}); %% Number of lines/ Cell length
%% define a grid
rangeL= -Dd + min(C{3}); %% spectrum region: First line minus 1 cm-1
rangeH = Dd + max(C{3}); %% Last line position + 1 cm-1
grd=[rangeL:stp:rangeH]; %% define the grid

v = grd;
gD = str2num(get(het2, 'string'));
gL = str2num(get(het3, 'string'));
gV = 0.5346*gL + sqrt(0.2166*gL^2 + gD^2); %% Voigt profile half width
x = gL/gV;
SgmvTot = 0;

for i=1:N %% calculate the line shape for each peak

v0(i) = C{3}(i);
S(i) = C{4}(i);
y = abs(v-v0(i))/gV;
Sgmv0(i) = S(i)/(2*gV*(1.065 + 0.447*x + 0.058*x^2));
Sgmv = Sgmv0(i)*((1-x)*exp(-0.693.*y.^2) + (x./(1+y.^2)) + ...
0.016*(1-x)*x*(exp(-0.0841.*y.^2.25)-1./(1 + 0.021.*y.^2.25)));

SgmvTot = SgmvTot + Sgmv;

end

I would also add in code that lets someone choose the range of lines to select, i.e. let the user choose rangeL and rangeH, then only plot lines within that range. Should be an easy fix.

Comments and Ratings on Peter T. S. DeVore 's Files View all
Updated File Comment by Comments Rating
20 May 2014 Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore Mark

I also had some issues with reading *.out files from HITRAN/JavaHAWKS using textscan. In my version of Matlab (2006b), textscan did not ignore whitespace even with %c at the start (CO is molecule number " 5"). I also encountered a whitespace issue with %f later in the input line. I fixed both problems using fscanf with %c for all 19 fields and converting appropriate fields to numbers using str2num.

I compared the CO spectra computed by load_hitran with those from spectralcalc.com, and the agreement was excellent. I tried both the standard conditions, and with pressure broadening for self- and air-collisions.

I also added temperature dependence, and it was not too hard. The HITRAN JavaHAWKS program takes care of the population distributions at non-reference temperatures, and fixing the Doppler width to use an input temperature and adjusting the molecular density at pressure according to the temperature is all that is required. Again, I used the spectra at various temperatures produced by spectralcalc.com as a reference, and load_hitran spectra agreed very well.

Well done! A few updates as above would make the program even more useful, at least to people with similar needs as me.

10 May 2014 Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore Peter T. S. DeVore

Thank you Iliya for the comment, it should be fixed now. Please go ahead and test the new version with CO2.

05 May 2014 Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore Iliya

Just a word of warning to users -
The textscan function in load_hitran removes leading spaces from lines (regardless of the 'whitespace' flag), therefore for molecules whose index is 1 digit (with a leading whitespace, such as CO2 which is " 2") the whole textscanning is 1 digit shifted and therefore wrong. This may be fixed by various ways, such as: 1) change the first '%2f' to '%2c' followed by HITRAN_data{1}=str2num(HITRAN_data{1});
2) use fscanf.

10 Mar 2014 Load HITRAN 2004+ Data Imports HITRAN molecular absorption data as raw and absorbance data. Author: Peter T. S. DeVore Ian

For calculating your Voigt function, I highly recommend:

http://www.mathworks.com/matlabcentral/fileexchange/38787-faddeeva-package-complex-error-functions

it is both fast and accurate.

Contact us