Skip to content

Commit d675c20

Browse files
author
andamian
authored
Update README.rst
1 parent 3c123ce commit d675c20

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

caom2utils/README.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,25 @@ caom2utils
55
:target: https://pypi.python.org/pypi/caom2utils
66

77
Utilities to facililate working with the CAOM2 model.
8+
9+
Observation Validation
10+
---------------------
11+
12+
Validates a CAOM2 element (Observation, Plane, Artifact, Part or Chunk) with respect to the attributes of the element and possibly all its sub-elements. Example of validations: attribute values, spherical geometry of planes, WCS of chuncks, etc.
13+
14+
.. code:: python
15+
16+
from __future__ import (absolute_import, division, print_function,
17+
unicode_literals)
18+
import sys
19+
from caom2 import SimpleObservation
20+
import caom2utils
21+
22+
obs = SimpleObservation('collection', 'observationID')
23+
24+
# change and update obs
25+
26+
try:
27+
caom2utils.validate(obs)
28+
except Exception:
29+
print('My exception is not valid')

0 commit comments

Comments
 (0)