Skip to content

Commit

Permalink
Issue #46 add api docs (very bsic)
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Apr 25, 2022
1 parent 6d51479 commit 87efeac
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
16 changes: 16 additions & 0 deletions docs/source/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,20 @@
```{eval-rst}
.. automodule:: fusets
:members:
```

### fusets.mogrp

```{eval-rst}
.. automodule:: fusets.mogrp
:members:
```

### fusets.whittaker

```{eval-rst}
.. automodule:: fusets.whittaker
:members:
```
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
29 changes: 16 additions & 13 deletions src/fusets/mogrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

def create_empty_2D_list(nrows, ncols):
"""
Function creating an empty list of lists (matrix-like structure)
Function creating a list of lists (matrix-like structure)
Args:
nrows [int] : # of rows of the output list of lists
ncols [int] : # of cols of the output list of lists
nrows (int) : # of rows of the output list of lists
ncols (int) : # of cols of the output list of lists
Returns:
empty_list [list] : empty list of lists (matrix-like structure)
list of lists (matrix-like structure)
"""
empty_list = []
Expand All @@ -30,16 +30,19 @@ def MOGRP_GPY_retrieval(data_in, time_in, master_ind, output_timevec, nt):
Function performing the multioutput gaussian-process regression at pixel level for gapfilling purposes
Args:
data_in [array] : 3D (2DSpace, Time) array containing data to be processed
time_in [array] : vector containing the dates of each layer in the time dimension
master_ind [int] : Index identifying the Master output
output_timevec [array] :vector containing the dates on which output must be estimated
nt [int] : # of time the GP training must be performed (def=1)
data_in (array): 3D (2DSpace, Time) array containing data to be processed
time_in (array): vector containing the dates of each layer in the time dimension
master_ind (int): Index identifying the Master output
output_timevec (array) :vector containing the dates on which output must be estimated
nt [int]: # of time the GP training must be performed (def=1)
Returns:
Out_mean [array] : 3D (2DSpace, Time) mean value of the prediction at pixel level
Out_std [array] : 3D (2DSpace, Time) standard deviation of the prediction at pixel level
Out_QFlag [array]: 2D map of Quality Flag for any numerical error in the model determination
Out_model [list] : Matrix-like structure containing the model information at pixel level
a tuple
(out_mean, out_std, out_qflag, out_model) where:
- out_mean (array): 3D (2DSpace, Time) mean value of the prediction at pixel level
- out_std (array): 3D (2DSpace, Time) standard deviation of the prediction at pixel level
- out_qflag (array): 2D map of Quality Flag for any numerical error in the model determination
- out_model (list): Matrix-like structure containing the model information at pixel level
"""
noutput_timeseries = len(data_in)

Expand Down
3 changes: 3 additions & 0 deletions src/fusets/whittaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@


def whittaker_f(x, y, lmbd, d):
"""
Whittaker-Henderson smoothing
"""
# minimum and maximum dates
min = x[0].toordinal()
max = x[-1].toordinal()
Expand Down

0 comments on commit 87efeac

Please sign in to comment.