enyo.etc.vph module¶
Various efficiency calculations
Copyright © 2020, Kyle B. Westfall
#.. _pypi https://pypi.org/project/sdss-mangadap/
-
class
enyo.etc.vph.VPHGrating(line_density, n_bulk, n_mod, thickness, peak_wave=None, wave_lim=None)[source]¶ Bases:
objectObject for generic computations for a volume-phase holographic grating.
Parameters: - line_density (
float) – Line density of the grating in lines per mm. - n_bulk (
float) – Bulk index of refraction. - n_mod (
float) – Modulation in the index of refraction. - thickness (
float) – Grating thickness in micron. - peak_wave (
float, optional) – Wavelength in angstroms of peak efficiency. This can be calculated using the properties of the grating, but a reasonable set of wavelength limits (seewave_lim) are required, both minimum and maximum. If provided directly, this is not checked against this direct calculation. - wave_lim (
tuple, optional) – Two-tuple with the lower and upper wavelength limits in angstroms to allow for any calculations for this grating. If None, no limits are imposed. Elements of the tuple can be None, meaning the specific limit is undefined; i.e., to define an upper limit only, setwave_lim=(None,5400).
-
_check_wavelengths(wave)[source]¶ Ensure there are valid wavelengths.
Parameters: wave ( float, numpy.ndarray) – Wavelength in angstroms.
-
_return(wave, value, indx)[source]¶ For calculations involving wavelength, this is a convenience function that does the type jiggering.
-
angular_dispersion(wave, alpha=None, m=1)[source]¶ Return the angular dispersion in radians per angstrom.
Parameters: - wave (
float, numpy.ndarray) – Wavelengths for the computation. - alpha (
float, optional) – The angle of incidence on the grating. If None, the angle is the Bragg angle for each wavelength; ie., you should basically always be providingalpha. - m (
int, optional) – Grating order.
Returns: The angular dispersion in radians per angstrom.
Return type: float, numpy.ndarray, numpy.ma.MaskedArray- wave (
-
bragg_angle(wave, radians=False)[source]¶ Compute the Bragg incidence angle for the grating.
Based on IDL code provided Jason Fucik (CalTech), 7 Apr 2020.
Parameters: - wave (
float, numpy.ndarray) – Wavelength at which to calculate the Bragg angle (angstroms in air). - radians (
bool, optional) – Provide the angle in radians, instead of degrees.
Returns: The super-blaze incidence angle.
Return type: float, numpy.ndarray, numpy.ma.MaskedArray- wave (
-
bragg_angle_dcg(wave, sine_of=False)[source]¶ Calculate the grating Bragg angle in degrees in the DCG layer.
Based on IDL code provided Jason Fucik (CalTech), 7 Apr 2020.
Parameters: - wave (
float, numpy.ndarray) – Wavelength at which to calculate the Bragg angle (angstroms in air). - sine_of (
bool, optional) – Return the sine of the angle instead of the angle itself.
Returns: The (sine of) the Bragg angle.
Return type: float, numpy.ndarray, numpy.ma.MaskedArray- wave (
-
diffracted_wave(beta, alpha=None, m=1)[source]¶ Compute the wavelength at the provided angle of diffraction.
Parameters: - beta (
float) – Angle of diffraction. - alpha (
float, optional) – The angle of incidence on the grating. If None, assumed to be the same as the diffraction angle and the Littrow wavelength is returned; seelittrow_wavelength(). - m (
int, optional) – Grating order.
Returns: Wavelength in angstroms at the provided angle of diffraction.
Return type: float- beta (
-
diffraction_angle(wave, alpha=None, m=1, radians=False)[source]¶ Compute the diffraction angle for the provided wavelengths.
Parameters: - wave (
float, numpy.ndarray) – Wavelengths for the computation. - alpha (
float, optional) – The angle of incidence on the grating. If None, the angle is the Bragg angle for each wavelength; ie., you should basically always be providingalpha. - m (
int, optional) – Grating order. - radians (
bool, optional) – Provide the angle in radians, instead of degrees.
Returns: The angle of diffraction for each wavelength.
Return type: float, numpy.ndarray, numpy.ma.MaskedArray- wave (
-
efficiency(wave, tilt=0.0, alpha=None)[source]¶ Calculate the efficiency at the provided wavelengths.
Based on IDL code provided Jason Fucik (CalTech), 7 Apr 2020.
Parameters: - wave (
float, numpy.ndarray) – Wavelengths in angstroms at which to calculate the efficiency. - tilt (
float, optional) – Grating tilt in degrees. Only used if - alpha (
float, optional) – Angle of incidence onto the grating. If None, return the super-blaze function.
Returns: The grating efficiency. The type returned matches the type provided for
wave.Return type: float, numpy.ndarray- wave (
-
littrow_angle(wave, m=1)[source]¶ Calculate the Littrow indicence angle for the provided wavelength.
Parameters: - wave (
float) – Wavelength in angstroms. - m (
int, optional) – Grating order.
Returns: Input/output angle in degrees.
Return type: float- wave (
-
littrow_wavelength(alpha, m=1)[source]¶ Compute the Littrow wavelength at the provided incidence angle.
Parameters: - alpha (
float) – Incidence angle in degrees. - m (
int, optional) – Grating order.
Returns: Wavelength in angstroms.
Return type: float- alpha (
-
peak_wave¶ The wavelength with the peak super-blaze efficiency.
Computation is approximate based on sampling the super-blaze and picking the sample with the highest efficiency.
- line_density (