This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
codes:errorbudget [2020/12/13 20:01] fparraro |
codes:errorbudget [2020/12/13 22:32] fparraro |
||
---|---|---|---|
Line 10: | Line 10: | ||
**prepared by** | **prepared by** | ||
- | Alberto Reodondas, Francisco Parra Rojas, Javier López-Solano and Alberto Berjón | + | Alberto Reodondas, Francisco Parra-Rojas, Javier López-Solano and Alberto Berjón |
Line 534: | Line 534: | ||
^ Field ^ Description ^ | ^ Field ^ Description ^ | ||
^ ’gmt’ | datetime object ^ | ^ ’gmt’ | datetime object ^ | ||
- | ^ 'raw\_count\_w0 | raw counts wavelength #0 ^ | + | ^ 'raw_count_w0 | raw counts wavelength #0 ^ |
+ | ^ 'raw_count_w1 | raw counts wavelength #1 ^ | ||
+ | ^ 'raw_count_w2 | raw counts wavelength #2 ^ | ||
+ | ^ 'raw_count_w3 | raw counts wavelength #3 ^ | ||
+ | ^ 'raw_count_w4 | raw counts wavelength #4 ^ | ||
+ | ^ 'raw_count_w5 | raw counts wavelength #5 ^ | ||
+ | ^ 'dark_count’ | dark count ^ | ||
+ | ^ ’cycles’ | # of cycles ^ | ||
+ | ^ ’temp’ | Brewer Temperature ^ | ||
+ | ^ ’nd_filter_position’ | ND filter position of #2 Filterwheel (in steps) ^ | ||
+ | ^ ’o3’ | Level 1 ozone ^ | ||
+ | ^ ’pre’ | pressure ^ | ||
+ | ^ ’u_pre’ | pressure uncertainty ^ | ||
- | |align="center"| ’<math>raw\_count\_w1</math>’ | + | ==== Config ==== |
- | |align="center"| raw counts wavelength #1 | + | |
- | |- | + | |
- | |align="center"| ’<math>raw\_count\_w2</math>’ | + | |
- | |align="center"| raw counts wavelength #2 | + | |
- | |- | + | |
- | |align="center"| ’<math>raw\_count\_w3</math>’ | + | |
- | |align="center"| raw counts wavelength #3 | + | |
- | |- | + | |
- | |align="center"| ’<math>raw\_count\_w4</math>’ | + | |
- | |align="center"| raw counts wavelength #4 | + | |
- | |- | + | |
- | |align="center"| ’<math>raw\_count\_w5</math>’ | + | |
- | |align="center"| raw counts wavelength #5 | + | |
- | |- | + | |
- | |align="center"| ’<math>dark\_count</math>’ | + | |
- | |align="center"| dark count | + | |
- | |- | + | |
- | |align="center"| ’<math>cycles</math>’ | + | |
- | |align="center"| # of cycles | + | |
- | |- | + | |
- | |align="center"| ’<math>temp</math>’ | + | |
- | |align="center"| Brewer Temperature | + | |
- | |- | + | |
- | |align="center"| ’<math>nd\_filter\_position</math>’ | + | |
- | |align="center"| ND filter position of #2 Filterwheel (in steps) | + | |
- | |- | + | |
- | |align="center"| ’<math>o3</math>’ | + | |
- | |align="center"| Level 1 ozone | + | |
- | |- | + | |
- | |align="center"| ’<math>pre</math>’ | + | |
- | |align="center"| pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>u\_pre</math>’ | + | |
- | |align="center"| pressure uncertainty | + | |
- | |} | + | |
- | == Config == | + | This dictionary contains the Brewer settings values. The values can came from B files, ICF files or Eubrewnet database through //brewerjson//. The config dictionary contains the following fields: |
- | This dictionary contains the Brewer settings values. The values can came from B files, ICF files or Eubrewnet database through <math>brewerjson</math>. The config dictionary contains the following fields: | + | ^ Field ^ Description ^ |
+ | ^ ’w_o3_0’ | weight for double ratio #2 MS(9) calculation, for wavelength #0 ^ | ||
+ | ^ ’w_o3_2’ | weight for double ratio #2 MS(9) calculation, for wavelength #1 ^ | ||
+ | ^ ’w_o3_3’ | weight for double ratio #2 MS(9) calculation, for wavelength #2 ^ | ||
+ | ^ ’w_o3_4’ | weight for double ratio #2 MS(9) calculation, for wavelength #3 ^ | ||
+ | ^ ’w_o3_5’ | weight for double ratio #2 MS(9) calculation, for wavelength #4 ^ | ||
+ | ^ ’w_o3_6’ | weight for double ratio #2 MS(9) calculation, for wavelength #5 ^ | ||
+ | ^ ’o3tempcoef’ | ozone temperature coefficient for slit 0 ^ | ||
+ | ^ ’oslit1’ | ozone temperature coefficient for slit 1 ^ | ||
+ | ^ ’oslit2’ | ozone temperature coefficient for slit 2 ^ | ||
+ | ^ ’oslit3’ | ozone temperature coefficient for slit 3 ^ | ||
+ | ^ ’oslit4’ | ozone temperature coefficient for slit 4 ^ | ||
+ | ^ ’oslit5’ | ozone temperature coefficient for slit 5 ^ | ||
+ | ^ ’o3tempcoef_unc’ | ozone temperature coefficient uncertainty for slit 0 ^ | ||
+ | ^ ’oslit1_unc’ | ozone temperature coefficient uncertainty for slit 1 ^ | ||
+ | ^ ’oslit2_unc’ | ozone temperature coefficient uncertainty for slit 2 ^ | ||
+ | ^ ’oslit3_unc’ | ozone temperature coefficient uncertainty for slit 3 ^ | ||
+ | ^ ’oslit4_unc’ | ozone temperature coefficient uncertainty for slit 4 ^ | ||
+ | ^ ’oslit5_unc’ | ozone temperature coefficient uncertainty for slit 5 ^ | ||
+ | ^ 'it’ | slit sampling time ^ | ||
+ | ^ 'deadtime’ | dead time (seconds) ^ | ||
+ | ^ ’deadtime_unc’ | dead time uncertainty (seconds) ^ | ||
+ | ^ ’lf0’ | non-linearity filter coefficient of filter 0 ^ | ||
+ | ^ ’lf1’ | non-linearity filter coefficient of filter 1 ^ | ||
+ | ^ ’lf2’ | non-linearity filter coefficient of filter 2 ^ | ||
+ | ^ ’lf3’ | non-linearity filter coefficient of filter 3 ^ | ||
+ | ^ ’lf4’ | non-linearity filter coefficient of filter 4 ^ | ||
+ | ^ ’lf5’ | non-linearity filter coefficient of filter 5 ^ | ||
+ | ^ ’lf0_unc’ | non-linearity filter coefficient uncertainty of filter 0 ^ | ||
+ | ^ ’lf1_unc’ | non-linearity filter coefficient uncertainty of filter 1 ^ | ||
+ | ^ ’lf2_unc’ | non-linearity filter coefficient uncertainty of filter 2 ^ | ||
+ | ^ ’lf3_unc’ | non-linearity filter coefficient uncertainty of filter 3 ^ | ||
+ | ^ ’lf4_unc’ | non-linearity filter coefficient uncertainty of filter 4 ^ | ||
+ | ^ ’lf5_unc’ | non-linearity filter coefficient uncertainty of filter 5 ^ | ||
+ | ^ ’slope_wavelength’ | percent variation of double ratio with wavelength ^ | ||
+ | ^ ’slope_wavelength_unc’ | percent variation uncertainty of double ratio with wavelength ^ | ||
+ | ^ ’o3o3rate’ | ozone on ozone ratio ^ | ||
+ | ^ ’u_A1’ | ozone on ozone ratio uncertainty ^ | ||
+ | ^ ’latitude’ | site latitude in decimal degrees ^ | ||
+ | ^ ’longitude’ | site longitude in decimal degrees ^ | ||
+ | ^ ’be2’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #1 ^ | ||
+ | ^ ’be3’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #2 ^ | ||
+ | ^ ’be4’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #3 ^ | ||
+ | ^ ’be5’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #4 ^ | ||
+ | ^ ’be6’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #5 ^ | ||
+ | ^ ’etco3rate’ | ETC on ozone ratio ^ | ||
+ | ^ ’u_etc’ | ETC uncertainty on ozone ratio ^ | ||
+ | ^ ’rho_A_o3’ | Cross correlation coefficient between o3o3rate and o3 ^ | ||
+ | ^ ’rho_A_mu’ | Cross correlation coefficient between o3o3rate and ozone optical mass ^ | ||
+ | ^ ’rho_A_B’ | Cross correlation coefficient between o3o3rate and weighted Rayleigh depth ^ | ||
+ | ^ ’rho_A_m’ | Cross correlation coefficient between o3o3rate and Rayleigh optical mass ^ | ||
+ | ^ ’rho_A_p’ | Cross correlation coefficient between o3o3rate and pressure ^ | ||
+ | ^ ’rho_A_etc’ | Cross correlation coefficient between o3o3rate and ETC ^ | ||
+ | ^ ’rho_o3_mu’ | Cross correlation coefficient between o3 and ozone optical mass ^ | ||
+ | ^ ’rho_o3_B’ | Cross correlation coefficient between o3 and weighted Rayleigh depth ^ | ||
+ | ^ ’rho_o3_m’ | Cross correlation coefficient between o3 and Rayleigh optical mass ^ | ||
+ | ^ ’rho_o3_p’ | Cross correlation coefficient between o3 and pressure ^ | ||
+ | ^ ’rho_o3_etc’ | Cross correlation coefficient between o3 and ETC | ||
+ | ^ ’rho_mu_B’ | Cross correlation coefficient between ozone optical mass and weighted Rayleigh depth ^ | ||
+ | ^ ’rho_mu_m’ | Cross correlation coefficient between ozone optical mass and Rayleigh optical mass ^ | ||
+ | ^ ’rho_mu_p’ | Cross correlation coefficient between ozone optical mass and pressure ^ | ||
+ | ^ ’rho_mu_etc’ | Cross correlation coefficient between ozone optical mass and ETC | ||
+ | ^ ’rho_B_m’ | Cross correlation coefficient between weighted Rayleigh depth and Rayleigh optical mass ^ | ||
+ | ^ ’rho_B_p’ | Cross correlation coefficient between weighted Rayleigh depth and pressure ^ | ||
+ | ^ ’rho_B_etc’ | Cross correlation coefficient between weighted Rayleigh depth and ETC ^ | ||
+ | ^ ’rho_m_p’ | Cross correlation coefficient between Rayleigh optical mass and pressure ^ | ||
+ | ^ ’rho_m_etc’ | Cross correlation coefficient between Rayleigh optical mass and ETC ^ | ||
+ | ^ ’rho_p_etc’ | Cross correlation coefficient between pressure and ETC ^ | ||
- | {| | + | ===== Functions ===== |
- | !align="center"| '''Field''' | + | |
- | ! '''Description''' | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_0</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #0 | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_2</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #1 | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_3</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #2 | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_4</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #3 | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_5</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #4 | + | |
- | |- | + | |
- | |align="center"| ’<math>w\_o3\_6</math>’ | + | |
- | | weight for double ratio #2 MS(9) calculation, for wavelength #5 | + | |
- | |- | + | |
- | |align="center"| ’<math>o3tempcoef</math>’ | + | |
- | | ozone temperature coefficient for slit 0 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit1</math>’ | + | |
- | | ozone temperature coefficient for slit 1 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit2</math>’ | + | |
- | | ozone temperature coefficient for slit 2 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit3</math>’ | + | |
- | | ozone temperature coefficient for slit 3 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit4</math>’ | + | |
- | | ozone temperature coefficient for slit 4 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit5</math>’ | + | |
- | | ozone temperature coefficient for slit 5 | + | |
- | |- | + | |
- | |align="center"| ’<math>o3tempcoef\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 0 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit1\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 1 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit2\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 2 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit3\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 3 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit4\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 4 | + | |
- | |- | + | |
- | |align="center"| ’<math>oslit5\_unc</math>’ | + | |
- | | ozone temperature coefficient uncertainty for slit 5 | + | |
- | |- | + | |
- | |align="center"| ’<math>it</math>’ | + | |
- | | slit sampling time | + | |
- | |- | + | |
- | |align="center"| ’<math>deadtime</math>’ | + | |
- | | dead time (seconds) | + | |
- | |- | + | |
- | |align="center"| ’<math>deadtime\_unc</math>’ | + | |
- | | dead time uncertainty (seconds) | + | |
- | |- | + | |
- | |align="center"| ’<math>lf0\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 0 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf0</math>’ | + | |
- | | non-linearity filter coefficient of filter 0 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf1</math>’ | + | |
- | | non-linearity filter coefficient of filter 1 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf2</math>’ | + | |
- | | non-linearity filter coefficient of filter 2 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf3</math>’ | + | |
- | | non-linearity filter coefficient of filter 3 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf4</math>’ | + | |
- | | non-linearity filter coefficient of filter 4 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf5</math>’ | + | |
- | | non-linearity filter coefficient of filter 5 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf1\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 1 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf2\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 2 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf3\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 3 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf4\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 4 | + | |
- | |- | + | |
- | |align="center"| ’<math>lf5\_unc</math>’ | + | |
- | | non-linearity filter coefficient uncertainty of filter 5 | + | |
- | |- | + | |
- | |align="center"| ’<math>slope\_wavelength</math>’ | + | |
- | | percent variation of double ratio with wavelength | + | |
- | |- | + | |
- | |align="center"| ’<math>slope\_wavelength\_unc</math>’ | + | |
- | | percent variation uncertainty of double ratio with wavelength | + | |
- | |- | + | |
- | |align="center"| ’<math>o3o3rate</math>’ | + | |
- | | ozone on ozone ratio | + | |
- | |- | + | |
- | |align="center"| ’<math>u\_A1</math>’ | + | |
- | | ozone on ozone ratio uncertainty | + | |
- | |} | + | |
- | {| | + | The functions of this module are separated in one principal section (Product functions) and in three auxiliary sections (airmass uncertainty, Data Reduction uncertainty and auxiliary functions). |
- | !align="center"| '''Field''' | + | |
- | ! '''Description''' | + | |
- | |- | + | |
- | |align="center"| ’<math>latitude</math>’ | + | |
- | | site latitude in decimal degrees | + | |
- | |- | + | |
- | |align="center"| ’<math>longitude</math>’ | + | |
- | | site longitude in decimal degrees | + | |
- | |- | + | |
- | |align="center"| ’<math>be2</math>’ | + | |
- | | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #1 | + | |
- | |- | + | |
- | |align="center"| ’<math>be3</math>’ | + | |
- | | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #2 | + | |
- | |- | + | |
- | |align="center"| ’<math>be4</math>’ | + | |
- | | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #3 | + | |
- | |- | + | |
- | |align="center"| ’<math>be5</math>’ | + | |
- | | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #4 | + | |
- | |- | + | |
- | |align="center"| ’<math>be6</math>’ | + | |
- | | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #5 | + | |
- | |- | + | |
- | |align="center"| ’<math>etco3rate</math>’ | + | |
- | | ETC on ozone ratio | + | |
- | |- | + | |
- | |align="center"| ’<math>u\_etc</math>’ | + | |
- | | ETC uncertainty on ozone ratio | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_o3</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and <math>o3</math> | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_mu</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and ozone optical mass | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_B</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and weighted Rayleigh depth | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_m</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and Rayleigh optical mass | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_p</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_A\_etc</math>’ | + | |
- | | Cross correlation coefficient between <math>o3o3rate</math> and ETC | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_o3\_mu</math>’ | + | |
- | | Cross correlation coefficient between <math>o3</math> and ozone optical mass | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_o3\_B</math>’ | + | |
- | | Cross correlation coefficient between <math>o3</math> and weighted Rayleigh depth | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_o3\_m</math>’ | + | |
- | | Cross correlation coefficient between <math>o3</math> and Rayleigh | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_o3\_p</math>’ | + | |
- | | Cross correlation coefficient between <math>o3</math> and pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_o3\_etc</math>’ | + | |
- | | Cross correlation coefficient between <math>o3</math> and ETC | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_mu\_B</math>’ | + | |
- | | Cross correlation coefficient between ozone optical mass and weighted Rayleigh depth | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_mu\_m</math>’ | + | |
- | | Cross correlation coefficient between ozone optical mass and Rayleigh optical mass | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_mu\_p</math>’ | + | |
- | | Cross correlation coefficient between ozone optical mass and pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_mu\_etc</math>’ | + | |
- | | Cross correlation coefficient between ozone optical mass and ETC | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_B\_m</math>’ | + | |
- | | Cross correlation coefficient between weighted Rayleigh depth and Rayleigh optical mass | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_B\_p</math>’ | + | |
- | | Cross correlation coefficient between weighted Rayleigh depth and pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_B\_etc</math>’ | + | |
- | | Cross correlation coefficient between weighted Rayleigh depth and ETC | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_m\_p</math>’ | + | |
- | | Cross correlation coefficient between Rayleigh optical mass and pressure | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_m\_etc</math>’ | + | |
- | | Cross correlation coefficient between Rayleigh optical mass and ETC | + | |
- | |- | + | |
- | |align="center"| ’<math>rho\_p\_etc</math>’ | + | |
- | | Cross correlation coefficient between pressure and ETC | + | |
- | |} | + | |
- | = Functions = | + | ==== Products ==== |
- | The functions of this module are separated in one principal section (Product functions) and in three auxiliary sections (airmass uncertainty, Data Reduction uncertainty and auxiliary functions). | + | ^ Function ^ Short Description ^ |
+ | ^ airmass_unc_calc() | Calculates the air mass uncertainty (rayleigh and ozone) for brewer individual measurements. ^ | ||
+ | ^ instrumental_unc() | Applies instrumental corrections (darkcount, deadtime, temperature, filter non-linearity) and variations (wavelength) uncertainties to brewer individual measurements. ^ | ||
+ | ^ combined() | Calculates the combined uncertainty to brewer individual measurements. ^ | ||
- | == Products == | + | === airmass_unc_calc() === |
- | {| | + | This function calculates the air mass uncertainties for ozone and molecular atmosphere. To do this, it uses the functions //solar_ha_dec_et_unc()// and //sza_unc()// |
- | !align="center"| '''Function''' | + | |
- | ! '''Short Description''' | + | |
- | |- | + | |
- | |align="center"| <math>airmass\_unc\_calc()</math> | + | |
- | | Calculates the air mass uncertainty (rayleigh and ozone) for brewer individual measurements. | + | |
- | |- | + | |
- | |align="center"| <math>instrumental\_unc()</math> | + | |
- | | Applies instrumental corrections (darkcount, deadtime, temperature, filter non-linearity) and variations (wavelength) uncertainties to brewer individual measurements. | + | |
- | |- | + | |
- | |align="center"| <math>combined()</math> | + | |
- | | Calculates the combined uncertainty to brewer individual measurements. | + | |
- | |} | + | |
- | === <math>airmass\_unc\_calc()</math> === | + | **Example** |
- | This function calculates the air mass uncertainties for ozone and molecular atmosphere. To do this, it uses the functions <math>solar\_ha\_dec\_et\_unc()</math> and <math>sza\_unc()</math>.<br /> | + | import datetime |
- | '''Example'''<br /> | + | import brewer_unc |
+ | |||
+ | measure = {u'gmt':datetime.datetime(2016, 9, 21, 12, 58, 42)} | ||
+ | config = {'latitude': 28.3081, 'longitude': 16.4992} | ||
+ | |||
+ | out=brewer_unc.airmass_unc_calc( measure, config ) | ||
+ | print out['zenith_angle_uncertainty'] | ||
+ | print out['airmass_uncertainty'] | ||
+ | print out['airmass_rayleigh_uncertainty'] | ||
+ | The field //’gmt’// is used from //measure//, and the fields //’latitude’// and //’longitude’// are used from //config//. | ||
- | <pre>import datetime | + | This function returns the input measure dictionary, adding the following fields: |
- | import brewer_unc | + | |
- | measure = {u'gmt':datetime.datetime(2016, 9, 21, 12, 58, 42)} | + | * //zenith_angle_uncertainty//. This is calculated as the output of //sza_unc()// function. |
- | config = {'latitude': 28.3081, 'longitude': 16.4992} | + | * //airmass_uncertainty//. This is defined as the ozone air mass uncertainty, and is calculated as the output of //brewer_airmass_unc()//, using //zenith_angle//, //zenith_angle_uncertainty//, a height of 22 km and a height uncertainty of 2.24 km as input. |
+ | * //airmass_rayleigh_uncertainty//. This is defined as the Rayleigh air mass uncertainty, and is calculated as the output of //brewer_airmass_unc()//, using //zenith_angle//, //zenith_angle_uncertainty//, a height of 5 km and a height uncertainty of 0.2 km as input. | ||
- | out=brewer_unc.airmass_unc_calc( measure, config ) | + | === instrumental_unc() === |
- | print out['zenith_angle_uncertainty'] | + | |
- | print out['airmass_uncertainty'] | + | |
- | print out['airmass_rayleigh_uncertainty']</pre> | + | |
- | The field ’gmt’ is used from <math>measure</math>, and the fields ’latitude’ and ’longitude’ are used from <math>config</math>. | + | |
- | This function returns the input measure dictionary, adding the following fields: | + | This function gets the uncertainties of raw counts to light intensity conversion (//rawtocount()//), in counts per seconds, as well as for instrument effects (dark count, dead time, temperature sensitivity and filter non-linearity). To do this, it uses the functions //darkcount_unc()//, //deadtime_unc()//, //temp_unc()// and //filter_linearity_unc()//. We can also obtain the //MS9// variation uncertainty with the wavelength through the //wavelength_slope()// function. |
- | * <math>zenith\_angle\_uncertainty</math>. This is calculated as the output of <math>sza\_unc()</math> function. | + | **Example** |
- | * <math>airmass\_uncertainty</math>. This is defined as the ozone air mass uncertainty, and is calculated as the output of <math>brewer\_airmass\_unc()</math>, using <math>zenith\_angle</math>, <math>zenith\_angle\_uncertainty</math>, a height of 22 km and a height uncertainty of 2.24 km as input. | + | import datetime |
- | * <math>airmass\_rayleigh\_uncertainty</math>. This is defined as the Rayleigh air mass uncertainty, and is calculated as the output of <math>brewer\_airmass\_unc()</math>, using <math>zenith\_angle</math>, <math>zenith\_angle\_uncertainty</math>, a height of 5 km and a height uncertainty of 0.2 km as input. | + | import brewer_unc |
+ | |||
+ | measure = {u'raw_counts_w0': 254506,u'raw_counts_w1': 412550, u'raw_counts_w2': 612392, u'raw_counts_w3': 1328862,u'raw_counts_w4': 1757504,u'raw_counts_w5': 2109367,u'dark_count': 164,u'cycles': 20,u'temp': 24.0,u'nd_filter_position': 192} | ||
+ | config = {'w_o3_3': -1.0, 'oslit5': -0.11, 'it': 0.1147, 'oslit4': 0.02, 'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5, 'oslit1': 0.0,'oslit3': -0.1, 'oslit2': -0.14, 'deadtime': 2.9e-08, 'w_o3_0': 0.0, 'deadtime_unc': 1e-9, 'o3tempcoef': 0.0, 'o3tempcoef_unc': 0.0, 'oslit1_unc': 0.0, 'oslit2_unc': 0.00025, 'oslit3_unc': 0.00058, 'oslit4_unc': 0.00071, 'oslit5_unc': 0.001,'lf0':0.0,'lf1':-2.3,'lf2':-5.27,'lf3':-19.32,'lf4':-27.36,'lf5':1.1,'lf0_unc': 0.0, 'lf1_unc': 1.74,'lf2_unc': 1.94,'lf3_unc': 1.75,'lf4_unc': 1.95,'lf5_unc': 4.31, 'slope_wavelength': 0.0518, 'slope_wavelength_unc': 0.25} | ||
+ | |||
+ | out = instrumental_unc( measure, config ) | ||
+ | print("unc_measurement: "+str(out['measure_unc'])) | ||
- | === <math>instrumental\_unc()</math> === | + | The fields ’//nd_filter_position//’, ’//cycles//’, ’//raw_counts_w0//’, ’//dark_count//’, ’//raw_counts_w1//’, ’//raw_counts_w2//’, //’raw_counts_w3//’, ’//raw_counts_w4//’, ’//raw_counts_w5//’ and ’//temp//’ are used from measure, and the fields ’//deadtime//’, ’//deadtime_unc//’, ’//it//’, ’//o3tempcoef//’, ’//oslit1//’, ’//oslit2//’, ’//oslit3//’, ’//oslit4//’, ’//oslit//’ ’//o3tempcoef_unc//’, ’//oslit1_unc//’, ’//oslit2_unc//’, ’//oslit3_unc//’, ’//oslit4_unc//’, ’//oslit5_unc//’, ’//lf0//’, ’//lf1//’, ’//lf2//’, ’//lf3//’,’//lf4//’,’//lf5//’, ’//lf0_unc//’, ’//lf1_unc//’, ’//lf2_unc//’, ’//lf3_unc//’, ’//lf4_unc//’,’//lf5_unc//’, ’//w_o3_0//’, ’//w_o3_2//’, ’//w_o3_3//’, ’//w_o3_4//’, ’//w_o3_5//’, ’//w_o3_6//’, ’//slope_wavelength//’ and ’//slope_wavelength_unc//’ are used from config. |
- | This function gets the uncertainties of raw counts to light intensity conversion (<math>rawtocount()</math>), in counts per seconds, as well as for instrument effects (dark count, dead time, temperature sensitivity and filter non-linearity). To do this, it uses the functions <math>darkcount\_unc()</math>, <math>deadtime\_unc()</math>, <math>temp\_unc()</math> and <math>filter\_linearity\_unc()</math>. We can also obtain the <math>MS9</math> variation uncertainty with the wavelength through the <math>wavelength\_slope()</math> function.<br /> | ||
- | '''Example'''<br /> | ||
+ | This function returns the input measure dictionary, adding the following fields: | ||
- | <pre>import datetime | + | * ’//nd_filter//’. This field is calculated as the integer value of: |
- | import brewer_unc | + | |
- | measure = {u'raw_counts_w0': 254506,u'raw_counts_w1': 412550, u'raw_counts_w2': 612392, u'raw_counts_w3': 1328862,u'raw_counts_w4': 1757504,u'raw_counts_w5': 2109367,u'dark_count': 164,u'cycles': 20,u'temp': 24.0,u'nd_filter_position': 192} | + | $nd\_filter = nd\_filter\_position/64$ |
- | config = {'w_o3_3': -1.0, 'oslit5': -0.11, 'it': 0.1147, 'oslit4': 0.02, 'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5, 'oslit1': 0.0,'oslit3': -0.1, 'oslit2': -0.14, 'deadtime': 2.9e-08, 'w_o3_0': 0.0, 'deadtime_unc': 1e-9, 'o3tempcoef': 0.0, 'o3tempcoef_unc': 0.0, 'oslit1_unc': 0.0, 'oslit2_unc': 0.00025, 'oslit3_unc': 0.00058, 'oslit4_unc': 0.00071, 'oslit5_unc': 0.001,'lf0':0.0,'lf1':-2.3,'lf2':-5.27,'lf3':-19.32,'lf4':-27.36,'lf5':1.1,'lf0_unc': 0.0, 'lf1_unc': 1.74,'lf2_unc': 1.94,'lf3_unc': 1.75,'lf4_unc': 1.95,'lf5_unc': 4.31, 'slope_wavelength': 0.0518, 'slope_wavelength_unc': 0.25} | + | |
- | out = instrumental_unc( measure, config ) | + | * ’//single_ratio1//’, ’//single_ratio2//’, ’//single_ratio3//’ and ’//single_ratio4//’. These fields are calculates as: |
- | print("unc_measurement : "+str(out['measure_unc']))</pre> | + | |
- | The fields ’<math>nd\_filter\_position</math>’, ’<math>cycles</math>’, ’<math>raw\_counts\_w0</math>’, ’<math>dark\_count</math>’, ’<math>raw\_counts\_w1</math>’, ’<math>raw\_counts\_w2</math>’, ’<math>raw\_counts\_w3</math>’, ’<math>raw\_counts\_w4</math>’, ’<math>raw\_counts\_w5</math>’ and ’<math>temp</math>’ are used from measure, and the fields ’<math>deadtime</math>’, ’<math>deadtime\_unc</math>’, ’<math>it</math>’, ’<math>o3tempcoef</math>’, ’<math>oslit1</math>’, ’<math>oslit2</math>’, ’<math>oslit3</math>’, ’<math>oslit4</math>’, ’<math>oslit5</math>’, ’<math>o3tempcoef\_unc</math>’, ’<math>oslit1_unc</math>’, ’<math>oslit2_unc</math>’, ’<math>oslit3_unc</math>’, ’<math>oslit4_unc</math>’, ’<math>oslit5_unc</math>’, ’<math>lf0</math>’, ’<math>lf1</math>’, ’<math>lf2</math>’, ’<math>lf3</math>’, ’<math>lf4</math>’, ’<math>lf5</math>’, ’<math>lf0\_unc</math>’, ’<math>lf1\_unc</math>’, ’<math>lf2\_unc</math>’, ’<math>lf3\_unc</math>’, ’<math>lf4\_unc</math>’, ’<math>lf5\_unc</math>’, ’<math>w\_o3\_0</math>’, ’<math>w\_o3\_2</math>’, ’<math>w\_o3\_3</math>’, ’<math>w\_o3\_4</math>’, ’<math>w\_o3\_5</math>’, ’<math>w\_o3\_6</math>’, ’<math>slope\_wavelength</math>’ and ’<math>slope\_wavelength\_unc</math>’ are used from config. | + | |
- | This function returns the input measure dictionary, adding the following fields: | + | * $single\_ratio1 = f_{4} - f_{1}$ |
+ | * $single\_ratio2 = f_{4} - f_{2}$ | ||
+ | * $single\_ratio3 = f_{4} - f_{3}$ | ||
+ | * $single\_ratio4 = f_{5} - f_{4}$ | ||
+ | |||
+ | * ’//double_ratio2//’ and ’//double_ratio2_unc//’. These fields are calculated as: | ||
+ | |||
+ | * $double\_ratio2 = \sum_{i} f_{i} * w\_o3_{i+1}$ | ||
+ | * $double\_ratio2\_unc = double\_ratio2 * \sum_{i} \frac{u_{fi}}{f_{i}} * w\_o3_{i+1}$ | ||
+ | |||
+ | * '//measure//' and '//measure\_unc//'. These fields are obtained as: | ||
- | * ’<math>nd\_filter</math>’. This field is calculated as the integer value of: <math>nd\_filter = nd\_filter\_position/64</math> | + | * $measure = double\_ratio2 + LF[p]$ |
- | * ’<math>single\_ratio1</math>’, ’<math>single\_ratio2</math>’, ’<math>single\_ratio3</math>’ and ’<math>single\_ratio4</math>’. These fields are calculates as: <math>\begin{aligned} | + | * $measure\_unc = \sqrt{\left(1+\frac{slope\_wavelength}{100}\right)^{2}*double\_ratio2\_unc^{2} + \left(\frac{measure}{100}\right)^{2}*slope\_wavelength\_unc^{2}}$ |
- | single\_ratio1 = f_4 - f_1 \\ | + | |
- | single\_ratio2 = f_4 - f_2 \\ | + | |
- | single\_ratio3 = f_4 - f_3 \\ | + | |
- | single\_ratio4 = f_5 - f_4 | + | |
- | \end{aligned}</math> | + | |
- | * ’<math>double\_ratio2</math>’ and ’<math>double\_ratio2\_unc</math>’. These fields are calculated as: <math>\begin{aligned} | + | |
- | double\_ratio2 = \sum_i f_i * w\_o3_{i+1} \\ | + | |
- | double\_ratio2\_unc = double\_ratio2 * \sum_i \frac{u_{fi}}{f_{i}} * w\_o3_{i+1} | + | |
- | \end{aligned}</math> | + | |
- | * <math>measure</math> and <math>measure\_unc</math>. These fields are obtained as: <math>\begin{aligned} | + | |
- | measure = double\_ratio2 + LF[p] \\ | + | |
- | measure\_unc = \sqrt{\left(1+\frac{slope\_wavelength}{100}\right)^{2}*double\_ratio2\_unc^{2} + \left(\frac{measure}{100}\right)^{2}*slope\_wavelength\_unc^{2}} | + | |
- | \end{aligned}</math> | + | |
- | === <math>combined()</math> === | + | === combined() === |
- | This function obtains the correct value of the TOC uncertainty budget of the Brewer spectrophotometers through the function <math>combined\_uncertainty()</math>.<br /> | + | This function obtains the correct value of the TOC uncertainty budget of the Brewer spectrophotometers through the function //combined_uncertainty()//. |
- | '''Example'''<br /> | + | |
+ | **Example** | ||
- | <pre>import datetime | + | import datetime |
- | import brewer_unc | + | import brewer_unc |
+ | |||
+ | measure = {u'measure_unc': 6.97,u'airmass': 1.13,u'airmass_uncertainty': 0.00011,u'airmass_rayleigh': 1.13,u'airmass_rayleigh_uncertainty': 1.12e-5,u'o3': 280.67,u'pre': 770, u'u_pre': 15} | ||
+ | config = {'o3o3rate': 0.342,'B': 1.0, 'u_B': 0.029,'u_A1': 0.0094, 'u_etc': 9.14,'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5,'w_o3_3': -1.0,'rho_A_o3': -0.0036, 'rho_A_mu': -0.97, 'rho_A_B': -0.17, 'rho_A_m': -0.15, 'rho_A_p': -0.000225, 'rho_A_etc': 0.0012, 'rho_o3_mu': -0.00036, 'rho_o3_B': -5.7e-05, 'rho_o3_m': -4.6e-05, 'rho_o3_p': -6.8e-08, 'rho_o3_etc': 4.2e-07, 'rho_mu_B': -0.011, 'rho_mu_m': -0.011, 'rho_mu_p': -9.11e-06, 'rho_mu_etc': 7.5e-05, 'rho_B_m': -0.0012, 'rho_B_p': -2e-06, 'rho_B_etc': 1.24e-05, 'rho_m_p': -2.08e-06, 'rho_m_etc': 1.3e-05, 'rho_p_etc': 1.9e-08} | ||
+ | |||
+ | out = combined( measure, config ) | ||
+ | print("u_o3: " + str(out['u_o3'])) | ||
+ | print("o3 : " +str(out['o3'])) | ||
- | measure = {u'measure_unc': 6.97,u'airmass': 1.13,u'airmass_uncertainty': 0.00011,u'airmass_rayleigh': 1.13,u'airmass_rayleigh_uncertainty': 1.12e-5,u'o3': 280.67,u'pre': 770, u'u_pre': 15} | + | The fields ’//measure\_unc//’, ’//airmass//’, ’//airmass_uncertainty//’, ’//airmass_rayleigh//’, ’//airmass_rayleigh_uncertainty//’, ’//o3//’, ’//pre//’ and ’//u_pre//’ are used from measure, and ’//o3o3rate//’, ’//B//’, ’//u_B//’, '//u_A1//’, ’//u_etc//’, ’//w_o3_0//’, ’//w_o3_2//’, ’//w_o3_3//’, ’//w_o3_4//’, ’//w_o3_5//’, ’//w_o3_6//’,’//rho_A_o3//’, ’//rho_A_mu//’, ’//rho_A_B//’, ’//rho_A_m//’, ’//rho_A_p//’, ’//rho_A_etc//’, ’//rho_o3_mu//’, ’//rho_o3_B//’, ’//rho_o3_m//’, ’//rho_o3_p//’, ’//rho_o3_etc//’, ’//rho_mu_B//’, ’//rho_mu_m//’, ’//rho_mu_p//’, ’//rho_mu_etc//’, ’//rho_B_m//’, ’//rho_B_p//>’, ’//rho_B_etc//>’, ’//rho_m_p//’, ’//rho_m_etc//’, ’//rho_p_etc//’ are used from config. |
- | config = {'o3o3rate': 0.342,'B': 1.0, 'u_B': 0.029,'u_A1': 0.0094, 'u_etc': 9.14,'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5,'w_o3_3': -1.0,'rho_A_o3': -0.0036, 'rho_A_mu': -0.97, 'rho_A_B': -0.17, 'rho_A_m': -0.15, 'rho_A_p': -0.000225, 'rho_A_etc': 0.0012, 'rho_o3_mu': -0.00036, 'rho_o3_B': -5.7e-05, 'rho_o3_m': -4.6e-05, 'rho_o3_p': -6.8e-08, 'rho_o3_etc': 4.2e-07, 'rho_mu_B': -0.011, 'rho_mu_m': -0.011, 'rho_mu_p': -9.11e-06, 'rho_mu_etc': 7.5e-05, 'rho_B_m': -0.0012, 'rho_B_p': -2e-06, 'rho_B_etc': 1.24e-05, 'rho_m_p': -2.08e-06, 'rho_m_etc': 1.3e-05, 'rho_p_etc': 1.9e-08} | + | |
- | out = combined( measure, config ) | ||
- | print("u_o3: " + str(out['u_o3'])) | ||
- | print("o3 : "+str(out['o3']))</pre> | ||
- | The fields ’<math>measure\_unc</math>’, ’<math>airmass</math>’, ’<math>airmass\_uncertainty</math>’, ’<math>airmass\_rayleigh</math>’, ’<math>airmass\_rayleigh\_uncertainty</math>’, ’<math>o3</math>’, ’<math>pre</math>’ and ’<math>u\_pre</math>’ are used from measure, and ’<math>o3o3rate</math>’, ’<math>B</math>’, ’<math>u\_B</math>’, <math>u\_A1</math>’, ’<math>u\_etc</math>’, ’<math>w\_o3\_2</math>’, ’<math>w\_o3\_6</math>’, ’<math>w\_o3\_5</math>’, ’<math>w\_o3\_4</math>’,’<math>w\_o3\_3</math>’,’<math>rho\_A\_o3</math>’, ’<math>rho\_A\_mu</math>’, ’<math>rho\_A\_B</math>’, ’<math>rho\_A\_m</math>’, ’<math>rho\_A\_p</math>’, ’<math>rho\_A\_etc</math>’, ’<math>rho\_o3\_mu</math>’, ’<math>rho\_o3\_B</math>’, ’<math>rho\_o3\_m</math>’, ’<math>rho\_o3\_p</math>’, ’<math>rho\_o3\_etc</math>’, ’<math>rho\_mu\_B</math>’, ’<math>rho\_mu\_m</math>’, ’<math>rho\_mu\_p</math>’, ’<math>rho\_mu\_etc</math>’, ’<math>rho\_B\_m</math>’, ’<math>rho\_B\_p</math>’, ’<math>rho\_B\_etc</math>’, ’<math>rho\_m\_p</math>’, ’<math>rho\_m\_etc</math>’, ’<math>rho\_p\_etc</math>’ are used from config.<br /> | ||
This function returns the input measure dictionary, adding the following fields: | This function returns the input measure dictionary, adding the following fields: | ||
- | * ’<math>u\_o3</math>’ which is calculated with the combined uncertainty equations. | + | * ’//u_o3//’ which is calculated with the combined uncertainty equations. |
- | == Astronomical == | + | ==== Astronomical ==== |
- | {| | + | ^ Function ^ Short Description ^ |
- | !align="center"| '''Function''' | + | ^ solar_ha_dec_et_unc() | Returns the solar hour angle, declination and equation of time uncertainties. ^ |
- | ! '''Short Description''' | + | ^ sza_unc() | Returns the solar zenith angle uncertainty. ^ |
- | |- | + | |
- | |align="center"| <math>solar\_ha\_dec\_et\_unc()</math> | + | |
- | | Returns the solar hour angle, declination and equation of time uncertainties. | + | |
- | |- | + | |
- | |align="center"| <math>sza\_unc()</math> | + | |
- | | Returns the solar zenith angle uncertainty. | + | |
- | |} | + | |
- | === <math>solar\_ha\_dec\_et\_unc()</math> === | + | === solar_ha_dec_et_unc() === |
- | This function returns the solar hour angle, declination and equation of time uncertainties for a specific day at a specific location. In this case only geographic longitude is required to specify the location.<br /> | + | This function returns the solar hour angle, declination and equation of time uncertainties for a specific day at a specific location. In this case only geographic longitude is required to specify the location. |
- | '''Example''' | + | |
+ | **Example** | ||
+ | |||
+ | brewer_unc.solar_ha_dec_et_unc( datet, lon ) | ||
- | <pre> | ||
- | brewer_unc.solar_ha_dec_et_unc( datet, lon )</pre> | ||
The input parameter datet is a python datetime object. lon is a float that represents the geographic longitude in degrees. | The input parameter datet is a python datetime object. lon is a float that represents the geographic longitude in degrees. | ||
- | The <math>solar\_ha\_dec\_et\_unc()</math> function returns a tuple with tree elements: the square uncertainty of the hour angle in radians, square uncertainty of the solar declination in radians and the square uncertainty of the equation of time in minutes. | + | The //solar_ha_dec_et_unc()// function returns a tuple with tree elements: the quadratic uncertainty of the hour angle in radians, quadratic uncertainty of the solar declination in radians and the quadratic uncertainty of the equation of time in minutes. |
+ | |||
+ | === sza_unc() === | ||
+ | |||
+ | This function returns the solar zenith angle uncertainty for a specific day at a specific location. | ||
- | === <math>sza\_unc()</math> === | + | **Example** |
- | This function returns the solar zenith angle uncertainty for a specific day at a specific location.<br /> | + | brewer_unc.sza_unc( datet, lat, lon ) |
- | '''Example''' | + | |
- | <pre> | ||
- | brewer_unc.sza_unc( datet, lat, lon )</pre> | ||
The input parameter datet is a python datetime object. lat and lon are floats that represents the geographic latitude and longitude in degrees respectively. | The input parameter datet is a python datetime object. lat and lon are floats that represents the geographic latitude and longitude in degrees respectively. | ||
- | The <math>sza\_unc()</math> function returns a float with the value of the solar zenith angle uncertainty in degrees. | + | The //sza_unc()// function returns a float with the value of the solar zenith angle uncertainty in degrees. |
- | == Data Reduction == | + | ==== Data Reduction ==== |
- | {| | + | ^ Function ^ Short Description ^ |
- | !align="center"| '''Function''' | + | ^ rawtocount() | Returns a list with the raw-to-count conversion uncertainty. ^ |
- | ! '''Short Description''' | + | ^ darkcount_unc() | Returns a list with the dark count correction uncertainty. ^ |
- | |- | + | ^ deadtime_unc() | Returns a list with the dead time correction uncertainty. ^ |
- | |align="center"| <math>rawtocount()</math> | + | ^ temp_unc() | Returns a list with the temperature correction uncertainty. ^ |
- | | Returns a list with the raw-to-count conversion uncertainty | + | ^ filter_linearity_unc() | Returns a list with the filter linearity correction uncertainty. ^ |
- | |- | + | ^ wavelength_slope() | Returns a list with the uncertainty of the double ratio variation with wavelength. ^ |
- | |align="center"| <math>darkcount\_unc()</math> | + | |
- | | Returns a list with the dark count correction uncertainty. | + | |
- | |- | + | |
- | |align="center"| <math>deadtime\_unc()</math> | + | |
- | | Returns a list with the dead time correction uncertainty. | + | |
- | |- | + | |
- | |align="center"| <math>temp\_unc()</math> | + | |
- | | Returns a list with the temperature correction uncertainty. | + | |
- | |- | + | |
- | |align="center"| <math>filter\_linearity\_unc()</math> | + | |
- | | Returns a list with the filter linearity correction uncertainty. | + | |
- | |- | + | |
- | |align="center"| <math>wavelength\_slope()</math> | + | |
- | | Returns a list with the uncertainty of the double ratio variation with wavelength. | + | |
- | |} | + | |
- | === <math>rawtocount()</math> === | + | === rawtocount() === |
This function gets the uncertainty due to the conversion the raw-counts (counts per integration time) recorded by the spectrophotometer in count-rates (counts per second): | This function gets the uncertainty due to the conversion the raw-counts (counts per integration time) recorded by the spectrophotometer in count-rates (counts per second): | ||
- | <math>u_{out}^{2}[i] = \frac{2f[i]}{cycles*it}</math> | + | $u_{out}^{2}[i] = \frac{2f[i]}{cycles*it}$ |
- | '''Example''' | + | **Example** |
- | <pre> | + | brewer_unc.rawtocount( raw, dark_raw, cycles, it ) |
- | brewer_unc.rawtocount( raw, dark_raw, cycles, it )</pre> | + | |
- | The input parameter <math>raw</math> is a list of five integers with the raw measurements. <math>dark\_raw</math> is a float with the raw dark value. <math>cycles</math> is an integer with the number of cycles for each measurement. <math>it</math> is a float with the slit sampling time. | + | The input parameter //raw// is a list of five integers with the raw measurements. //dark_raw// is a float with the raw dark value. //cycles// is an integer with the number of cycles for each measurement. //it// is a float with the slit sampling time. |
- | The <math>rawtocount()</math> function returns a list with the uncertainty due to the conversion from raw-counts to count-rates, in counts per second. | + | The //rawtocount()// function returns a list with the uncertainty due to the conversion from raw-counts to count-rates, in counts per second. |
- | === <math>darkcount\_unc()</math> === | + | === darkcount_unc() === |
This function gets the dark count correction uncertainty: | This function gets the dark count correction uncertainty: | ||
- | <math>u_{out}^{2}[i] = u^{2}[i] + u^{2}[dark]</math> | + | $u_{out}^{2}[i] = u^{2}[i] + u^{2}[dark]$ |
- | '''Example''' | + | **Example** |
- | <pre> | + | brewer_unc.darkcount_unc( f, dark_count, u2_f, cycles, it ) |
- | brewer_unc.darkcount_unc( f, dark_count, u2_f, cycles, it )</pre> | + | |
- | The input parameter <math>f</math> is a list of five wavelength measurements. <math>dark_count</math> is a float with the dark count value. <math>u2_f</math> is a float with the square uncertainty of the raw to count conversion. <math>cycles</math> is an integer with the number of cycles for each measurement. <math>it</math> is a float with the slit sampling time. | + | The input parameter //f// is a list of five wavelength measurements. //dark_count// is a float with the dark count value. //u2_f// is a float with the quadratic uncertainty of the raw to count conversion. //cycles// is an integer with the number of cycles for each measurement. //it// is a float with the slit sampling time. |
- | The <math>darkcount\_unc()</math> function returns a list with the dark count corrected uncertainties in counts per second. | + | The //darkcount_unc()// function returns a list with the dark count corrected uncertainties in counts per second. |
- | === <math>deadtime\_unc()</math> === | + | === deadtime_unc() === |
This function gets the dead time correction uncertainty. The method iterates 9 times the equation: | This function gets the dead time correction uncertainty. The method iterates 9 times the equation: | ||
- | <math>u_{out}^{2}[i] = \left(\frac{\exp(t1*f[i])}{1-t1*f[i]}\right)^{2}*u^{2}[i] + f^{4}[i]*u_{t1}^{2}</math> | + | $u_{out}^{2}[i] = \left(\frac{\exp(t1*f[i])}{1-t1*f[i]}\right)^{2}*u^{2}[i] + f^{4}[i]*u_{t1}^{2}$ |
The deadtime-compensated uncertainty are normalized by computing the base ten logarithm of e, then scaled by 10000, thus allowing integer arithmetic. | The deadtime-compensated uncertainty are normalized by computing the base ten logarithm of e, then scaled by 10000, thus allowing integer arithmetic. | ||
- | <math>u_{out} = \frac{10^{4}u[i]}{f[i]*\log(10)}</math> | + | $u_{out} = \frac{10^{4}u[i]}{f[i]*\log(10)}$ |
- | '''Example''' | + | **Example** |
- | <pre> | + | brewer_unc.deadtime_unc( f, u2_f, t1, u_t1, norm=1 ) |
- | brewer_unc.deadtime_unc( f, u2_f, t1, u_t1, norm=1 )</pre> | + | |
- | The input parameter <math>f</math> is a list of five floats with the measurements. <math>u2\_f</math> is a list of five floats with the uncertainties. <math>t1</math> is a float with the deadtime of the photon-counting system, <math>u\_t1</math> is a float with the dead time uncertainty of the photon-counting system. | + | The input parameter //f// is a list of five floats with the measurements. //u2_f// is a list of five floats with the uncertainties. //t1// is a float with the deadtime of the photon-counting system, //u_t1// is a float with the dead time uncertainty of the photon-counting system. |
- | The <math>deadtime\_unc()</math> function returns a list with the dead time corrected uncertainty in counts per second. | + | The //deadtime_unc()// function returns a list with the dead time corrected uncertainty in counts per second. |
- | === <math>temp\_unc()</math> === | + | === temp_unc() === |
This function gets the temperature-dependent compensation uncertainty of the spectrometer: | This function gets the temperature-dependent compensation uncertainty of the spectrometer: | ||
- | <math>u_{out}^{2} = u^{2}[i] + tc^{2}[i]*u_{t}^{2} + t^{2}*u_{tc}^{2}[i]</math> | + | $u_{out}^{2} = u^{2}[i] + tc^{2}[i]*u_{t}^{2} + t^{2}*u_{tc}^{2}[i]$ |
- | where <math>u_{t}</math> is the temperature uncertainty which is <math>1/sqrt(3)</math> usually. | + | where $u_{t}$ is the temperature uncertainty which usially is $1/sqrt(3)$. |
- | '''Example''' | + | **Example** |
- | <pre> | + | brewer_unc.temp_unc( u2_f, t, tc, u_tc ) |
- | brewer_unc.temp_unc( u2_f, t, tc, u_tc )</pre> | + | |
- | The input parameter <math>u2\_f</math> is a list of five floats with the uncertainties. <math>tc</math> is list of five floats with the temperature coefficients. <math>t</math> is a float with the temperature of the system in Celsius degrees. <math>u\_tc</math> is list of five floats with the temperature coefficient uncerainties. | + | The input parameter //u2_f// is a list of five floats with the uncertainties. //tc// is list of five floats with the temperature coefficients. //t// is a float with the temperature of the system in Celsius degrees. //u_tc// is list of five floats with the temperature coefficient uncerainties. |
- | The <math>temp\_unc()</math> function returns a list with the temperature corrected uncertainties in counts per second. | + | The //temp_unc()// function returns a list with the temperature corrected uncertainties in counts per second. |
- | === <math>filter\_linearity\_unc()</math> === | + | === filter_linearity_unc() === |
This function gets the non-linearity of the neutral-density filters compensation uncertainty used to adjust the light level entering the spectrometer: | This function gets the non-linearity of the neutral-density filters compensation uncertainty used to adjust the light level entering the spectrometer: | ||
- | <math>u_{out}^{2} = u^{2}[i] + u^{2}_{lf}[p]</math> | + | $u_{out}^{2} = u^{2}[i] + u^{2}_{lf}[p]$ |
- | This function is typically applied after the double ratio.<br /> | + | This function is typically applied after the double ratio. |
- | '''Example''' | + | |
- | <pre> | + | **Example** |
- | brewer_unc.filter_linearity_unc( f, u_f, lf, u_lf, fp )</pre> | + | |
- | The input parameter <math>f</math> is a list of five floats with the measurements. <math>u\_f</math> is a list of five floats with the uncertainties. <math>lf</math> is list of six floats with the non-linearity coefficient values of the neutral-density filters. <math>u\_lf</math> is list of six floats with the non-linearity coefficient uncertainties of the neutral-density filters. <math>fp</math> is an integer with the filter position. | + | |
- | The <math>filter_linearity_unc()</math> function returns a list with the non-linearity corrected uncertainties. | + | brewer_unc.filter_linearity_unc( f, u_f, lf, u_lf, fp ) |
+ | |||
+ | The input parameter //f// is a list of five floats with the measurements. //u_f// is a list of five floats with the uncertainties. //lf// is list of six floats with the non-linearity coefficient values of the neutral-density filters. //u_lf// is list of six floats with the non-linearity coefficient uncertainties of the neutral-density filters. //fp// is an integer with the filter position. | ||
- | === <math>wavelength\_slope()</math> === | + | The //filter_linearity_unc()// function returns a list with the non-linearity corrected uncertainties. |
+ | |||
+ | === wavelength_slope() === | ||
This function gets the uncertainty of the double ratio variation with the wavelength: | This function gets the uncertainty of the double ratio variation with the wavelength: | ||
- | <math>u_{out}^{2} = \left(1+\frac{k_{wv}}{100}\right)^{2}*u_{in}^{2} + \left(\frac{DR}{100}\right)^{2}*u_{wv}^{2}</math> | + | $u_{out}^{2} = \left(1+\frac{k_{wv}}{100}\right)^{2}*u_{in}^{2} + \left(\frac{DR}{100}\right)^{2}*u_{wv}^{2}$ |
- | '''Example''' | + | **Example** |
- | <pre> | + | brewer_unc.wavelength_slope( f, u_f, kwv, u_kwv ) |
- | brewer_unc.wavelength_slope( f, u_f, kwv, u_kwv )</pre> | + | |
- | The input parameter <math>f</math> is a list of floats with the double ratio. <math>u\_f</math> is a list of floats with the double ratio uncertainties. <math>kwv</math> is a float with the double ratio variation coefficients with wavelength. <math>u\_kwv</math> is a float with the double ratio variation coefficient uncertainties with wavelength. | + | The input parameter //f// is a list of floats with the double ratio. //u_f// is a list of floats with the double ratio uncertainties. //kwv// is a float with the double ratio variation coefficients with wavelength. //u_kwv// is a float with the double ratio variation coefficient uncertainties with wavelength. |
- | The <math>wavelength\_slope()</math> function returns a list with the double ratio variation with wavelength uncertainties. | + | The //wavelength_slope()// function returns a list with the double ratio variation with wavelength uncertainties. |
- | == Auxiliary Functions == | + | ==== Auxiliary Functions ==== |
- | {| | + | ^ Function ^ Short Description ^ |
- | !align="center"| '''Function''' | + | ^ rel_unc() | Returns a list with the relative uncertainties. ^ |
- | ! '''Short Description''' | + | ^ wsum_unc() | Returns the weighted sum from all uncertainties on a list. ^ |
- | |- | + | ^ wsum() | Returns the weighted sum from all measurements on a list. ^ |
- | |align="center"| <math>rel\_unc()</math> | + | ^ B_unc() | Returns the Rayleigh scattering uncertainty. ^ |
- | | Returns a list with the relative uncertainties. | + | |
- | |- | + | |
- | |align="center"| <math>wsum\_unc()</math> | + | |
- | | Returns the weighted sum from all uncertainties on a list. | + | |
- | |- | + | |
- | |align="center"| <math>wsum()</math> | + | |
- | | Returns the weighted sum from all measurements on a list. | + | |
- | |- | + | |
- | |align="center"| <math>B\_unc()</math> | + | |
- | | Returns the Rayleigh scattering uncertainty. | + | |
- | |} | + | |
- | === <math>rel\_unc()</math> === | + | === rel_unc() === |
This function computes the relative uncertainty of a list of measurements or parameters as following: | This function computes the relative uncertainty of a list of measurements or parameters as following: | ||
- | <math>u\_rel = \frac{u\_f}{f}</math> | + | $u\_rel = \frac{u\_f}{f}$ |
- | '''Example''' | + | **Example** |
- | <pre>import brewer_unc | + | import brewer_unc |
+ | |||
+ | f=[1,2] | ||
+ | u_f=[0.1,0.5] | ||
+ | |||
+ | brewer_unc.rel_unc( f, u_f ) | ||
+ | |||
+ | The input parameter //f// is a list of floats. //u_f// is list of of floats of the same length than //f//. | ||
- | f=[1,2] | + | The //rel_unc()// function returns a float which is the relative uncertainty of //f//. |
- | u_f=[0.1,0.5] | + | |
- | brewer_unc.rel_unc( f, u_f )</pre> | + | === wsum() === |
- | The input parameter <math>f</math> is a list of floats. <math>u\_f</math> is list of of floats of the same length than <math>f</math>. | + | |
- | + | ||
- | The <math>rel\_unc()</math> function returns a float which is the relative uncertainty of <math>f</math>. | + | |
- | + | ||
- | === <math>wsum()</math> === | + | |
This function computes the sum of products over two lists. Both input lists should have the same length: | This function computes the sum of products over two lists. Both input lists should have the same length: | ||
- | <math>wsum = \sum_i f[i]*w[i]</math> | + | $wsum = \sum_i f[i]*w[i]$ |
- | '''Example''' | + | **Example** |
- | <pre>import brewer | + | import brewer |
- | f=[1,2] | + | f=[1,2] |
- | w=[2,3] | + | w=[2,3] |
- | brewer.wsum( f, w )</pre> | + | brewer.wsum( f, w ) |
- | The input parameter <math>f</math> is a list of floats. <math>w</math> is list of of floats of the same length than <math>f</math>. | + | |
+ | The input parameter //f// is a list of floats. //w// is list of of floats of the same length than //f//. | ||
- | The <math>wsum()</math> function returns a float with the weighted sum value. | + | The //wsum()// function returns a float with the weighted sum value. |
- | === <math>wsum\_unc()</math> === | + | === wsum_unc() === |
This function computes the sum of square products over two lists. Both input lists should have the same length: | This function computes the sum of square products over two lists. Both input lists should have the same length: | ||
- | <math>wsum\_unc = \sum_i (f[i]*w[i])^2</math> | + | $wsum\_unc = \sum_i (f[i]*w[i])^2$ |
- | '''Example''' | + | **Example** |
- | <pre>import brewer | + | import brewer |
- | f=[1,2] | + | f=[1,2] |
- | w=[0.1,0.5] | + | w=[0.1,0.5] |
- | brewer.wsum_unc( f, w )</pre> | + | brewer.wsum_unc( f, w ) |
- | The input parameter <math>f</math> is a list of floats. <math>w</math> is list of of floats of the same length than <math>f</math>. | + | |
+ | The input parameter //f// is a list of floats. //w// is list of of floats of the same length than //f//. | ||
- | The <math>wsum()</math> function returns a float with the weighted square sum value. | + | The //wsum()// function returns a float with the weighted square sum value. |
- | === <math>B\_unc()</math> === | + | === B_unc() === |
This function computes the uncertainty of the Rayleigh scattering coefficients. | This function computes the uncertainty of the Rayleigh scattering coefficients. | ||
- | '''Example''' | + | **Example** |
- | <pre>import brewer | + | import brewer |
+ | |||
+ | config = {'w_o3_3': -1.0,'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5,'be3': 4620, 'be6': 4040, 'be4': 4410, 'be5': 4220, 'be2': 4870 } | ||
+ | unc = 0.01 | ||
+ | |||
+ | out = brewer.wsum_unc( config, unc ) | ||
+ | print("u_B: " + str(out['u_B'])) | ||
+ | print("B : " + str(out['B'])) | ||
- | config = {'w_o3_3': -1.0,'w_o3_2': 0.0, 'w_o3_6': -1.7, 'w_o3_5': 2.2, 'w_o3_4': 0.5,'be3': 4620, 'be6': 4040, 'be4': 4410, 'be5': 4220, 'be2': 4870, } | + | The fields ’//be2//’, ’//be3//’, ’//be4//', ’//be5//’, ’//be6//’, ’//w_o3_2//’, ’//w_o3_3//’, ’//w_o3_4//’, ’//w_o3_5//’, ’//w_o3_6//’ and ’//w_o3_0//’ are used from config. |
- | unc = 0.01 | + | |
- | + | ||
- | out = brewer.wsum_unc( config, unc ) | + | |
- | print("u_B: " + str(out['u_B'])) | + | |
- | print("B : "+str(out['B']))</pre> | + | |
- | The fields ’<math>be2</math>’, ’<math>be3</math>’, ’<math>be4</math>’, ’<math>be5</math>’, ’<math>be6</math>’, ’<math>w\_o3\_2</math>’, ’<math>w\_o3\_3</math>’, ’<math>w\_o3\_4</math>’, ’<math>w\_o3\_5</math>’, ’<math>w\_o3\_6</math>’ and ’<math>w\_o3\_0</math>’ are used from config. | + | |
This function returns the input config dictionary, adding the following fields: | This function returns the input config dictionary, adding the following fields: | ||
- | * ’<math>B</math>’. This field is the weighted Rayleigh scattering coefficient. | + | * ’//B//’. This field is the weighted Rayleigh scattering coefficient. |
- | * ’<math>u\_B</math>’. This field is the weighted Rayleigh scattering coefficient uncertainty. | + | |
+ | * ’//u_B//’. This field is the weighted Rayleigh scattering coefficient uncertainty. | ||