Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enstools-compression
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2w
enstools-compression
Commits
0ba805bc
Commit
0ba805bc
authored
2 years ago
by
Oriol Tintó
Browse files
Options
Downloads
Patches
Plain Diff
Update documentation
parent
1973b1ea
Branches
docs
No related tags found
No related merge requests found
Pipeline
#17002
failed
2 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/source/examples/index.rst
+18
-13
18 additions, 13 deletions
docs/source/examples/index.rst
docs/source/user-guide/index.rst
+2
-2
2 additions, 2 deletions
docs/source/user-guide/index.rst
docs/source/user-guide/using_api.rst
+27
-2
27 additions, 2 deletions
docs/source/user-guide/using_api.rst
with
47 additions
and
17 deletions
docs/source/examples/index.rst
+
18
−
13
View file @
0ba805bc
...
@@ -3,21 +3,26 @@
...
@@ -3,21 +3,26 @@
Examples
Examples
========
========
Gallery of examples:
Python API
----------
.. toctree::
Compression
:maxdepth: 1
...........
:caption: Using the Python API
./compress_dataset.ipynb
.. literalinclude:: ../../../examples/python_scripts/compress_dataset.py
./analyze_dataset.ipynb
:language: python
./analyze_file.ipynb
:linenos:
./analyze_and_compress_dataset.ipynb
./compress_dataset_without_enstools_write.ipynb
Analysis
........
..
toctree::
..
literalinclude:: ../../../examples/python_scripts/analyze_file.py
:maxdepth: 1
:language: python
:caption: Using the Command Line Interface
:linenos:
./compress_file.ipynb
Analysis and Compression
........................
.. literalinclude:: ../../../examples/python_scripts/analyze_and_compress_dataset.py
:language: python
:linenos:
This diff is collapsed.
Click to expand it.
docs/source/user-guide/index.rst
+
2
−
2
View file @
0ba805bc
...
@@ -7,7 +7,7 @@ User Guide
...
@@ -7,7 +7,7 @@ User Guide
.. grid:: 1
.. grid:: 1
.. grid-item-card::
.. grid-item-card::
:columns:
7
:columns:
5
.. image:: ../images/icons/api.svg
.. image:: ../images/icons/api.svg
:width: 50%
:width: 50%
...
@@ -22,7 +22,7 @@ User Guide
...
@@ -22,7 +22,7 @@ User Guide
Using the **Python API**
Using the **Python API**
.. grid-item-card::
.. grid-item-card::
:columns:
7
:columns:
5
.. image:: ../images/icons/cli.svg
.. image:: ../images/icons/cli.svg
:width: 50%
:width: 50%
...
...
This diff is collapsed.
Click to expand it.
docs/source/user-guide/using_api.rst
+
27
−
2
View file @
0ba805bc
...
@@ -31,7 +31,7 @@ To analyze a dataset:
...
@@ -31,7 +31,7 @@ To analyze a dataset:
.. code::
.. code::
from enstools.io import read
from enstools.io import read
from enstools.
encoding
.api import analyze_dataset
from enstools.
compression
.api import analyze_dataset
with read("input.nc") as dataset:
with read("input.nc") as dataset:
results = analyze_dataset(dataset)
results = analyze_dataset(dataset)
...
@@ -40,9 +40,34 @@ To analyze a file:
...
@@ -40,9 +40,34 @@ To analyze a file:
.. code::
.. code::
from enstools.
encoding
.api import analyze_files
from enstools.
compression
.api import analyze_files
results = analyze_files("input.nc")
results = analyze_files("input.nc")
Emulator
........
.. code::
from enstools.io import read
from enstools.encoding.api import emulate_compression_on_dataset
results = analyze_files("input.nc")
with read("input.nc") as dataset:
compressed_dataset = emulate_compression_on_dataset(dataset, compression="lossy,sz,pw_rel,1e-5", inplace=False)
diff = compressed_dataset - dataset
xarray accessor
...............
.. code::
from enstools.io import read
import enstools.compression.xr_accessor
with read("input.nc") as dataset:
results = dataset.compression.analyze()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment