Interface Summary

This chapter briefly summarizes MSG’s Python, Fortran and C interfaces.

Python Interface

The Python interface is designed around the pymsg.SpecGrid and pymsg.PhotGrid classes, which support interpolation of spectroscopic and photometric data, respectively. The table below summarizes the mapping between the various quantities defined in the MSG Fundamentals chapter, and the methods provided by these classes.

Table 1 Python Interpolation Routines

Symbol

Quantity

Method

\(\intsy\)

Spectroscopic specific intensity

pymsg.SpecGrid.intensity()

\(\emom\)

Spectroscopic E-moment

pymsg.SpecGrid.E_moment()

\(\pmom\)

Spectroscopic P-moment

pymsg.SpecGrid.P_moment()

\(\irrad\)

Spectroscopic irradiance

pymsg.SpecGrid.irradiance()

\(\flux\)

Spectroscopic flux

pymsg.SpecGrid.flux()

\(\mintsy/\fluxz\)

Photometric specific intensity, normalized by zero-point flux

pymsg.PhotGrid.intensity()

\(\memom/\fluxz\)

Photometric E-moment, normalized by zero-point flux

pymsg.PhotGrid.E_moment()

\(\mpmom/\fluxz\)

Photometric P-moment, normalized by zero-point flux

pymsg.PhotGrid.P_moment()

\(\mirrad/\fluxz\)

Photometric irradiance, normalized by zero-point flux

pymsg.PhotGrid.irradiance()

\(\mflux/\fluxz\)

Photometric flux, normalized by zero-point flux

pymsg.PhotGrid.flux()

Fortran Interface

The Fortran interface is designed around the specgrid_t and photgrid_t derived types, which support interpolation of spectroscopic and photometric data, respectively. The table below summarizes the mapping between the various quantities defined in the MSG Fundamentals chapter, and the type-bound procedures provided by these types.

Table 2 Fortran Interpolation Routines

Symbol

Quantity

Procedure

\(\intsy\)

Spectroscopic specific intensity

specgrid_t%intensity()

\(\emom\)

Spectroscopic E-moment

specgrid_t%E_moment()

\(\pmom\)

Spectroscopic P-moment

specgrid_t%P_moment()

\(\irrad\)

Spectroscopic irradiance

specgrid_t%irradiance()

\(\flux\)

Spectroscopic flux

specgrid_t%flux()

\(\mintsy/\fluxz\)

Photometric specific intensity, normalized by zero-point flux

photgrid_t%intensity()

\(\memom/\fluxz\)

Photometric E-moment, normalized by zero-point flux

photgrid_t%E_moment()

\(\mpmom/\fluxz\)

Photometric P-moment, normalized by zero-point flux

photgrid_t%P_moment()

\(\mirrad/\fluxz\)

Photometric irradiance, normalized by zero-point flux

photgrid_t%irradiance()

\(\mflux/\fluxz\)

Photometric flux, normalized by zero-point flux

photgrid_t%flux()

C Interface

The C interface is designed around the SpecGrid and PhotGrid typedefs, which support interpolation of spectroscopic and photometric data, respectively. The table below summarizes the mapping between the various quantities defined in the MSG Fundamentals chapter, and the functions that operate on these types.

Table 3 C Interpolation Routines

Symbol

Quantity

Function

\(\intsy\)

Spectroscopic specific intensity

interp_specgrid_intensity()

\(\emom\)

Spectroscopic E-moment

interp_specgrid_E_moment()

\(\pmom\)

Spectroscopic P-moment

interp_specgrid_P_moment()

\(\irrad\)

Spectroscopic irradiance

interp_specgrid_irradiance()

\(\flux\)

Spectroscopic flux

interp_specgrid_flux()

\(\mintsy/\fluxz\)

Photometric specific intensity, normalized by zero-point flux

interp_photgrid_intensity()

\(\memom/\fluxz\)

Photometric E-moment, normalized by zero-point flux

interp_photgrid_E_moment()

\(\mpmom/\fluxz\)

Photometric P-moment, normalized by zero-point flux

interp_photgrid_P_moment()

\(\mirrad/\fluxz\)

Photometric irradiance, normalized by zero-point flux

interp_photgrid_irradiance()

\(\mflux/\fluxz\)

Photometric flux, normalized by zero-point flux

interp_photgrid_flux()