Package schrodinger :: Package application :: Package matsci :: Module spectra
[hide private]
[frames] | no frames]

Module spectra

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
float
convert_nm_and_wavenumber(value)
Convert value in wavenumbers to nanometers or vice versa, the conversion is the same.
tuple of (str, str, schrodinger.infra.table.Table)
get_file_data(filename)
Read the data from the file
tuple of 1-D numpy arrays
generate_curve(mytable, line_width, xprop, intensity, x_scale=1.0, uvvis=False, smin=None, smax=None, stride=None, function='Lorentzian', line_width_nm=False)
Generate a full curve for a series of frequency/intensity lines.
Variables [hide private]
  __doc__ = ...
  UVVIS = 'UV/Vis'
  VIB_SPECTRUM_MIN = 0
hash(x)
  VIB_SPECTRUM_MAX = 4000
  UV_SPECTRUM_MIN = 13333
  UV_SPECTRUM_MAX = 100000
  GAUSSIAN = 'Gaussian'
  LORENTZIAN = 'Lorentzian'
  __package__ = 'schrodinger.application.matsci'
Function Details [hide private]

convert_nm_and_wavenumber(value)

 

Convert value in wavenumbers to nanometers or vice versa, the conversion is the same.

Parameters:
  • value (int or float) - Number to convert
Returns: float
value converted from wavenumbers to nanometers or vice versa

get_file_data(filename)

 

Read the data from the file

Parameters:
  • name (str) - The name for the spectrum. If none, it will be derived from the file name.
Returns: tuple of (str, str, schrodinger.infra.table.Table)
First two members of the tuple are the s_j_x_lable and s_j_y_label properties. The third member of the tuple is a Table object from the schrodinger.infra.table module. This object holds the actual data.

generate_curve(mytable, line_width, xprop, intensity, x_scale=1.0, uvvis=False, smin=None, smax=None, stride=None, function='Lorentzian', line_width_nm=False)

 

Generate a full curve for a series of frequency/intensity lines. The curve is generated by broadening the lines with Gaussian or Lorentzian curves centered on each line, and summing the curves together.

Parameters:
  • mytable (table.Table object) - table of raw data
  • line_width (float) - the half-bandwidth to use when generating spectrum
  • x_scale (float) - the x-axis scale factor
  • intensity (str) - The label of the intensity property in mytable
  • xprop (str) - The label of the x-axis property in mytable
  • uvvis (bool) - True if this is a uv/vis spectrum, False if not (default is False, vibrational spectrum)
  • smin (int) - The minimum x-value in wavenumbers.
  • smax (int) - The maximum x-value in wavenumbers.
  • stride (int) - Compute the intensity every stride values of x
  • function (str) - The function used to broaden singular intensity values to a full spectrum curve. Default is Lorentzian, other option is Gaussian. Use the LORENTZIAN or GAUSSIAN module constants.
  • line_width_nm (bool) - Linewidth is given in nm. Default is wavenumbers. Not used for non-UV/Vis spectra.
Returns: tuple of 1-D numpy arrays
(xvalues, yvalues) with xvalues running from smin to smax with Xn = X(n-1) + stride. Note that the X unit will be wavenumbers for all spectra.

Variables Details [hide private]

__doc__

Value:
"""
Copyright Schrodinger, LLC. All rights reserved.
"""