ARTS  2.3.1285(git:92a29ea9-dirty)
partial_derivatives.cc File Reference

Computes partial derivatives. More...

#include "partial_derivatives.h"
#include "absorption.h"
#include "arts.h"
#include "global_data.h"
#include "linescaling.h"
#include "quantum.h"

Go to the source code of this file.

Functions

void calc_derivative (Numeric &dxsec_dtarget, Numeric &dphase_dtarget, Numeric &dsrc_dtarget, const Numeric &dFA_dx, const Numeric &dFB_dx, const Numeric &dFA_dy, const Numeric &dFB_dy, const Numeric &dx_dtarget, const Numeric &dy_dtarget, const Numeric &FA, const Numeric &FB, const Numeric &FA_ratio_to_dtarget, const Numeric &FB_ratio_to_dtarget, const Numeric &lma, const Numeric &lmb, const Numeric &lma_real_ratio_to_dtarget, const Numeric &lma_imag_ratio_to_dtarget, const Numeric &lmb_real_ratio_to_dtarget, const Numeric &lmb_imag_ratio_to_dtarget, const Numeric &nlte, const Numeric &dnlte_dtarget, const bool do_phase, const bool do_src)
 
void partial_derivatives_lineshape_dependency (ArrayOfMatrix &partials_attenuation, ArrayOfMatrix &partials_phase, ArrayOfMatrix &partials_src, const ArrayOfRetrievalQuantity &flag_partials, const ArrayOfIndex &flag_partials_position, ConstVectorView CF_A, ConstVectorView CF_B, ConstVectorView C, ConstVectorView dFa_dx, ConstVectorView dFb_dx, ConstVectorView dFa_dy, ConstVectorView dFb_dy, ConstVectorView f_grid, const Range &this_f_grid, const Numeric &temperature, const Numeric &sigma, const Numeric &K2, const Numeric &dK2_dT, const Numeric &K3, const Numeric &dK3_dT, const Numeric &K4, const Numeric &line_frequency, const Numeric &line_strength, const Numeric &line_temperature, const Numeric &line_E_low, const Numeric &line_E_v_low, const Numeric &line_E_v_upp, const Numeric &line_T_v_low, const Numeric &line_T_v_upp, const Numeric &Y_LM, const Numeric &dY_LM_dT, const Numeric &G_LM, const Numeric &dG_LM_dT, const Numeric &DF_LM, const Numeric &dDF_LM_dT, const QuantumIdentifier &qi, const Index &ind_ls, const Index &ind_lsn, const Numeric &df_0, const Numeric &ddf_dT, const Numeric &gamma, const Numeric &dgamma_dT, const Numeric &dQ_dT, const Numeric &DF_Zeeman, const Numeric &H_mag_Zeeman, const bool do_zeeman, const Index &pressure_level_index, const bool do_partials_phase, const bool do_src)
 Computes all partial derivatives in old method. More...
 
bool line_match_line (const QuantumIdentifier &from_jac, const Index &species, const Index &isotopologue, const QuantumNumbers &lower_qn, const QuantumNumbers &upper_qn)
 Does this line match the identifier. More...
 
void line_match_level (bool &lower_energy_level, bool &upper_energy_level, const QuantumIdentifier &from_jac, const Index &species, const Index &isotopologue, const QuantumNumbers &lower_qn, const QuantumNumbers &upper_qn)
 Match energy level to the identifier. More...
 

Variables

const String PROPMAT_SUBSUBTAG
 

Detailed Description

Computes partial derivatives.

Author
Richard Larsson
Date
2015-10-07

Definition in file partial_derivatives.cc.

Function Documentation

◆ calc_derivative()

void calc_derivative ( Numeric dxsec_dtarget,
Numeric dphase_dtarget,
Numeric dsrc_dtarget,
const Numeric dFA_dx,
const Numeric dFB_dx,
const Numeric dFA_dy,
const Numeric dFB_dy,
const Numeric dx_dtarget,
const Numeric dy_dtarget,
const Numeric FA,
const Numeric FB,
const Numeric FA_ratio_to_dtarget,
const Numeric FB_ratio_to_dtarget,
const Numeric lma,
const Numeric lmb,
const Numeric lma_real_ratio_to_dtarget,
const Numeric lma_imag_ratio_to_dtarget,
const Numeric lmb_real_ratio_to_dtarget,
const Numeric lmb_imag_ratio_to_dtarget,
const Numeric nlte,
const Numeric dnlte_dtarget,
const bool  do_phase,
const bool  do_src 
)
inline

Definition at line 57 of file partial_derivatives.cc.

Referenced by partial_derivatives_lineshape_dependency().

◆ line_match_level()

void line_match_level ( bool &  lower_energy_level,
bool &  upper_energy_level,
const QuantumIdentifier from_jac,
const Index species,
const Index isotopologue,
const QuantumNumbers lower_qn,
const QuantumNumbers upper_qn 
)

Match energy level to the identifier.

Parameters
[out]lower_energy_levelDoes this match the lower energy level?
[out]upper_energy_levelDoes this match the upper energy level?
[in]from_jacA line identifier
[in]speciesA species-mapped index
[in]isotopologueA isotopologue-mapped index
[in]lower_qnLower state quantum numbers
[in]upper_qnUpper state quantum numbers

Definition at line 564 of file partial_derivatives.cc.

References QuantumNumbers::Compare(), QuantumIdentifier::Isotopologue(), QuantumIdentifier::QuantumMatch(), QuantumIdentifier::Species(), and QuantumIdentifier::TRANSITION_UPPER_INDEX.

Referenced by partial_derivatives_lineshape_dependency().

◆ line_match_line()

bool line_match_line ( const QuantumIdentifier from_jac,
const Index species,
const Index isotopologue,
const QuantumNumbers lower_qn,
const QuantumNumbers upper_qn 
)

Does this line match the identifier.

Parameters
[in]from_jacA line identifier
[in]speciesA species-mapped index
[in]isotopologueA isotopologue-mapped index
[in]lower_qnLower state quantum numbers
[in]upper_qnUpper state quantum numbers
Returns
true if lower_qn and upper_qn perfectly match from_jac
false Otherwise

Definition at line 542 of file partial_derivatives.cc.

References QuantumIdentifier::ALL, QuantumIdentifier::Isotopologue(), QuantumIdentifier::QuantumMatch(), QuantumIdentifier::Species(), QuantumIdentifier::TRANSITION, QuantumIdentifier::TRANSITION_LOWER_INDEX, QuantumIdentifier::TRANSITION_UPPER_INDEX, and QuantumIdentifier::Type().

Referenced by partial_derivatives_lineshape_dependency().

◆ partial_derivatives_lineshape_dependency()

void partial_derivatives_lineshape_dependency ( ArrayOfMatrix partials_attenuation,
ArrayOfMatrix partials_phase,
ArrayOfMatrix partials_src,
const ArrayOfRetrievalQuantity flag_partials,
const ArrayOfIndex flag_partials_position,
ConstVectorView  CF_A,
ConstVectorView  CF_B,
ConstVectorView  C,
ConstVectorView  dFa_dF,
ConstVectorView  dFb_dF,
ConstVectorView  dFa_dP,
ConstVectorView  dFb_dP,
ConstVectorView  f_grid,
const Range this_f_grid,
const Numeric temperature,
const Numeric sigma,
const Numeric K2,
const Numeric dK2_dT,
const Numeric K3,
const Numeric dK3_dT,
const Numeric K4,
const Numeric line_frequency,
const Numeric line_strength,
const Numeric line_temperature,
const Numeric line_E_low,
const Numeric line_E_v_low,
const Numeric line_E_v_upp,
const Numeric line_T_v_low,
const Numeric line_T_v_upp,
const Numeric Y_LM,
const Numeric dY_LM_dT,
const Numeric G_LM,
const Numeric dG_LM_dT,
const Numeric DF_LM,
const Numeric dDF_LM_dT,
const QuantumIdentifier qi,
const Index ind_ls,
const Index ind_lsn,
const Numeric df_0,
const Numeric ddf_0_dT,
const Numeric gamma,
const Numeric dgamma_dT,
const Numeric dQ_dT,
const Numeric DF_Zeeman,
const Numeric H_mag_Zeeman,
const bool  do_zeeman,
const Index pressure_level_index,
const bool  do_partials_phase,
const bool  do_src 
)

Computes all partial derivatives in old method.

Parameters
[in,out]partials_attenuationPartial derivatives of the attenualtion
[in,out]partials_phasePartial derivatives of the phase
[in,out]partials_srcPartial derivatives of the source
[in]flag_partialsList of derivatives
[in]flag_partials_positionlist of relevant derivatives
[in]CF_ALine shape attenuation and strength without line mixing
[in]CF_BLine shape phase and strength without line mixing
[in]CRenormalization factor for the line shape
[in]dFa_dFDerivative of attenuation line shape wrt frequency factor (strength and line mixing scaled)
[in]dFb_dFDerivative of phase line shape wrt frequency factor (strength and line mixing scaled)
[in]dFa_dFDerivative of attenuation line shape wrt pressure factor (strength and line mixing scaled)
[in]dFb_dFDerivative of phase line shape wrt pressure factor (strength and line mixing scaled)
[in]f_gridFrequency grid
[in]this_f_gridFrequency grid range
[in]temperatureTemperature
[in]sigmaDoppler broadening
[in]K2Stimulated emission
[in]dK2_dTStimulated emission temperature derivative
[in]K3Absorption NLTE ratio
[in]dK3_dTAbsorption NLTE ratio temperature derivative
[in]K4Source NLTE ratio
[in]line_frequencyLine frequency
[in]line_strengthLine reference strength
[in]line_temperatureLine reference temperature
[in]line_E_lowLine reference lower state energy
[in]line_E_v_lowLine reference lower state vibrational energy
[in]line_E_v_uppLine reference upper state vibrational energy
[in]line_T_v_lowLine reference lower state vibrational temperature
[in]line_T_v_uppLine reference upper state vibrational temperature
[in]Y_LMFirst order line mixing
[in]dY_LM_dTFirst order line mixing temperature derivative
[in]G_LMSecond order line mixing
[in]dG_LM_dTSecond order line mixing temperature derivative
[in]DF_LMSecond order shifting line mixing
[in]dDF_LM_dTSecond order shifting line mixing temperature derivative
[in]qiLine identifier
[in]ind_lsLine shape number
[in]ind_lsnLine shape normalization number
[in]df_0Speed-independent line center shift by pressure
[in]ddf_0_dTSpeed-independent line center shift by pressure temperature derivative
[in]gammaSpeed-independent line broadening by pressure
[in]dgamma_dTSpeed-independent line broadening by pressure temperature derivative
[in]dQ_dTPartition function temperature derivative
[in]DF_ZeemanZeeman shifting coefficient
[in]H_mag_ZeemanStrength of the magnetic field
[in]do_zeemanDo Zeeman calculations
[in]pressure_level_indexIndex pointing at this pressure level
[in]do_partials_phaseUse phase calculations
[in]do_srcUse source calculations

Definition at line 114 of file partial_derivatives.cc.

References BOLTZMAN_CONST, calc_derivative(), Range::get_extent(), is_frequency_parameter(), QuantumIdentifier::Isotopologue(), line_match_level(), line_match_line(), LineCenter, global_data::lineshape_data, global_data::lineshape_norm_data, LineStrength, QuantumIdentifier::LowerQuantumNumbers(), MagneticMagnitude, MagneticU, MagneticV, MagneticW, Array< base >::nelem(), ConstVectorView::nelem(), NLTE, PLANCK_CONST, QuantumIdentifier::Species(), Temperature, QuantumIdentifier::UpperQuantumNumbers(), and VMR.

Variable Documentation

◆ PROPMAT_SUBSUBTAG

const String PROPMAT_SUBSUBTAG