Skip to content

Commit

Permalink
cods build docstring complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffjennings committed Nov 8, 2023
1 parent 41007bd commit ae09abd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/mpol/crossval.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class CrossValidate:
strength ('lambda', float), whether to guess an initial value for lambda
('guess', bool), and other quantities needed to compute their loss term.
Example:
{"sparsity":{"lambda":1e-3, "guess":False},
"entropy": {"lambda":1e-3, "guess":True, "prior_intensity":1e-10}
}
{"sparsity":{"lambda":1e-3, "guess":False},
"entropy": {"lambda":1e-3, "guess":True, "prior_intensity":1e-10}
}
train_diag_step : int, default=None
Interval at which training diagnostics are output. If None, no
diagnostics will be generated.
Expand Down
6 changes: 4 additions & 2 deletions src/mpol/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def __init__(self, coords: GridCoords, persistent_vis: bool = False):
def from_image_properties(
cls, cell_size: float, npix: int, persistent_vis: bool = False
) -> FourierCube:
r"""Alternative method for instantiating a FourierCube from ``cell_size``
and ``npix``
r"""
Alternative method for instantiating a FourierCube from ``cell_size`` and ``npix``
Args:
cell_size (float): the width of an image-plane pixel [arcseconds]
npix (int): the number of pixels per image side
Expand Down Expand Up @@ -298,6 +299,7 @@ def from_image_properties(
nchan: int = 1,
sparse_matrices: bool = True,
) -> NuFFT:

coords = GridCoords(cell_size, npix)
return cls(coords, uu, vv, nchan, sparse_matrices)

Expand Down
8 changes: 4 additions & 4 deletions src/mpol/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def split_diagnostics_fig(splitter, channel=0, save_prefix=None):
Parameters
----------
splitter : `mpol.crossval.RandomCellSplitGridded` object
Iterator that returns a `(train, test)` pair of `GriddedDataset`s
Iterator that returns a `(train, test)` pair of `GriddedDataset`
for each iteration.
channel : int, default=0
Channel (of the datasets in `splitter`) to use to generate figure
Expand Down Expand Up @@ -339,9 +339,9 @@ def train_diagnostics_fig(model, losses=[], train_state=None, channel=0,
"""
Figure for model diagnostics during an optimization loop. For a `model` in
a given state, plots the current:
- model image (both linear and arcsinh colormap normalization)
- gradient image
- loss function
- model image (both linear and arcsinh colormap normalization)
- gradient image
- loss function
Parameters
----------
Expand Down

0 comments on commit ae09abd

Please sign in to comment.