planetarypy / pvl

Python implementation of PVL (Parameter Value Language)
BSD 3-Clause "New" or "Revised" License
19 stars 19 forks source link

Write docs #10

Closed godber closed 9 years ago

godber commented 9 years ago

Please add a simple example of opening a file containing a label and then extracting some sample information from that label for both a PDS3 image (Pancam?) and the sample pattern.cub.

As you have done elsewhere, write a short example in the readme, but more complete examples in the actual Sphinx docs.

Once those easy tasks are done then try doing the following things:

godber commented 9 years ago

Note that some of the additional tasks above may be difficult, for example, creating a label from scratch. It might be possible but likely not easy, we will probably need to make some helper methods to improve this task and possibly others (like modifying label). The point of asking you to try it now is to expose and document those rough spots.

godber commented 9 years ago

FYI there is an example of using pvl.load here: https://github.com/planetarypy/planetaryimage/blob/master/planetaryimage/image.py Note that pvl.load is renamed to load_label in this example just to be explicit about whats being loaded. This is not necessary for documentation purposes.

There are also simpler examples here:

https://github.com/planetarypy/pvl/blob/master/tests/test_decoder.py

Note there is both:

The load form is probably going to be the most common.

percurnicus commented 9 years ago

Do you want the label from scratch to be based on an image without a label or from random information?

godber commented 9 years ago

I would start by trying to recreate a very simple but valid label. Like tiny1.lbl in https://github.com/planetarypy/pvl/tree/master/tests/data/pds3 and then try making increasingly complex labels.

godber commented 9 years ago

Great start!