MUSE Pipeline Reference Manual  2.1.1
Enumerations | Functions
Physics functions for the MUSE pipeline

Enumerations

Functions

double muse_phys_nrindex_owens_saturation_pressure (double temp)
 Compute the saturation pressure using the Owens calibration. More...
 
void muse_phys_nrindex_owens_coeffs (double temp, double rhum, double pres, double *d1, double *d2)
 Compute the two coefficients for the Owens method. More...
 
double muse_phys_nrindex_owens (double l, double d1, double d2)
 Compute the refractive index for the given wavelength following Owens. More...
 
double muse_phys_nrindex_edlen (double l, double t, double p, double pv)
 Compute the refractive index for the given wavelength following Edlén. More...
 
double muse_phys_nrindex_ciddor (double l, double T, double p, double xv, double xCO2)
 Compute the refractive index for the given wavelength following Ciddor. More...
 
double muse_phys_nrindex_filippenko (double l, double T, double f, double P)
 Compute the refractive index for the given wavelength following Filippenko. More...
 
cpl_error_code muse_phys_air_to_vacuum (muse_pixtable *aPixtable, unsigned int aFlags)
 Convert a pixel table from air to vacuum wavelengths. More...
 

Detailed Description

Enumeration Type Documentation

Flags with special bit setup to pass to muse_phys_air_to_vacuum().

The 2nd bit determines the air parameter determination, higher bits the method to use for conversion. Use (flags & 0xC) to access the methods.

Enumerator
MUSE_PHYS_AIR_STANDARD 

use standard air parameters

MUSE_PHYS_AIR_MEASURED 

use measured air parameters

MUSE_PHYS_METHOD_CIDDOR 

use Ciddor formulae for conversion

MUSE_PHYS_METHOD_OWENS 

use Owens formulae for conversion

MUSE_PHYS_METHOD_EDLEN 

use Edlen formulae for conversion

MUSE_PHYS_METHOD_FILIPPENKO 

use Filippenko formulae for conversion

Definition at line 53 of file muse_phys.h.

Function Documentation

cpl_error_code muse_phys_air_to_vacuum ( muse_pixtable aPixtable,
unsigned int  aFlags 
)

Convert a pixel table from air to vacuum wavelengths.

Parameters
aPixtableinput MUSE pixel table in air wavelength
aFlagsflags to describe air properties used and the method
Returns
CPL_ERROR_NONE on success, another CPL error code on failure

The argument aFlags is thought to be or'd with one to two of the flags of the muse_phys_flags enum. The MUSE_PHYS_AIR_* selection is mandatory to choose either conversion using "International Standard Atmosphere" (MUSE_PHYS_AIR_STANDARD; dry air, 15 degC, 1013.25 hPa, see e.g. https://de.wikipedia.org/w/index.php?title=Normatmosph%C3%A4re&oldid=145634782) or air condition measurements from the pixel table header (MUSE_PHYS_AIR_MEASURED).

Four methods are available to compute the refractive index of air:

  • "Ciddor": the algorithm from Phillip E. Ciddor, 1996 Applied Optics 35, 1566 - 1573. This method is supposed to be the most accurate way to compute the refractive index of air, with a validity range of at least 3000 to 17000 Angstrom, and was chosen by the International Association of Geodesy as their standard (http://emtoolbox.nist.gov/Wavelength/Documentation.asp#EdlenorCiddor). See http://emtoolbox.nist.gov/Wavelength/Documentation.asp#AppendixA for all formulae used here. This is active if aFlags was or'ed with MUSE_PHYS_METHOD_CIDDOR or by default.
  • "Owens": the formulae come from J. C. Owens, 1967 Applied Optics 6, 51 - 59, and are used here in the form as implemented by Sandin et al., 2008 A&A 486, 545 in the p3d program. This is active if aFlags was or'ed with MUSE_PHYS_METHOD_OWENS.
  • "Edlen": the algorithm from B. Edlén, 1966 Metrologia 2, 71 - 80 and K. P. Birch & M. J. Downs, 1993 Metrologia 30, 155 - 162. See http://emtoolbox.nist.gov/Wavelength/Documentation.asp for all formulae used. This is active if aFlags was or'ed with MUSE_PHYS_METHOD_EDLEN.
  • "Filippenko": The algorithm from Filippenko, 1982 PASP 94, 715. This uses the formula from Owens which converts relative humidity to water vapor pressure. This is active if aFlags was or'ed with MUSE_PHYS_METHOD_FILIPPENKO.
Note
This function sets the keyword MUSE_HDR_PT_SPEC_TYPE with the content "WAVE" when finished successfully.
Exceptions
set and return CPL_ERROR_NULL_INPUTaPixtable or its header or table components are NULL
set and return CPL_ERROR_DATA_NOT_FOUNDaPixtable is not conforming to format muse_pixtable_def
set and return CPL_ERROR_UNSUPPORTED_MODEaFlags is zero
output warning, set and return CPL_ERROR_TYPE_MISMATCHheader of aPixtable already contains MUSE_HDR_PT_SPEC_TYPE and it's not "AWAV"
set and return CPL_ERROR_DATA_NOT_FOUNDatmosphere handling type is MUSE_PHYS_AIR_MEASURED, but pressure, temperature, humidity are not present in the input pixel table header

Definition at line 261 of file muse_phys.c.

References muse_pixtable::header, muse_cpltable_check(), MUSE_HDR_PT_SPEC_TYPE, muse_pfits_get_pres_end(), muse_pfits_get_pres_start(), muse_pfits_get_rhum(), muse_pfits_get_temp(), MUSE_PHYS_METHOD_CIDDOR, MUSE_PHYS_METHOD_EDLEN, MUSE_PHYS_METHOD_OWENS, muse_phys_nrindex_ciddor(), muse_phys_nrindex_edlen(), muse_phys_nrindex_filippenko(), muse_phys_nrindex_owens(), muse_phys_nrindex_owens_coeffs(), muse_phys_nrindex_owens_saturation_pressure(), muse_pixtable_compute_limits(), muse_pixtable_def, muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, and muse_pixtable::table.

Referenced by muse_postproc_cube_resample_and_collapse().

double muse_phys_nrindex_ciddor ( double  l,
double  T,
double  p,
double  xv,
double  xCO2 
)

Compute the refractive index for the given wavelength following Ciddor.

Parameters
lthe wavelength [um]
Ttemperature [K]
ppressure [Pa]
xvmole fraction
xCO2CO2 concentration [umol / mol], use 450.0 for a good default value
Returns
the refractive index

The source of the value xCO2 = 450 is Birch et al., 1993, Metrologia 30, 7 (see the routine p3d_darc_amplitude_iag in the p3d IFS reduction package).

Definition at line 148 of file muse_phys.c.

Referenced by muse_dar_correct(), and muse_phys_air_to_vacuum().

double muse_phys_nrindex_edlen ( double  l,
double  t,
double  p,
double  pv 
)

Compute the refractive index for the given wavelength following Edlén.

Parameters
lthe wavelength [um]
ttemperature [Celsius]
ppressure [Pa]
pvpartial pressure [Pa]
Returns
the refractive index

Definition at line 115 of file muse_phys.c.

Referenced by muse_dar_correct(), and muse_phys_air_to_vacuum().

double muse_phys_nrindex_filippenko ( double  l,
double  T,
double  f,
double  P 
)

Compute the refractive index for the given wavelength following Filippenko.

Parameters
lthe wavelength (in um)
Ttemperature (in degrees Celsius)
fwater vapor pressure (in mmHg)
Patmospheric pressure (in mmHg)
Returns
the refractive index

Definition at line 193 of file muse_phys.c.

Referenced by muse_dar_correct(), and muse_phys_air_to_vacuum().

double muse_phys_nrindex_owens ( double  l,
double  d1,
double  d2 
)

Compute the refractive index for the given wavelength following Owens.

Parameters
lthe wavelength [um]
d1coefficient 1
d2coefficient 2
Returns
the refractive index

Definition at line 95 of file muse_phys.c.

Referenced by muse_dar_correct(), and muse_phys_air_to_vacuum().

void muse_phys_nrindex_owens_coeffs ( double  temp,
double  rhum,
double  pres,
double *  d1,
double *  d2 
)

Compute the two coefficients for the Owens method.

Parameters
temptemperature (in Kelvin)
rhumthe relative humidity (in %)
presatmospheric pressure (in hPa)
d1coefficient 1
d2coefficient 2

Definition at line 70 of file muse_phys.c.

References muse_phys_nrindex_owens_saturation_pressure().

Referenced by muse_dar_correct(), and muse_phys_air_to_vacuum().

double muse_phys_nrindex_owens_saturation_pressure ( double  temp)

Compute the saturation pressure using the Owens calibration.

Parameters
temptemperature (in Kelvin)
Returns
the saturation pressure for the given temperature

This function is currently also used when choosing the Filippenko formulae.

Definition at line 54 of file muse_phys.c.

Referenced by muse_dar_correct(), muse_phys_air_to_vacuum(), and muse_phys_nrindex_owens_coeffs().