User Tools

Site Tools


codes:errorbudget

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
codes:errorbudget [2020/12/13 21:04]
fparraro
codes:errorbudget [2024/03/22 13:31] (current)
jlsolano [Introduction]
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 17: Line 17:
  
  
-In this document we present the uncertainty estimation of the total ozone measured by the Brewer spectrophotometers focusing on the instrumental parameters. The uncertainty model was developed during the ATMOZ project. This model describe the uncertainty model reference instruments:​ that is the instruments that are absolutely calibrated by Langley method (Redondas et al., [[#​ref-redondas_evaluation_2014|2014]][[#​ref-redondas_evaluation_2014|a]]) at the conditions of the 2016 ATMOZ campaign refered as IZO16 (Cuevas et al., [[#​ref-cuevas_izanatmospheric_2015|2015]]). The objective of the project is to extend this model to network instruments of the using the observations stored at EUBREWNET ([[#​ref-COST1207_site|Anon,​ [[#​ref-COST1207_site|n.d.]][[#​ref-COST1207_site|a]]]]; [[#​ref-eubrewnet_site|Anon,​ [[#​ref-eubrewnet_site|n.d.]][[#​ref-eubrewnet_site|b]]]]).+In this document we present the uncertainty estimation of the total ozone measured by the Brewer spectrophotometers focusing on the instrumental parameters. The uncertainty model was developed during the ATMOZ project. This model describe the uncertainty model reference instruments:​ that is the instruments that are absolutely calibrated by Langley method (Redondas et al., [[#​ref-redondas_evaluation_2014|2014]][[#​ref-redondas_evaluation_2014|a]]) at the conditions of the 2016 ATMOZ campaign refered as IZO16 (Cuevas et al., [[#​ref-cuevas_izanatmospheric_2015|2015]]). The objective of the project is to extend this model to network instruments of the using the observations stored at EUBREWNET ([[#​ref-COST1207_site|Anon]], [[#​ref-COST1207_site|n.d.]][[#​ref-COST1207_site|a]];​ [[#​ref-eubrewnet_site|Anon]], [[#​ref-eubrewnet_site|n.d.]][[#​ref-eubrewnet_site|b]]).
  
 On this report we summarize the developments of the first step which is focused on the instrumental parameters that affect the model, considering the Langley calibration and the calibration transfer to the network instruments. On this report we summarize the developments of the first step which is focused on the instrumental parameters that affect the model, considering the Langley calibration and the calibration transfer to the network instruments.
Line 410: Line 410:
 The uncertainties of the due the atmospheric parameters used on this report are calculated for the conditions during IZO16 campaign, the influence of this parameters is the will be detailed on the next working package report. The uncertainties of the due the atmospheric parameters used on this report are calculated for the conditions during IZO16 campaign, the influence of this parameters is the will be detailed on the next working package report.
  
-The Eubrewnet database has been adapted and an access function provide the instrumental data necessary to obtain the uncertainty of the TOC through of Brewer spectrophotometers has been developed. (for example[[ http://rbcce.aemet.es/​eubrewnet/​data_test/​uncert_input?​brewerid=185&​date=2016-09-21&​format=text| http:%%//%%rbcce.aemet.es/​eubrewnet/​data_test/​uncert_input?​brewerid=185&​date=2016-09-21&​format=text]]). The Python library which implement the error calculation is now on development.+The Eubrewnet database has been adapted and an access function provide the instrumental data necessary to obtain the uncertainty of the TOC through of Brewer spectrophotometers has been developed. (for example[[ http://eubrewnet.aemet.es/​eubrewnet/​data_test/​uncert_input?​brewerid=185&​date=2016-09-21&​format=text| http:%%//%%eubrewnet.aemet.es/​eubrewnet/​data_test/​uncert_input?​brewerid=185&​date=2016-09-21&​format=text]]). The Python library which implement the error calculation is now on development.
  
 ====== Conclusions ====== ====== Conclusions ======
Line 431: Line 431:
 ==Bibliography== ==Bibliography==
  
-Anon: EUBREWNET COST ES1207 website, [online] Available from: http://www.eubrewnet.org/cost1207 (Accessed October 2016a), n.d.+Anon: EUBREWNET COST ES1207 website, [online] Available from: http://​eubrewnet.aemet.es/cost1207 (Accessed October 2016a), n.d.
  
  
-Anon: EUBREWNET data server, [online] Available from: http://rbcce.aemet.es/​eubrewnet (Accessed June 2016b), n.d.+Anon: EUBREWNET data server, [online] Available from: http://eubrewnet.aemet.es/​eubrewnet (Accessed June 2016b), n.d.
  
  
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_w1 ​| raw counts wavelength #1 ^ 
-^ 'raw$\_$count$\_$w2 ​| raw counts wavelength #2 ^ +^ 'raw_count_w2 ​| raw counts wavelength #2 ^ 
-^ 'raw$\_$count$\_$w3 ​| raw counts wavelength #3 ^ +^ 'raw_count_w3 ​| raw counts wavelength #3 ^ 
-^ 'raw$\_$count$\_$w4 ​| raw counts wavelength #4 ^ +^ 'raw_count_w4 ​| raw counts wavelength #4 ^ 
-^ 'raw$\_$count$\_$w5 ​| raw counts wavelength #5 ^ +^ 'raw_count_w5 ​| raw counts wavelength #5 ^ 
-^ 'dark$\_$count’ | dark count ^+^ 'dark_count’ | dark count ^
 ^ ’cycles’ | # of cycles ^ ^ ’cycles’ | # of cycles ^
 ^ ’temp’ | Brewer Temperature ^ ^ ’temp’ | Brewer Temperature ^
-^ ’nd$\_$filter$\_$position’ | ND filter position of #2 Filterwheel (in steps) ^+^ ’nd_filter_position’ | ND filter position of #2 Filterwheel (in steps) ^
 ^ ’o3’ | Level 1 ozone ^ ^ ’o3’ | Level 1 ozone ^
 ^ ’pre’ | pressure ^ ^ ’pre’ | pressure ^
-^ ’u$\_$pre’ | pressure uncertainty ^+^ ’u_pre’ | pressure uncertainty ^
  
 ==== Config ==== ==== Config ====
Line 553: Line 553:
  
 ^ Field ^ Description ^ ^ Field ^ Description ^
-^ ’w$\_$o3$\_$0’ | weight for double ratio #2 MS(9) calculation,​ for wavelength #0 ^ +^ ’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_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_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_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_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 ^+^ ’w_o3_6’ | weight for double ratio #2 MS(9) calculation,​ for wavelength #5 ^
 ^ ’o3tempcoef’ | ozone temperature coefficient for slit 0 ^ ^ ’o3tempcoef’ | ozone temperature coefficient for slit 0 ^
 ^ ’oslit1’ | ozone temperature coefficient for slit 1 ^ ^ ’oslit1’ | ozone temperature coefficient for slit 1 ^
Line 565: Line 565:
 ^ ’oslit4’ | ozone temperature coefficient for slit 4 ^ ^ ’oslit4’ | ozone temperature coefficient for slit 4 ^
 ^ ’oslit5’ | ozone temperature coefficient for slit 5 ^ ^ ’oslit5’ | ozone temperature coefficient for slit 5 ^
-^ ’o3tempcoef$\_$unc’ | ozone temperature coefficient uncertainty for slit 0 ^ +^ ’o3tempcoef_unc’ | ozone temperature coefficient uncertainty for slit 0 ^ 
-^ ’oslit1$\_$unc’ | ozone temperature coefficient uncertainty for slit 1 ^ +^ ’oslit1_unc’ | ozone temperature coefficient uncertainty for slit 1 ^ 
-^ ’oslit2$\_$unc’ | ozone temperature coefficient uncertainty for slit 2 ^ +^ ’oslit2_unc’ | ozone temperature coefficient uncertainty for slit 2 ^ 
-^ ’oslit3$\_$unc’ | ozone temperature coefficient uncertainty for slit 3 ^ +^ ’oslit3_unc’ | ozone temperature coefficient uncertainty for slit 3 ^ 
-^ ’oslit4$\_$unc’ | ozone temperature coefficient uncertainty for slit 4 ^ +^ ’oslit4_unc’ | ozone temperature coefficient uncertainty for slit 4 ^ 
-^ ’oslit5$\_$unc’ | ozone temperature coefficient uncertainty for slit 5 ^+^ ’oslit5_unc’ | ozone temperature coefficient uncertainty for slit 5 ^
 ^ 'it’ | slit sampling time ^ ^ 'it’ | slit sampling time ^
 ^ '​deadtime’ | dead time (seconds) ^ ^ '​deadtime’ | dead time (seconds) ^
-^ ’deadtime$\_$unc’ | dead time uncertainty (seconds) ^+^ ’deadtime_unc’ | dead time uncertainty (seconds) ^
 ^ ’lf0’ | non-linearity filter coefficient of filter 0 ^ ^ ’lf0’ | non-linearity filter coefficient of filter 0 ^
 ^ ’lf1’ | non-linearity filter coefficient of filter 1 ^ ^ ’lf1’ | non-linearity filter coefficient of filter 1 ^
Line 580: Line 580:
 ^ ’lf4’ | non-linearity filter coefficient of filter 4 ^ ^ ’lf4’ | non-linearity filter coefficient of filter 4 ^
 ^ ’lf5’ | non-linearity filter coefficient of filter 5 ^ ^ ’lf5’ | non-linearity filter coefficient of filter 5 ^
-^ ’lf0$\_$unc’ | non-linearity filter coefficient uncertainty of filter 0 ^ +^ ’lf0_unc’ | non-linearity filter coefficient uncertainty of filter 0 ^ 
-^ ’lf1$\_$unc’ | non-linearity filter coefficient uncertainty of filter 1 ^ +^ ’lf1_unc’ | non-linearity filter coefficient uncertainty of filter 1 ^ 
-^ ’lf2$\_$unc’ | non-linearity filter coefficient uncertainty of filter 2 ^ +^ ’lf2_unc’ | non-linearity filter coefficient uncertainty of filter 2 ^ 
-^ ’lf3$\_$unc’ | non-linearity filter coefficient uncertainty of filter 3 ^ +^ ’lf3_unc’ | non-linearity filter coefficient uncertainty of filter 3 ^ 
-^ ’lf4$\_$unc’ | non-linearity filter coefficient uncertainty of filter 4 ^ +^ ’lf4_unc’ | non-linearity filter coefficient uncertainty of filter 4 ^ 
-^ ’lf5$\_$unc’ | non-linearity filter coefficient uncertainty of filter 5 ^ +^ ’lf5_unc’ | non-linearity filter coefficient uncertainty of filter 5 ^ 
-^ ’slope$\_$wavelength’ | percent variation of double ratio with wavelength ^ +^ ’slope_wavelength’ | percent variation of double ratio with wavelength ^ 
-^ ’slope$\_$wavelength$\_$unc’ | percent variation uncertainty of double ratio with wavelength ^+^ ’slope_wavelength_unc’ | percent variation uncertainty of double ratio with wavelength ^
 ^ ’o3o3rate’ | ozone on ozone ratio ^ ^ ’o3o3rate’ | ozone on ozone ratio ^
-^ ’u$\_$A1’ | ozone on ozone ratio uncertainty ^+^ ’u_A1’ | ozone on ozone ratio uncertainty ^
 ^ ’latitude’ | site latitude in decimal degrees ^ ^ ’latitude’ | site latitude in decimal degrees ^
 ^ ’longitude’ | site longitude in decimal degrees ^ ^ ’longitude’ | site longitude in decimal degrees ^
Line 598: Line 598:
 ^ ’be6’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #5 ^ ^ ’be6’ | Rayleigh optical depth (multiplied by 10000*log10(e)) for wavelength #5 ^
 ^ ’etco3rate’ | ETC on ozone ratio ^ ^ ’etco3rate’ | ETC on ozone ratio ^
-^ ’u$\_$etc’ | ETC uncertainty on ozone ratio ^ +^ ’u_etc’ | ETC uncertainty on ozone ratio ^ 
-^ ’rho$\_$A$\_$o3’ | Cross correlation coefficient between o3o3rate and o3 ^ +^ ’rho_A_o3’ | Cross correlation coefficient between o3o3rate and o3 ^ 
-^ ’rho$\_$A$\_$mu’ | Cross correlation coefficient between o3o3rate and ozone optical mass ^ +^ ’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_B’ | Cross correlation coefficient between o3o3rate and weighted Rayleigh depth ^ 
-^ ’rho$\_$A$\_$m’ | Cross correlation coefficient between o3o3rate and Rayleigh optical mass ^ +^ ’rho_A_m’ | Cross correlation coefficient between o3o3rate and Rayleigh optical mass ^ 
-^ ’rho$\_$A$\_$p’ | Cross correlation coefficient between o3o3rate and pressure ^ +^ ’rho_A_p’ | Cross correlation coefficient between o3o3rate and pressure ^ 
-^ ’rho$\_$A$\_$etc’ | Cross correlation coefficient between o3o3rate and ETC ^ +^ ’rho_A_etc’ | Cross correlation coefficient between o3o3rate and ETC ^ 
-^ ’rho$\_$o3$\_$mu’ | Cross correlation coefficient between o3 and ozone optical mass ^ +^ ’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_B’ | Cross correlation coefficient between o3 and weighted Rayleigh depth ^ 
-^ ’rho$\_$o3$\_$m’ | Cross correlation coefficient between o3 and Rayleigh optical mass ^ +^ ’rho_o3_m’ | Cross correlation coefficient between o3 and Rayleigh optical mass ^ 
-^ ’rho$\_$o3$\_$p’ | Cross correlation coefficient between o3 and pressure ^ +^ ’rho_o3_p’ | Cross correlation coefficient between o3 and pressure ^ 
-^ ’rho$\_$o3$\_$etc’ | Cross correlation coefficient between o3 and ETC +^ ’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_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_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_p’ | Cross correlation coefficient between ozone optical mass and pressure ^ 
-^ ’rho$\_$mu$\_$etc’ | Cross correlation coefficient between ozone optical mass and ETC +^ ’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_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_p’ | Cross correlation coefficient between weighted Rayleigh depth and pressure ^ 
-^ ’rho$\_$B$\_$etc’ | Cross correlation coefficient between weighted Rayleigh depth and ETC ^ +^ ’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_p’ | Cross correlation coefficient between Rayleigh optical mass and pressure ^ 
-^ ’rho$\_$m$\_$etc’ | Cross correlation coefficient between Rayleigh optical mass and ETC ^ +^ ’rho_m_etc’ | Cross correlation coefficient between Rayleigh optical mass and ETC ^ 
-^ ’rho$\_$p$\_$etc’ | Cross correlation coefficient between pressure and ETC ^+^ ’rho_p_etc’ | Cross correlation coefficient between pressure and ETC ^
  
 ===== Functions ===== ===== Functions =====
Line 628: Line 628:
  
 ^ Function ^ Short Description ^ ^ Function ^ Short Description ^
-airmass$\_$unc$\_$calc() | Calculates the air mass uncertainty (rayleigh and ozone) for brewer individual measurements. ^ +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. ^+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. ^ ^ combined() | Calculates the combined uncertainty to brewer individual measurements. ^
  
Line 647: Line 647:
     print out['​zenith_angle_uncertainty'​]     print out['​zenith_angle_uncertainty'​]
     print out['​airmass_uncertainty'​]     print out['​airmass_uncertainty'​]
-    print out['​airmass_rayleigh_uncertainty'​]</​pre>​+    print out['​airmass_rayleigh_uncertainty'​]
  
 The field //​’gmt’//​ is used from //​measure//,​ and the fields //​’latitude’//​ and //​’longitude’//​ are used from //config//. The field //​’gmt’//​ is used from //​measure//,​ and the fields //​’latitude’//​ and //​’longitude’//​ are used from //config//.
Line 653: Line 653:
 This function returns the input measure dictionary, adding the following fields: This function returns the input measure dictionary, adding the following fields:
  
-<​math>​zenith\_angle\_uncertainty<​/math>. This is calculated as the output of <​math>​sza\_unc()<​/math> function. +* //zenith_angle_uncertainty/​/. This is calculated as the output of //sza_unc()// function.
-* <​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. +
-* <​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.+
  
-=== <​math>​instrumental\_unc()</math> ===+* //​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.
  
-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 /> +* //​airmass_rayleigh_uncertainty//​. ​This is defined as the Rayleigh air mass uncertaintyand 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.
-'''​Example'''<​br />+
  
 +=== instrumental_unc() ===
  
-<​pre>​import datetime +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.
-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} +**Example** 
-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}+    import datetime 
 +    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'​])) 
 + 
 +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.
  
-out = instrumental_unc( measure, config ) 
-print(&​quot;​unc_measurement : &​quot;​+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: This function returns the input measure dictionary, adding the following fields:
  
-* ’<​math>​nd\_filter<​/math>’. This field is calculated as the integer value of: <​math>​nd\_filter = nd\_filter\_position/​64</​math>​ +* ’//​nd_filter//​’. This field is calculated as the integer value of: 
-* ’<​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} +
-        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> ===+$nd\_filter ​nd\_filter\_position/64$
  
-This function obtains the correct value of the TOC uncertainty budget of the Brewer spectrophotometers through the function <​math>​combined\_uncertainty()<​/math>​.<​br ​/+* ’//single_ratio1//’, ’//​single_ratio2//​’,​ ’//​single_ratio3//​’ and ’//​single_ratio4//​’. These fields are calculates as:
-'''​Example'''<​br ​/>+
  
 +   * $single\_ratio1 = f_{4} - f_{1}$
 +   * $single\_ratio2 = f_{4} - f_{2}$
 +   * $single\_ratio3 = f_{4} - f_{3}$
 +   * $single\_ratio4 = f_{5} - f_{4}$ ​
  
-<pre>import datetime +* ’//​double_ratio2//​’ and ’//​double_ratio2_unc//​’. These fields are calculated as: 
-import brewer_unc+ 
 +   * $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: 
 + 
 +   * $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}}$ 
 + 
 +=== combined() === 
 + 
 +This function obtains the correct value of the TOC uncertainty budget of the Brewer spectrophotometers through the function //​combined_uncertainty()//​. 
 + 
 +**Example** 
 + 
 +    ​import datetime 
 +    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': 770u'​u_pre':​ 15} +The fields ’//measure\_unc//’’//airmass//’’//airmass_uncertainty//’’//airmass_rayleigh//’’//airmass_rayleigh_uncertainty//’’//o3//’’//pre//’ and ’//​u_pre//​’ are used from measureand ’//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(&​quot;​u_o3:​ &quot; + str(out['​u_o3'​])) 
-print(&​quot;​o3 : &​quot;​+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.
  
-=== <​math>​sza\_unc()</​math> ​===+=== sza_unc() ===
  
-This function returns the solar zenith angle uncertainty for a specific day at a specific location.<br /> +This function returns the solar zenith angle uncertainty for a specific day at a specific location. 
-'''​Example'''​+ 
 +**Example** 
 + 
 +    brewer_unc.sza_unc( datet, lat, lon )
  
-<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(&​quot;​u_B:​ &quot; + str(out['​u_B'​])) +
-print(&​quot;​B : &​quot;​+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.
  
  
  
codes/errorbudget.1607893468.txt.gz · Last modified: 2020/12/13 21:04 (external edit)