Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
iObs
WP2
Task 2.3
netatmoqc
Commits
0455b9ce
Commit
0455b9ce
authored
Nov 08, 2021
by
Paulo Medeiros
Browse files
Fix some docstrings
parent
3029cb68
Changes
7
Hide whitespace changes
Inline
Side-by-side
netatmoqc/commands_functions.py
View file @
0455b9ce
...
...
@@ -112,7 +112,11 @@ def _select_stations_single_dtg(dtg, config, args):
args (argparse.Namespace): Parsed command line arguments.
Returns:
(DataFrame, DataFrame, DataFrame): df_accepted, df_rejected, df_moving
tuple containing:
pandas.DataFrame: Accepted stations.
pandas.DataFrame: Rejected stations.
pandas.DataFrame: Moving stations.
"""
tstart
=
time
.
time
()
...
...
netatmoqc/hollow_symmetric_matrix.py
View file @
0455b9ce
...
...
@@ -114,10 +114,10 @@ def _data_index_to_matrix_index(n, i_data, check_bounds=True):
(Default value = True).
Returns:
{
int: Matrix row index,
int: Matrix
column
index
}
tuple containing:
int: Matrix
row
index
.
int: Matrix column index.
Raises:
ValueError: If check_bounds evaluates to True and n, i_data are outside
...
...
@@ -654,11 +654,11 @@ class HollowSymmetricMatrix(np.lib.mixins.NDArrayOperatorsMixin):
"""Return a copy of the matrix, formatted depending on optimize_mode.
Returns:
{
numpy.ndarray: If optimize_mode == "speed". Dense form.
netatmoqc.hollow_symmetric_matrix.HollowSymmetricMatrix: If
optimize_mode != "speed".
}
tuple containing:
numpy.ndarray: If optimize_mode == "speed". Dense form.
netatmoqc.hollow_symmetric_matrix.HollowSymmetricMatrix: If
optimize_mode != "speed".
"""
logger
.
debug
(
"%s: Calling 'copy' method"
,
type
(
self
).
__name__
)
...
...
netatmoqc/load_data.py
View file @
0455b9ce
...
...
@@ -100,7 +100,7 @@ def mslp2sp_coeff(alt):
"""Coeff to convert mean sea-level pressure to pressure at altitude alt.
Args:
alt: Altitude in meters.
alt
(float)
: Altitude in meters.
Returns:
float: Which multiplies by the mslp to give the surface pressure at alt
...
...
@@ -315,11 +315,10 @@ def rm_moving_stations(df):
df (pandas.Dataframe): Input data.
Returns:
{
'pandas.Dataframe': Copy of input df, but with
moving stations removed,
'pandas.Dataframe': The moving stations.
}
tuple containing:
pandas.Dataframe: Copy of input df, but with moving stations removed.
pandas.Dataframe: The moving stations.
"""
df_grouped_by_id
=
df
.
groupby
([
"id"
],
as_index
=
False
,
sort
=
False
)
...
...
@@ -341,7 +340,7 @@ def rm_overlapping_stations(df):
df (pandas.Dataframe): Input data.
Returns:
'
pandas.Dataframe
'
: Copy of input df, but with the
pandas.Dataframe: Copy of input df, but with the
overlapping stations removed.
"""
...
...
@@ -372,7 +371,7 @@ def remove_duplicates_within_cycle(df, dtg):
dtg (netatmoqc.dtgs.Dtg): The picked assimilation DTG.
Returns:
'
pandas.Dataframe
'
: Copy of input df, where only one station
pandas.Dataframe: Copy of input df, where only one station
report is kept for each DTG.
"""
...
...
@@ -483,11 +482,11 @@ def remove_irregular_stations(df, moving=True, duplicates=True, overlapping=True
Default value = True)
Returns:
{
'pandas.Dataframe': Copy of input df, but with the
tuple containing:
pandas.Dataframe: Copy of input df, but with the
irregular. stations removed,
'pandas.Dataframe': Dataframe containing removed movind stations.
}
pandas.Dataframe: Dataframe containing removed moving stations.
"""
dtg
=
df
.
metadata_dict
[
"dtg"
]
...
...
netatmoqc/metrics.py
View file @
0455b9ce
...
...
@@ -311,7 +311,7 @@ def calc_distance_matrix(df, config, domain=None, num_threads=-1):
config (ParsedConfig): Parsed configs.
domain (netatmoqc.domains.Domain): The adopted spatial domain.
(Default value = None)
num_threads: Max number of threads used for the computation.
num_threads
(int)
: Max number of threads used for the computation.
(Default value = -1)
Raises:
...
...
netatmoqc/outlier_removal.py
View file @
0455b9ce
...
...
@@ -58,11 +58,10 @@ def _truncated_means_and_stds(df, perc, min_size=3):
(Default value = 3)
Returns:
{
numpy.array: Truncated means calculated for each column in the
input data.
numpy.array: Truncated stds for each column in the data.
}
tuple containing:
numpy.array: Truncated means calculated for each column in the input data.
numpy.array: Truncated stds for each column in the data.
"""
ncols
=
df
.
shape
[
1
]
...
...
netatmoqc/plots.py
View file @
0455b9ce
...
...
@@ -73,9 +73,9 @@ def draw_boundaries(
domain (netatmoqc.domains.Domain): Model domain.
name (str): Name of the boundaries (shown in legend).
(Default value = "boundaries").
corners: (x, y) coords of he start and end of the corners of
the closed
boundary to be drawn. If corners is not passed, then the
domain
corners will be used. (Default value = None)
corners
(np.array)
: (x, y) coords of he start and end of the corners of
the closed
boundary to be drawn. If corners is not passed, then the
domain
corners will be used. (Default value = None)
showlegend (bool): (Default value = True)
legendgroup (str): Passed to go.Scattergeo. (Default value = None).
**kwargs: Passed to the "lines" opt of go.Scattergeo.
...
...
netatmoqc/save_data.py
View file @
0455b9ce
...
...
@@ -223,6 +223,9 @@ def obs_timestamp2csv_rpath(timestamp):
Returns:
pathlib.Path: CSV file relative path to be used.
Raises:
ValueError: If something goes wrong in the timestamp conversion to string.
"""
year
=
timestamp
.
strftime
(
"%Y"
)
month
=
timestamp
.
strftime
(
"%m"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment