|
| __init__ (self, filename=None, **args) |
|
| __repr__ (self) |
|
| new (self, args) |
|
| addDataset (self, prefix='image', set=1, typecode='B', xsize=None, ysize=None, initval=None, **args) |
|
| typecode (self, set=1) |
|
| get (self, path) |
|
| set (self, path, value) |
|
| delete (self, path) |
|
| getattribute (self, path, key) |
|
| putattribute (self, path, value, typ) |
|
| setattribute (self, path, key, value) |
|
| eval (self, path=None) |
|
| open (self, filename) |
|
| read_metadata (self, filename) |
|
| read_dataset (self, index=1) |
|
| read_datasets (self, indices=None) |
|
| set_fcp (self, userblock=0, sizes=(4, 4), sym_k=(1, 1), istore_k=1, meta_block_size=0) |
|
| save (self, filename) |
|
| asXML (self, filename=None) |
|
| pureXML (self, filename, encoding=ENCODING) |
|
| ql (self, index=0, pal=None) |
|
| MakeExtentFromCorners (self) |
|
| MakeCornersFromExtent (self) |
|
| MakeCornersFromArea (self, areaid=None) |
|
| transform (self, areaid, method=rave_transform.NEAREST, radius=None) |
|
|
| _fcp = None |
|
| _h5nodes = None |
|
Fundamental RAVE class
Arguments:
Returns:
◆ __init__()
Lib.rave.RAVE.__init__ |
( |
| self, |
|
|
| filename = None, |
|
|
** | args ) |
Initializes a RAVE object.
Arguments:
Returns:
◆ __repr__()
Lib.rave.RAVE.__repr__ |
( |
| self | ) |
|
Internal method; don't bother asking...
◆ addDataset()
Lib.rave.RAVE.addDataset |
( |
| self, |
|
|
| prefix = 'image', |
|
|
| set = 1, |
|
|
| typecode = 'B', |
|
|
| xsize = None, |
|
|
| ysize = None, |
|
|
| initval = None, |
|
|
** | args ) |
Adds a complete dataset to the object.
A new dataset Group is added to INFO and a new array is added to .data.
Arguments:
Returns: nothing, the new dataset is added to self.
◆ asXML()
Lib.rave.RAVE.asXML |
( |
| self, |
|
|
| filename = None ) |
Outputs a metadata representation of a RAVE object to XML
with line breaks, either to file or to stdout.
Arguments:
Returns:
◆ delete()
Lib.rave.RAVE.delete |
( |
| self, |
|
|
| path ) |
Deletes the infoset element specified by "path".
Arguments:
string path: The element to delete, given in the infoset format, ie.
"/path/name".
Returns: Nothing if successful, otherwise a ValueError exception if
the data type is invalid or the payload is illegal.
◆ eval()
Lib.rave.RAVE.eval |
( |
| self, |
|
|
| path = None ) |
This is just a mapping to the same method in rave_info.INFO
Evaluates the attribute given by "path" and returns it as its proper
type.
Arguments:
string path: the attribute's path. If this path doesn't exist in this
INFO object, then an AttributeError exception is raised.
Returns: a Python int, float, string, or sequence, depending on
the contents of the given attribute.
◆ get()
Lib.rave.RAVE.get |
( |
| self, |
|
|
| path ) |
Get the contents of an infoset element. This method can be used to
get scalar attributes as well as dataset data.
Arguments:
string path: the element to find. This is given in the infoset
format "/path/name".
Returns: The value of the element, or None if the attribute is
unavailable.
◆ getattribute()
Lib.rave.RAVE.getattribute |
( |
| self, |
|
|
| path, |
|
|
| key ) |
Gets the value of 'key' from Element 'path'.
Same as self.info.find(path).get(key)
Arguments:
string path: the attribute's path
string key: the attribute's key to query
Returns: the item of the key describing attribute 'path'
◆ MakeCornersFromExtent()
Lib.rave.RAVE.MakeCornersFromExtent |
( |
| self | ) |
|
Derives /where/LL_lon, LL_lat, UR_lon, and UR_right attributes
from /how/extent and /where/projdef
◆ MakeExtentFromCorners()
Lib.rave.RAVE.MakeExtentFromCorners |
( |
| self | ) |
|
Derives the four-tuple area extent for a given 2-D Cartesian
image. These four floats are expressed in surface (UCS) coordinates
according to the PROJ.4 library, and represent, in order, the
lower-left longitude, lower-left latitude, upper-right longitude,
and upper-right latitude coordinates. Specifically, these are the
lower-left corners of these pixels, ie. NOT the outer corner of the
upper-right pixel!
The /where/LL_lon, LL_lat, UR_lon, and UR_right attributes must
exist.
◆ new()
Lib.rave.RAVE.new |
( |
| self, |
|
|
| args ) |
◆ open()
Lib.rave.RAVE.open |
( |
| self, |
|
|
| filename ) |
Opens a RAVE object from file.
Arguments:
Returns:
◆ pureXML()
Lib.rave.RAVE.pureXML |
( |
| self, |
|
|
| filename, |
|
|
| encoding = ENCODING ) |
Outputs a metadata representation of a RAVE object to XML
without line breaks, either to file or to stdout.
Arguments:
Returns:
◆ putattribute()
Lib.rave.RAVE.putattribute |
( |
| self, |
|
|
| path, |
|
|
| value, |
|
|
| typ ) |
This is just a mapping to the same method in rave_info.INFO
Changes the content of attribute "path" to contain "value" of type
"typ".
Arguments:
string path: the attribute's path. If this path doesn't exist in this
INFO object, then an AttributeError exception is raised.
value: the thing to put, can be string, int, float, list, or tuple.
string typ: option to explicitely specify the type attribute. Can be
any of "string", "int", "float", or "sequence".
Returns: nothing. The attribute's value is simply replaced.
◆ ql()
Lib.rave.RAVE.ql |
( |
| self, |
|
|
| index = 0, |
|
|
| pal = None ) |
QuickLook visualization of a dataset given by its index.
◆ read_dataset()
Lib.rave.RAVE.read_dataset |
( |
| self, |
|
|
| index = 1 ) |
Reads dataset with the given index into the existing RAVE object.
Arguments:
int index: the index of the dataset to read
Returns: nothing, the dataset is read into self.
◆ read_datasets()
Lib.rave.RAVE.read_datasets |
( |
| self, |
|
|
| indices = None ) |
Reads datasets into self.
Arguments:
list indices: optional list of indices of datasets to read.
Returns: nothing, the datasets are all read into self.
◆ read_metadata()
Lib.rave.RAVE.read_metadata |
( |
| self, |
|
|
| filename ) |
Reads metadata from file and returns it in a properly-formatted RAVE
object.
Arguments:
string filename: file string
Returns: a RAVE object with empty .data
◆ save()
Lib.rave.RAVE.save |
( |
| self, |
|
|
| filename ) |
Writes the RAVE object to file.
Arguments:
Returns:
◆ set()
Lib.rave.RAVE.set |
( |
| self, |
|
|
| path, |
|
|
| value ) |
Creates and sets the value of a new infoset element.
Arguments:
string path: This is given in the infoset format, ie. "/path/name".
If the payload already exists, it will be modified with
the new value. If not, it will be created. Groups are
created automatically.
value: The value to set. This must be an int, float, string, list
of strings, or a numpy array.
Returns: Nothing if successful, a ValueError exception if the data
type is invalid or the payload is illegal.
◆ set_fcp()
Lib.rave.RAVE.set_fcp |
( |
| self, |
|
|
| userblock = 0, |
|
|
| sizes = (4, 4), |
|
|
| sym_k = (1, 1), |
|
|
| istore_k = 1, |
|
|
| meta_block_size = 0 ) |
Optimizes default HDF5 file-creation properties when writing new files.
Arguments:
int userblock:
tuple of two ints sizes:
tuple of two ints sym_k:
int istore_k:
int meta_block_size:
Returns: nothing, a _pyhl.filecreationproperty() is initialized
to self._fcp
◆ setattribute()
Lib.rave.RAVE.setattribute |
( |
| self, |
|
|
| path, |
|
|
| key, |
|
|
| value ) |
Sets the Element (at 'path') attribute 'key' to 'value'.
Same as self.info.find(path).set(key, value)
Arguments:
string path: path to Element
string key: key of Element's attribute
string value: item to be the value of this Element's attribute
Returns: nothing, the Element's attribute is set.
◆ transform()
Lib.rave.RAVE.transform |
( |
| self, |
|
|
| areaid, |
|
|
| method = rave_transform.NEAREST, |
|
|
| radius = None ) |
Simple wrapper to rave_transform.transform() for
cartesian-to-cartesian transformation.
◆ typecode()
Lib.rave.RAVE.typecode |
( |
| self, |
|
|
| set = 1 ) |
Returns the typecode of the dataset given by "set".
Argument:
int set: the dataset
Returns: the tyecode string returned by array.typecode()
The documentation for this class was generated from the following file:
- /github/workspace/Lib/rave.py