Skip to content

Commit

Permalink
Improve docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob720 committed Jan 17, 2025
1 parent e77fbef commit cfda780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/aa_remove_data/pb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def _restore_newline_chars(self, data: bytes) -> bytes:
return data

def _get_proto_class_name(self) -> str:
"""Convert the name of a pv type to CamelCase to match the proto class
name.
"""Convert the name of a pv type to match the proto class name. This
involves coverting to CamelCase and replacing 'WAVEFORM' with 'Vector'.
The full mapping is described in
epicsarchiverap/src/main/edu/stanford/slac/archiverappliance/PB/data/DBR2PBTypeMapping.java
Returns:
str: Name of proto class, e.g VectorDouble.
Expand Down
5 changes: 4 additions & 1 deletion src/aa_remove_data/remove_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def reduce_freq(
or period (not both).
Args:
samples (list): _description_
samples (list): List of samples
freq (float, optional): Desired frequency. Defaults to 0.
period (float, optional): Desired period. Defaults to 0.
initial_sample (type, optional): An initial sample to find an initial diff.
Returns:
list: Reduced list of samples
Expand Down Expand Up @@ -180,6 +181,7 @@ def keep_every_nth(
samples (list): List of samples
n (int): Every nth sample (or block of samples) will be kept.
block_size (int, optional): Number of samples per block. Defaults to 1.
initial (int, optional): End point of processing from a previous chunk.
Returns:
list: Reduced list of samples.
Expand Down Expand Up @@ -209,6 +211,7 @@ def remove_every_nth(
samples (list): List of samples
n (int): Every nth sample (or block of samples) will be removed.
block_size (int, optional): Number of samples per block. Defaults to 1.
initial (int, optional): End point of processing from a previous chunk.
Returns:
list: Reduced list of samples.
Expand Down

0 comments on commit cfda780

Please sign in to comment.