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:46]
fparraro
codes:errorbudget [2024/03/22 13:31] (current)
jlsolano [Introduction]
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 654: Line 654:
  
 * //​zenith_angle_uncertainty//​. This is calculated as the output of //​sza_unc()//​ function. * //​zenith_angle_uncertainty//​. This is calculated as the output of //​sza_unc()//​ function.
 +
 * //​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_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. * //​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.
  
Line 671: Line 673:
     print("​unc_measurement:​ "​+str(out['​measure_unc'​]))     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.+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 returns the input measure dictionary, adding the following fields: This function returns the input measure dictionary, adding the following fields:
Line 681: Line 684:
 * ’//​single_ratio1//​’,​ ’//​single_ratio2//​’,​ ’//​single_ratio3//​’ and ’//​single_ratio4//​’. These fields are calculates as: * ’//​single_ratio1//​’,​ ’//​single_ratio2//​’,​ ’//​single_ratio3//​’ and ’//​single_ratio4//​’. These fields are calculates as:
  
-        ​$single\_ratio1 = f_4 f_1+   ​* ​$single\_ratio1 = f_{4} f_{1}
-        $single\_ratio2 = f_4 f_2+   * $single\_ratio2 = f_{4} f_{2}
-        $single\_ratio3 = f_4 f_3+   * $single\_ratio3 = f_{4} f_{3}
-        $single\_ratio4 = f_5 f_4+   * $single\_ratio4 = f_{5} f_{4}
  
 * ’//​double_ratio2//​’ and ’//​double_ratio2_unc//​’. These fields are calculated as: * ’//​double_ratio2//​’ and ’//​double_ratio2_unc//​’. These fields are calculated as:
  
-        ​$double\_ratio2 = \sum_i f_i * w\_o3_{i+1}$ +   ​* ​$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}$+   * $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//'​ and '//​measure\_unc//'​. These fields are obtained as:
  
-        ​$measure = double\_ratio2 + LF[p]$ +   ​* ​$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}}$+   * $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() === === combined() ===
Line 709: Line 712:
     ​     ​
     out = combined( measure, config )     out = combined( measure, config )
-    print("u_o3: &​quot; ​+ str(out['​u_o3'​])) +    print("u_o3: " ​+ str(out['​u_o3'​])) 
-    print(&quot;o3 : &quot;+str(out['​o3'​]))</​pre>​+    print("o3 : " ​+str(out['​o3'​]))
  
 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. 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.
Line 721: Line 724:
  
 ^ Function ^ Short Description ^ ^ Function ^ Short Description ^
-solar$\_$ha$\_$dec$\_$et$\_$unc() | Returns the solar hour angle, declination and equation of time uncertainties. ^ +solar_ha_dec_et_unc() | Returns the solar hour angle, declination and equation of time uncertainties. ^ 
-sza$\_$unc() | Returns the solar zenith angle uncertainty. ^+sza_unc() | Returns the solar zenith angle uncertainty. ^
  
 === solar_ha_dec_et_unc() === === solar_ha_dec_et_unc() ===
Line 752: Line 755:
 ^ Function ^ Short Description ^ ^ Function ^ Short Description ^
 ^ rawtocount() | Returns a list with the raw-to-count conversion uncertainty. ^ ^ rawtocount() | Returns a list with the raw-to-count conversion uncertainty. ^
-darkcount$\_$unc() | Returns a list with the dark count correction uncertainty. ^ +darkcount_unc() | Returns a list with the dark count correction uncertainty. ^ 
-deadtime$\_$unc() | Returns a list with the dead time correction uncertainty. ^+deadtime_unc() | Returns a list with the dead time correction uncertainty. ^
 ^ temp_unc() | Returns a list with the temperature correction uncertainty. ^ ^ temp_unc() | Returns a list with the temperature correction uncertainty. ^
 ^ filter_linearity_unc() | Returns a list with the filter linearity correction uncertainty. ^ ^ filter_linearity_unc() | Returns a list with the filter linearity correction uncertainty. ^
Line 768: Line 771:
     brewer_unc.rawtocount( raw, dark_raw, cycles, it )     brewer_unc.rawtocount( raw, dark_raw, cycles, it )
     ​     ​
-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] +    f=[1,2] 
-u_f=[0.1,​0.5] +    u_f=[0.1,​0.5] 
- +     
-brewer_unc.rel_unc( f, u_f )</​pre>​ +    brewer_unc.rel_unc( f, u_f ) 
-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 input parameter ​//f/is a list of floats. //​u_f// ​is list of of floats of the same length than //f//.
  
-The <​math>​rel\_unc()</math> ​function returns a float which is the relative uncertainty of <​math>​f</math>.+The //rel_unc()/function returns a float which is the relative uncertainty of //f//.
  
-=== <​math>​wsum()</​math> ​===+=== wsum() ===
  
 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.1607895996.txt.gz · Last modified: 2020/12/13 21:46 by fparraro