codes:errorbudget
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| codes:errorbudget [2020/12/13 21:04] – fparraro | codes:errorbudget [2024/03/22 13:31] (current) – [Introduction] jlsolano | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| **prepared by** | **prepared by** | ||
| - | | + | |
| 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: | + | 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: |
| 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/ | + | 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/ |
| ====== 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:// |
| - | Anon: EUBREWNET data server, [online] Available from: http://rbcce.aemet.es/ | + | Anon: EUBREWNET data server, [online] Available from: http://eubrewnet.aemet.es/ |
| Line 534: | Line 534: | ||
| ^ Field ^ Description ^ | ^ Field ^ Description ^ | ||
| ^ ’gmt’ | datetime object ^ | ^ ’gmt’ | datetime object ^ | ||
| - | ^ 'raw$\_$count$\_$w0 | + | ^ 'raw_count_w0 |
| - | ^ 'raw$\_$count$\_$w1 | + | ^ 'raw_count_w1 |
| - | ^ 'raw$\_$count$\_$w2 | + | ^ 'raw_count_w2 |
| - | ^ 'raw$\_$count$\_$w3 | + | ^ 'raw_count_w3 |
| - | ^ 'raw$\_$count$\_$w4 | + | ^ 'raw_count_w4 |
| - | ^ 'raw$\_$count$\_$w5 | + | ^ 'raw_count_w5 |
| - | ^ '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, | + | ^ ’w_o3_0’ | weight for double ratio #2 MS(9) calculation, |
| - | ^ ’w$\_$o3$\_$2’ | weight for double ratio #2 MS(9) calculation, | + | ^ ’w_o3_2’ | weight for double ratio #2 MS(9) calculation, |
| - | ^ ’w$\_$o3$\_$3’ | weight for double ratio #2 MS(9) calculation, | + | ^ ’w_o3_3’ | weight for double ratio #2 MS(9) calculation, |
| - | ^ ’w$\_$o3$\_$4’ | weight for double ratio #2 MS(9) calculation, | + | ^ ’w_o3_4’ | weight for double ratio #2 MS(9) calculation, |
| - | ^ ’w$\_$o3$\_$5’ | weight for double ratio #2 MS(9) calculation, | + | ^ ’w_o3_5’ | weight for double ratio #2 MS(9) calculation, |
| - | ^ ’w$\_$o3$\_$6’ | weight for double ratio #2 MS(9) calculation, | + | ^ ’w_o3_6’ | weight for double ratio #2 MS(9) calculation, |
| ^ ’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$\_$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, | + | ^ instrumental_unc() | Applies instrumental corrections (darkcount, deadtime, temperature, |
| ^ combined() | Calculates the combined uncertainty to brewer individual measurements. ^ | ^ combined() | Calculates the combined uncertainty to brewer individual measurements. ^ | ||
| Line 647: | Line 647: | ||
| print out[' | print out[' | ||
| print out[' | print out[' | ||
| - | print out[' | + | print out[' |
| The field // | The field // | ||
| 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: | ||
| - | * < | + | * //zenith_angle_uncertainty/ |
| - | * < | + | |
| - | * < | + | |
| - | === < | + | * // |
| - | This function gets the uncertainties of raw counts to light intensity conversion (< | + | * // |
| - | ''' | + | |
| + | === instrumental_unc() === | ||
| - | < | + | This function gets the uncertainties of raw counts to light intensity conversion (// |
| - | import brewer_unc | + | |
| - | measure = {u' | + | **Example** |
| - | config = {' | + | import datetime |
| + | import brewer_unc | ||
| + | |||
| + | | ||
| + | config = {' | ||
| + | |||
| + | out = instrumental_unc( measure, config ) | ||
| + | print(" | ||
| + | |||
| + | The fields ’// | ||
| - | out = instrumental_unc( measure, config ) | ||
| - | print(& | ||
| - | The fields ’< | ||
| This function returns the input measure dictionary, adding the following fields: | 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 | + | |
| - | \end{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}</ | + | |
| - | * < | + | |
| - | 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}</ | + | |
| - | === < | + | $nd\_filter |
| - | This function obtains the correct value of the TOC uncertainty budget of the Brewer spectrophotometers through the function < | + | * ’//single_ratio1//’, ’// |
| - | ''' | + | |
| + | * $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 | + | * ’// |
| - | 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 = 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 // | ||
| + | |||
| + | **Example** | ||
| + | |||
| + | | ||
| + | import brewer_unc | ||
| + | |||
| + | measure = {u' | ||
| + | config = {' | ||
| + | |||
| + | out = combined( measure, config ) | ||
| + | print(" | ||
| + | print(" | ||
| - | measure | + | The fields ’//measure\_unc//’, ’//airmass//’, ’//airmass_uncertainty//’, ’//airmass_rayleigh//’, ’//airmass_rayleigh_uncertainty//’, ’//o3//’, ’//pre//’ and ’// |
| - | config = {'o3o3rate': 0.342,'B': 1.0, 'u_B': 0.029,'u_A1': 0.0094, 'u_etc': 9.14,'w_o3_2': 0.0, ' | + | |
| - | out = combined( measure, config ) | ||
| - | print(& | ||
| - | print(& | ||
| - | The fields ’< | ||
| This function returns the input measure dictionary, adding the following fields: | This function returns the input measure dictionary, adding the following fields: | ||
| - | * ’< | + | * ’//u_o3//’ which is calculated with the combined uncertainty equations. |
| - | == Astronomical == | + | ==== Astronomical |
| - | {| | + | ^ Function |
| - | !align=" | + | ^ solar_ha_dec_et_unc() | Returns the solar hour angle, declination and equation of time uncertainties. |
| - | ! ''' | + | ^ sza_unc() | Returns the solar zenith angle uncertainty. |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns the solar hour angle, declination and equation of time uncertainties. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns the solar zenith angle uncertainty. | + | |
| - | |} | + | |
| - | === < | + | === 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** | ||
| + | |||
| + | brewer_unc.solar_ha_dec_et_unc( datet, lon ) | ||
| - | <pre> | ||
| - | brewer_unc.solar_ha_dec_et_unc( datet, lon )</ | ||
| 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 < | + | The // |
| - | === < | + | === 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** | ||
| + | |||
| + | brewer_unc.sza_unc( datet, lat, lon ) | ||
| - | <pre> | ||
| - | brewer_unc.sza_unc( datet, lat, lon )</ | ||
| 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 < | + | The //sza_unc()// function returns a float with the value of the solar zenith angle uncertainty in degrees. |
| - | == Data Reduction == | + | ==== Data Reduction |
| - | {| | + | ^ Function |
| - | !align=" | + | ^ rawtocount() | Returns a list with the raw-to-count conversion uncertainty. ^ |
| - | ! ''' | + | ^ darkcount_unc() | Returns a list with the dark count correction uncertainty. |
| - | |- | + | ^ deadtime_unc() | Returns a list with the dead time correction uncertainty. |
| - | |align=" | + | ^ 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=" | + | |
| - | | Returns a list with the dark count correction uncertainty. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns a list with the dead time correction uncertainty. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns a list with the temperature correction uncertainty. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns a list with the filter linearity correction uncertainty. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns a list with the uncertainty of the double ratio variation with wavelength. | + | |
| - | |} | + | |
| - | === < | + | === 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): | ||
| - | < | + | $u_{out}^{2}[i] = \frac{2f[i]}{cycles*it}$ |
| - | ''' | + | **Example** |
| - | < | + | |
| - | brewer_unc.rawtocount( raw, dark_raw, cycles, it )</ | + | |
| - | The input parameter | + | The input parameter |
| - | The < | + | The //rawtocount()/ |
| - | === < | + | === darkcount_unc() === |
| This function gets the dark count correction uncertainty: | This function gets the dark count correction uncertainty: | ||
| - | < | + | $u_{out}^{2}[i] = u^{2}[i] + u^{2}[dark]$ |
| - | ''' | + | **Example** |
| - | < | + | |
| - | brewer_unc.darkcount_unc( f, dark_count, u2_f, cycles, it )</ | + | |
| - | The input parameter | + | The input parameter |
| - | The < | + | The // |
| - | === < | + | === 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: | ||
| - | < | + | $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. | ||
| - | < | + | $u_{out} = \frac{10^{4}u[i]}{f[i]*\log(10)}$ |
| - | ''' | + | **Example** |
| - | < | + | |
| - | brewer_unc.deadtime_unc( f, u2_f, t1, u_t1, norm=1 )</ | + | |
| - | The input parameter | + | The input parameter |
| - | The < | + | The // |
| - | === < | + | === temp_unc() === |
| This function gets the temperature-dependent compensation uncertainty of the spectrometer: | This function gets the temperature-dependent compensation uncertainty of the spectrometer: | ||
| - | < | + | $u_{out}^{2} = u^{2}[i] + tc^{2}[i]*u_{t}^{2} + t^{2}*u_{tc}^{2}[i]$ |
| - | where < | + | where $u_{t}$ is the temperature uncertainty which usially |
| - | ''' | + | **Example** |
| - | < | + | |
| - | brewer_unc.temp_unc( u2_f, t, tc, u_tc )</ | + | |
| - | The input parameter | + | The input parameter // |
| - | The < | + | The //temp_unc()// function returns a list with the temperature corrected uncertainties in counts per second. |
| - | === < | + | === 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: | ||
| - | < | + | $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** |
| - | brewer_unc.filter_linearity_unc( f, u_f, lf, u_lf, fp )</ | + | |
| - | The input parameter < | + | |
| - | The < | + | brewer_unc.filter_linearity_unc( |
| + | |||
| + | The input parameter | ||
| - | === < | + | The // |
| + | |||
| + | === 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: | ||
| - | < | + | $u_{out}^{2} = \left(1+\frac{k_{wv}}{100}\right)^{2}*u_{in}^{2} + \left(\frac{DR}{100}\right)^{2}*u_{wv}^{2}$ |
| - | ''' | + | **Example** |
| - | < | + | |
| - | brewer_unc.wavelength_slope( f, u_f, kwv, u_kwv )</ | + | |
| - | The input parameter | + | The input parameter |
| - | The < | + | The // |
| - | == Auxiliary Functions == | + | ==== Auxiliary Functions |
| - | {| | + | ^ Function |
| - | !align=" | + | ^ rel_unc() | Returns a list with the relative uncertainties. |
| - | ! ''' | + | ^ wsum_unc() | Returns the weighted sum from all uncertainties on a list. ^ |
| - | |- | + | ^ wsum() | Returns the weighted sum from all measurements on a list. ^ |
| - | |align=" | + | ^ B_unc() | Returns the Rayleigh scattering uncertainty. |
| - | | Returns a list with the relative uncertainties. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns the weighted sum from all uncertainties on a list. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns the weighted sum from all measurements on a list. | + | |
| - | |- | + | |
| - | |align=" | + | |
| - | | Returns the Rayleigh scattering uncertainty. | + | |
| - | |} | + | |
| - | === < | + | === 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: | ||
| - | < | + | $u\_rel = \frac{u\_f}{f}$ |
| - | ''' | + | **Example** |
| - | <pre>import brewer_unc | + | |
| + | |||
| + | f=[1,2] | ||
| + | u_f=[0.1, | ||
| + | |||
| + | 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 // |
| - | u_f=[0.1,0.5] | + | |
| - | brewer_unc.rel_unc( f, u_f )</ | + | === wsum() === |
| - | The input parameter < | + | |
| - | + | ||
| - | The < | + | |
| - | + | ||
| - | === < | + | |
| 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: | ||
| - | < | + | $wsum = \sum_i f[i]*w[i]$ |
| - | ''' | + | **Example** |
| - | <pre>import brewer | + | |
| - | f=[1,2] | + | f=[1,2] |
| - | w=[2,3] | + | w=[2,3] |
| - | brewer.wsum( f, w )</ | + | brewer.wsum( f, w ) |
| - | The input parameter | + | |
| + | The input parameter | ||
| - | The < | + | The //wsum()// function returns a float with the weighted sum value. |
| - | === < | + | === 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: | ||
| - | < | + | $wsum\_unc = \sum_i (f[i]*w[i])^2$ |
| - | ''' | + | **Example** |
| - | <pre>import brewer | + | |
| - | f=[1,2] | + | f=[1,2] |
| - | w=[0.1, | + | w=[0.1, |
| - | brewer.wsum_unc( f, w )</ | + | brewer.wsum_unc( f, w ) |
| - | The input parameter | + | |
| + | The input parameter | ||
| - | The < | + | The //wsum()// function returns a float with the weighted square sum value. |
| - | === < | + | === B_unc() === |
| This function computes the uncertainty of the Rayleigh scattering coefficients. | This function computes the uncertainty of the Rayleigh scattering coefficients. | ||
| - | ''' | + | **Example** |
| - | <pre>import brewer | + | |
| + | |||
| + | config = {' | ||
| + | unc = 0.01 | ||
| + | |||
| + | out = brewer.wsum_unc( config, unc ) | ||
| + | print(" | ||
| + | print(" | ||
| - | config = {' | + | 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(& | + | |
| - | print(& | + | |
| - | The fields ’< | + | |
| This function returns the input config dictionary, adding the following fields: | This function returns the input config dictionary, adding the following fields: | ||
| - | * ’< | + | * ’//B//’. This field is the weighted Rayleigh scattering coefficient. |
| - | * ’< | + | |
| + | * ’//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)