Skip to content

Commit

Permalink
Renamed to from difference_qc to static_qc
Browse files Browse the repository at this point in the history
  • Loading branch information
ladsmund committed Sep 8, 2023
1 parent bce1098 commit 9e46356
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pypromice/process/L1toL2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os
import xarray as xr

from pypromice.qc.difference import differenceQC
from pypromice.qc.static_qc import staticQC
from pypromice.qc.percentile import percentileQC


Expand Down Expand Up @@ -56,7 +56,7 @@ def toL2(L1, T_0=273.15, ews=1013.246, ei0=6.1071, eps_overcast=1.,



ds = differenceQC(ds) # Flag and Remove difference outliers
ds = staticQC(ds) # Flag and Remove difference outliers
ds = percentileQC(ds) # Flag and remove percentile outliers

T_100 = _getTempK(T_0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
import xarray as xr


def differenceQC(ds: xr.Dataset) -> xr.Dataset:
def staticQC(ds: xr.Dataset) -> xr.Dataset:
'''
Detect and filter data points that sems to be static within a certain period.
TODO: It could be nice to have a reference to the logger or description of the behaviour here.
The AWS logger program is know to return the last successfully read value if it fails reading from the sensor.
Parameters
----------
Expand All @@ -22,7 +26,6 @@ def differenceQC(ds: xr.Dataset) -> xr.Dataset:
# This is best done by running aws.py directly and setting 'test_station'
# Plots will be shown before and after flag removal for each var

stid = ds.station_id
df = ds.to_dataframe() # Switch to pandas

# Define threshold dict to hold limit values, and the difference values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pandas as pd

from pypromice.qc.difference import find_static_regions
from pypromice.qc.static_qc import find_static_regions


def get_random_datetime() -> datetime.datetime:
Expand Down

0 comments on commit 9e46356

Please sign in to comment.