Derived Types
- type specgrid_t
The specgrid_t type represents a grid of spectroscopic data.
This grid may be used to interpolate the specific intensity (or related quantities) across a wavelength abscissa and for a set of photospheric parameter values.
- subroutine get_rank(rank)
Get the number of dimensions (rank) of the grid.
- Parameters:
rank [integer ,out] :: Rank.
- subroutine get_shape(shape)
Get the shape of the grid.
- Parameters:
shape (*) [integer ,out] :: Shape; length rank.
- subroutine get_axis(i, axis)
Get an axis of the grid.
- Parameters:
i [integer ,in] :: Index of axis (between 1 and rank).
axis [axis_t ,out] :: Axis.
- subroutine get_lam_min(lam_min)
Get the minimum wavelength of the grid.
- Parameters:
lam_min [real(RD),out] :: Minimum wavelength (Å).
- subroutine get_lam_max(lam_max)
Get the maximum wavelength of the grid.
- Parameters:
lam_max [real(RD),out] :: Maximum wavelength (Å).
- subroutine get_cache_lam_min(cache_lam_min)
Get the minimum wavelength of the grid cache.
- Parameters:
lam_min [real(RD),out] :: Minimum wavelength (Å).
- subroutine get_cache_lam_max(cache_lam_max)
Get the maximum wavelength of the grid cache.
- Parameters:
cache_lam_max [real(RD),out] :: Maximum wavelength (Å).
- subroutine get_cache_limit(cache_limit)
Get the maximum memory usage of the grid cache.
- Parameters:
cache_limit [integer ,out] :: Maximum memory usage (MB).
- subroutine get_cache_usage(cache_usage)
Get the current memory usage of the grid cache.
- Parameters:
cache_usage [integer ,out] :: Current memory usage (MB)
- subroutine set_cache_lam_min(cache_lam_min, stat)
Set the minimum wavelength of the grid cache.
- Parameters:
lam_min [real(RD),in] :: Minimum wavelength (Å).
- Options:
stat [integer ,out] :: Status code.
- subroutine set_cache_lam_max(cache_lam_max, stat)
Set the maximum wavelength of the grid cache.
- Parameters:
cache_lam_max [real(RD),in] :: Maximum wavelength (Å).
- Options:
stat [integer ,out] :: Status code.
- subroutine set_cache_limit(cache_limit, stat)
Set the maximum memory usage of the grid cache.
- Parameters:
cache_limit [integer ,in] :: Maximum memory usage (MB).
- Options:
stat [integer ,out] :: Status code.
- subroutine interp_intensity(x_vec, mu, z, lam, I, stat, deriv_vec, order)
Interpolate the spectroscopic specific intensity for a photospheric element.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
mu [real(RD),in] :: Cosine of angle of emergence relative to element normal.
z [real(RD),in] :: Redshift of element relative to observer’s frame.
lam (*) [real(RD),in] :: Wavelength abscissa (Å) in observer’s frame.
I (*) [real(RD),out] :: Spectroscopic specific intensity (erg/cm^2/s/Å/sr) in bins delineated by lam; length SIZE(lam)-1.
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_E_moment(x_vec, k, z, lam, E, stat, deriv_vec, order)
Interpolate the spectroscopic intensity E-moment for a photospheric element.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
k [integer ,in] :: Degree of moment.
z [real(RD),in] :: Redshift of element relative to observer’s frame.
lam (*) [real(RD),in] :: Wavelength abscissa (Å) in observer’s frame.
E (*) [real(RD),out] :: Spectroscopic intensity E-moment (erg/cm^2/s/Å) in bins delineated by lam; length SIZE(lam)-1.
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_P_moment(x_vec, l, z, lam, P, stat, deriv_vec, order)
Interpolate the spectroscopic intensity P-moment for a photospheric element.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
l [integer ,in] :: Harmonic degree of moment.
z [real(RD),in] :: Redshift of element relative to observer’s frame.
lam (*) [real(RD),in] :: Wavelength abscissa (Å) in observer’s frame.
P (*) [real(RD),out] :: Spectroscopic intensity P-moment (erg/cm^2/s/Å) in bins delineated by lam; length SIZE(lam)-1.
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_irradiance(x_vec, mu, dOmega, z, lam, F, stat, deriv_vec, order)
Interpolate the spectroscopic irradiance for an object composed of multiple photospheric elements.
- Parameters:
x_vec (*,*) [real(RD),in] :: Photospheric parameter values.
mu (*) [real(RD),in] :: Cosines of angles of emergence relative to element normals; length SIZE(x_vec, 2).
dOmega (*) [real(RD),in] :: Solid angles (sr) of elements; length SIZE(x_vec, 2).
z (*) [real(RD),in] :: Redshifts of elements relative to observer’s frame; length SIZE(x_vec, 2).
lam (*) [real(RD),in] :: Wavelength abscissa (Å) in observer’s frame.
F (*) [real(RD),out] :: Spectroscopic irradiance (erg/cm^2/s/Å) in bins delineated by lam; length SIZE(lam)-1.
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec, 1).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_flux(x_vec, z, lam, F, stat, deriv_vec, order)
Interpolate the spectroscopic flux for a photospheric element.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
z [real(RD),in] :: Redshift of element relative to observer’s frame.
lam (*) [real(RD),in] :: Wavelength abscissa (Å) in observer’s frame.
F (*) [real(RD),out] :: Spectroscopic flux (erg/cm^2/s/Å) in bins delineated by lam; length SIZE(lam)-1.
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine adjust_x_vec(x_vec, dx_vec, x_adj, stat)
Adjust photospheric parameters in a specified direction, until they fall within a valid part of the grid.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
dx_vec (*) [real(RD),in] :: Photospheric parameter adjustment direction. The overall scaling is unimportant, but at least one element must be non-zero. Length SIZE(x_vec)
x_adj (*) [real(RD),out] :: Adjusted photospheric parameter values; length SIZE(x_vec)
- Options:
stat [integer ,out] :: Status code.
- type photgrid_t
The photgrid_t type represents a grid of photometric data.
This grid may be used to interpolate the intensity (or related quantities) for a set of photospheric parameter values.
- subroutine get_rank(rank)
Get the number of dimensions (rank )of the grid.
- Parameters:
rank [integer ,out] :: Returned rank.
- subroutine get_shape(shape)
Get the shape of the grid.
- Parameters:
shape (*) [integer ,out] :: Shape; length rank.
- subroutine get_axis(i, axis)
Get an axis of the grid.
- Parameters:
i [integer ,in] :: Index of axis (between 1 and rank)
axis [axis_t ,out] :: Returned axis.
- subroutine get_cache_limit(cache_limit)
Get the maximum memory usage of the cache.
- Parameters:
cache_limit [integer ,out] :: Maximum memory usage (MB).
- subroutine get_cache_usage(cache_usage)
Get the current memory usage of the cache.
- Parameters:
cache_usage [integer ,out] :: Current memory usage (MB)
- subroutine set_cache_limit(cache_limit, stat)
Set the maximum memory usage of the cache.
- Parameters:
cache_limit [integer ,in] :: Maximum memory usage (MB).
- Options:
stat [integer ,out] :: Status code.
- subroutine interp_intensity(x_vec, mu, I, stat, deriv_vec, order)
Interpolate the photometric specific intensity for a photospheric element, normalized by the zero-point flux.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
mu [real(RD),in] :: Cosine of angle of emergence relative to element normal.
I [real(RD),out] :: Photometric specific intensity (/sr).
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_E_moment(x_vec, k, E, stat, deriv_vec, order)
Interpolate the photometric E-moment for a photospheric element, normalized by the zero-point flux.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
k [integer ,in] :: Degree of of moment.
E [real(RD),out] :: Photometric E-moment (dimensionless).
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_P_moment(x_vec, l, P, stat, deriv_vec, order)
Interpolate the photometric P-moment for a photospheric element, normalized by the zero-point flux.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
l [integer ,in] :: Harmonic degree of moment.
P [real(RD),out] :: Photometric P-moment (dimensionless).
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_irradiance(x_vec, mu, dOmega, F, stat, deriv_vec, order)
Interpolate the photometric irradiance for an object composed of multiple photospheric elements, normalized by the zero-point flux.
- Parameters:
x_vec (*,*) [real(RD),in] :: Photospheric parameter values.
mu (*) [real(RD),in] :: Cosines of angles of emergence relative to element normals; length SIZE(x_vec, 2).
dOmega (*) [real(RD),in] :: Solid angles (sr) of elements; length SIZE(x_vec, 2).
F [real(RD),out] :: Photometric irradiance (dimensionless).
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine interp_flux(x_vec, F, stat, deriv_vec, order)
Interpolate the photometric flux for a photospheric element, normalized by the zero-point flux.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
F [real(RD),out] :: Photometric flux (dimensionless)
- Options:
stat [integer ,out] :: Status code.
deriv_vec (*) [logical ,in] :: Derivative flags; length SIZE(x_vec).
order [integer ,in] :: Interpolation order (1 or 3).
- subroutine adjust_x_vec(x_vec, dx_vec, x_adj, stat)
Adjust photospheric parameters in a specified direction, until they fall within a valid part of the grid.
- Parameters:
x_vec (*) [real(RD),in] :: Photospheric parameter values.
dx_vec (*) [real(RD),in] :: Photospheric parameter adjustment direction. The overall scaling is unimportant, but at least one element must be non-zero. Length SIZE(x_vec).
x_adj (*) [real(RD),out] :: Adjusted photospheric parameter values; length SIZE(x_vec).
- Options:
stat [integer ,out] :: Status code.
- type axis_t
The axis_t type represents a grid axis.
- subroutine get_n(n)
Get the number of points making up the axis.
- Parameters:
rank [integer ,out] :: Number of points.
- subroutine get_x_min(x_min)
Get the minimum value of the axis.
- Parameters:
x_min [real(RD),out] :: Minimum value.
- subroutine get_x_max(x_max)
Get the maximum value of the axis.
- Parameters:
x_max [real(RD),out] :: Maximum value.
- subroutine get_label(label)
Get the axis label.
- Parameters:
character (*) :: Label.
- subroutine fetch(i, x, stat)
Fetch an axis value.
- Parameters:
i [integer ,in] :: Index of value (from 1 to n).
x [real(RD),out] :: Axis value.
- Options:
stat [integer ,out] :: Status code.
- subroutine locate(x, i)
Locate where along the axis a value falls.
- Parameters:
x [real(RD),out] :: Value to locate.
i [integer ,out] :: Location index.