Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs update #78

Merged
merged 68 commits into from
Aug 30, 2021
Merged

Docs update #78

merged 68 commits into from
Aug 30, 2021

Conversation

NoraLoose
Copy link
Member

@NoraLoose NoraLoose commented Jul 9, 2021

This is a first attempt to restructure the documentation, with the goal of making it more user-friendly. As discussed / suggested in #77, I have made the following changes:

  • Add short summary of GCM-Filters on landing page (index.rst)
  • Add installation instructions
  • Convert the first tutorial to a narrative documentation (basic_filtering.rst)
  • As part of basic-filtering.rst, discuss the filter object and all grid types
  • Add code snippets to theory.rst (essentially the .plot_shape plots)
  • Rename tutorials --> examples, and move them to their own directory

Still to do:

  • A quickstart page?
  • ...

@NoraLoose NoraLoose marked this pull request as draft July 9, 2021 23:09
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2021

Codecov Report

Merging #78 (dfc75ac) into master (4bf35b7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #78   +/-   ##
=======================================
  Coverage   98.19%   98.19%           
=======================================
  Files           9        9           
  Lines         832      832           
=======================================
  Hits          817      817           
  Misses         15       15           
Flag Coverage Δ
unittests 98.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gcm_filters/kernels.py 99.06% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bf35b7...dfc75ac. Read the comment docs.

@rabernat
Copy link
Contributor

Let me know how I can best be helpful here. Is this ready for a full read-through?

@NoraLoose NoraLoose marked this pull request as ready for review July 29, 2021 15:55
@NoraLoose
Copy link
Member Author

The name change TRANSFORMED_TO --> AREA_WEIGHTED still has to be updated in all example notebooks. I'm still waiting for casper to go online again.

But otherwise, this is ready for a read-through. The big changes are in the .rst files (rather than the notebooks) anyway.

docs/theory.rst Outdated
@@ -16,79 +22,188 @@ The filter shape can be thought of in terms of the kernel of a convolution filte

where :math:`f` is the function being filtered, :math:`G` is the filter kernel, and :math:`x'` is a dummy integration variable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per Hussein's comments on our paper, I think we could add a parenthetical statement here saying that our filter with a Gaussian target does not produce exactly the same results as convolution against a Gaussian kernel on the sphere.

)
gaussian_filter

Once the filter has been constructed, the method ``plot_shape`` can be used to plot the shape of the target filter and the approximate filter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Add a comment saying that the distinction between the target filter and the approximate filter will be discussed below.

If the number of steps is set too low the filter will not behave as expected: it may not have the right shape or the right length scale.

Biharmonic steps are counted as 2 steps because their cost is approximately twice as much as a laplacian step.
The code allows users to set their own ``n_steps``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere in here we should say that the default number of steps computed by the code for the Taper filter assumes the default transition width. If the user selects a wider transition, then they might want to set a value of n_steps lower than the default to save cost while keeping accuracy. If the user selects a narrower transition then they should set a value of n_steps higher than the default, otherwise the filter won't behave as expected.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be straightforward to change the code to the effect that it takes the input transition width into account when computing the default n_steps?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set the scaling empirically, so I guess I could look for some kind of empirical scaling law that takes the transition width into account. I will put it on my to do list for the next few days.

Copy link
Member

@iangrooms iangrooms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great! A big improvement that I'm sure took a lot of work. I just left a couple of comments on the filter theory section, but otherwise it looks good to me.

@rabernat
Copy link
Contributor

Will do my very best to review this early next week. Thanks for all your work.

Copy link
Contributor

@rabernat rabernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got around to reviewing this. It's a very impressive update to the documentation, a huge improvement of where we were before. I have not more suggestions beyond what has already been done. Thanks so much @NoraLoose for your work!

I resolved a merge conflict in the Filter class docstring. Once CI passes, I will merge this.

@rabernat rabernat merged commit 5978b50 into ocean-eddy-cpt:master Aug 30, 2021
@rabernat rabernat mentioned this pull request Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What is still missing in the documentation?
4 participants