> If you don't save the purpleair temperature and humidity with the particle > concentration then you must be using the current temperature to calculate the > AQI during the graph generation. Is this the correct assumption?
That is not correct. I do use the purpleair temperature and the purpleair humidity to calculate the corrected PM2.5. The ‘pm2_5’ value in the loop record is the EPA corrected value. BTW, I’ve switched from your question about AQI to the actual value that is corrected, PM2.5. PM2.5 is saved to the ‘pm2_5’ column in the database. AQI is an xtype and is calculated as needed. It works on the already corrected PM2.5. > On Mar 24, 2021, at 5:07 PM, [email protected] <[email protected]> wrote: > > John, > > Thanks for the explanation. > > I reviewed the database schema and the code and I have more questions. If > you don't save the purpleair temperature and humidity with the particle > concentration then you must be using the current temperature to calculate the > AQI during the graph generation. Is this the correct assumption? But if you > use current temperature to calculate the AQI for each record, does it not > mean that the AQI graph is wrong? Am I missing something? > > Thanks > > Louis > >> On Wednesday, March 24, 2021 at 10:48:43 a.m. UTC-7 [email protected] >> wrote: >> Hi, >> >> These are calculations based on the pm2_5_cf_1, pm2_5_cf_1_b, >> current_humidity and current_temp_f values returned from calling >> http://<purple-air>/json >> >> Specifically, method is in the code here: >> >> @staticmethod >> def compute_pm2_5_us_epa_correction(pm2_5_cf_1: float, pm2_5_cf_1_b: >> float, current_humidity: int, current_temp_f: int) -> float: >> # PM2.5=0.541*PA_cf1(avgAB)-0.0618*RH +0.00534*T +3.634 >> val = 0.541 * (pm2_5_cf_1 + pm2_5_cf_1_b) / 2.0 - 0.0618 * >> current_humidity + 0.00534 * current_temp_f + 3.634 >> return val if val >= 0.0 else 0.0 >> >> This extension does not provide the 12-hour NOW cast. >> >>>> On Mar 24, 2021, at 10:07 AM, [email protected] <[email protected]> wrote: >>>> >>> >> >>> This post is intended to get information and feedback from John Klein, the >>> author of the weewx-purple extension. >>> >>> I recently set up two pupleair outdoor sensors and installed the >>> weewx-purple extension. All is working well, but I have some questions >>> about the calculation of AQI and the US EPA correction for PM2.5 used in >>> the extension. >>> >>> I reviewed the reference document >>> (https://cfpub.epa.gov/si/si_public_file_download.cfm?p_download_id=539905&Lab=CEMM) >>> and it proposes the following averaging operations: >>> >>> 1. Average each column to 1-hr average (e.g. 8:00-8:59= 8am average) >>> 2. Exclude hour if less than 90% of the measurements are available in the >>> hour average >>> 3. Exclude hour if 1-hr A&B averages are different by BOTH: 5 µg m-3 & 70%† >>> >>> My question is if the extension applies these averaging and data exclusion >>> operations? From the graphs produced it appears that the 1 hour average is >>> not used, because the graphs show peaks that are not present when compared >>> with the 1 hour average graphs obtained directly from the purpleair website. >>> >>> My suspicion is that the correction applied is limited to the following >>> formula >>> PM2.5=0.541*PA_cf1(avgAB)-0.0618*RH +0.00534*T +3.634 >>> >>> Thanks in advance for any feedback. >>> >> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/7611aae6-cd34-4554-8282-261b1cac370fn%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/a45d36b4-ff57-4548-850a-19f41b3f7ba6n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/32A93A58-69BF-4050-A026-BF24260E7084%40johnkline.com.
