calculate303dAssessment.py
@@ -603,7 +603,7 @@ |
): # finds instances where the number of J flags samples exceeds how many are used to calculate a percentile |
for key in displaySummary: |
if ( |
- displaySummary[key]["Summary Stat."] not in ["geomean", "DMs", "DMw", "avg"] |
+ displaySummary[key]["Summary Stat."] not in ["geomean", "DMs", "DMw", "avg", "NA"] |
and displaySummary[key]["J Flag"] > 0 |
): |
# check chronic sample size |
@@ -5685,6 +5685,14 @@ |
displaySummary[key]["Summary Stat."] = self.AmbientStat(Pctcount, 0.85) # DisMat(13, 51) = AmbientStat(Pctcount, 0.85) |
# End if |
|
+ # Catch for any null stats which have too few/many samples to be present in the AmbientStat table lookup, tcw |
+ if displaySummary[key]["Summary Stat."] == "NA-min": |
+ displaySummary[key]["Summary Stat."] = "NA" |
+ displaySummary[key]["Status"] = "Too few samples to assess because ambient standard applies" |
+ if displaySummary[key]["Summary Stat."] == "NA-max": |
+ displaySummary[key]["Summary Stat."] = "NA" |
+ displaySummary[key]["Status"] = "Too many samples to assess because ambient standard applies" |
+ |
# RePreserve paraArray(Pctcount) #trims blanks off bottom of array |
pctanswer = 0 |
if Pctcount > 1 and self.checkNumeric( |
@@ -12981,6 +12989,11 @@ |
return row[3] # AmbientStat = Worksheets("ambient table").Cells(L1, 4).Value |
# End if |
# Next L1 |
+ |
+ if SampleSize < 5: |
+ return "NA-min" |
+ if SampleSize > 100: |
+ return "NA-max" |
return None |
|
def RationaleControl(self, displaySummary, flagSummary): |