Help on module charistools.hypsometry in charistools:
NAME
charistools.hypsometry
FILE
/Users/brodzik/.conda/envs/pmesdr/lib/python2.7/site-packages/charistools/hypsometry.py
CLASSES
Hypsometry
class Hypsometry
| The Hypsometry class will read(write) CHARIS hypsometry data
| from(to) ASCII files. The populated object will contain the
| comments from the beginning of the file, and a pandas
| DataFrame.
|
| 2014-09-24 M. J. Brodzik brodzik@nsidc.org 303-492-8263
| National Snow & Ice Data Center, Boulder CO
| Copyright (C) 2014-2015 Regents of the University of Colorado at Boulder
|
| Methods defined here:
|
| __init__(self, filename=None, comments=[], data=Empty DataFrame
| Columns: []
| Index: [], verbose=False)
| from charistools import hypsometry
|
| hyp = hypsometry.Hypsometry(comments=[], data=pd.DataFrame(),
| filename=None, verbose=False)
|
| Initializer for a CHARIS hypsometry object
|
| filename : filename to open and read from
| comments : list of strings
| data : pandas DataFrame with elevations in columns and dates in rows
| index can be [None] for undated data, or
| should be a pandas.tseries.index.DatetimeIndex for dated
| contents
|
| append(self, elevation, modice, contour_m=100.0, min_contour_m=None, max_contour_m=None, verbose=False)
| hypsometry.append(elevation, modice, contour_m=100.,
| min_contour_m=None,
| max_contour_m=None,
| verbose=False)
|
| Returns hypsometry object, with one row of MODICE area by the requested
| contour levels.
|
| Parameters
| elevation : ndarray
| raster with elevations in meters
| modice : ndarray, same size as elevation
| modice=2 for landice
| contour_m : value, default 100. m
| contour interval in meters
| min_contour_m : value, default None
| bottom of lowest contour interval, in meters
| if None, determine it from elevation data
| max_contour_m : value, default None
| top of highest contour interval, in meters
| if None, determine it from elevation data
| verbose : Boolean, default=False
|
| Example:
| from charistools import hypsometry
| hyps = hypsometry.Hypsometry(comments=['Hypsometry for MODICE from file.'])
| # Set elevation and modice raster ndarrays
| # Assumes elevation array is in meters
| # Assumes modice value for landice is 2
| hyps.append( elevation, modice )
|
| Returns hypsometry object, with one row MODICE area by the requested
| contour levels.
|
| data_by_doy(self, verbose=False)
| from charistools import hypsometry
| hyps = hypsometry.Hypsometry(filename='filename.txt')
| doy_series = hyps.data_by_doy()
|
| Returns a Series object, with the hypsometry data, summed by row (doy).
|
| read(self, filename, verbose=False)
| from charistools import hypsometry
| hyps = hypsometry.Hypsometry()
| hyps.read( filename, verbose=False )
|
| Reads elevation by date hypsometry data from filename into a pandas
| DataFrame.
|
| Assumes file format:
| 1) 0 or more comment lines, beginning with '#'
| 2) XX number of elevation bands
| 3) lower bounds of each elevation band
| 4) Data records by date
|
| write(self, filename, decimal_places=6, verbose=False)
| Writes elevation by date hypsometry data to filename,
| formatted for use with either CHARIS IDL or python
| modelling software. See hypsometry.read for file format
| description.
|
| from charistools import hypsometry hyps =
| hypsometry.Hypsometry(comments=['first','second'])
| hyps.write( filename, verbose=False )
|
| If object comments do not begin with '#', then they will
| be prepended by this character in the output file.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| comments = []
|
| data = Empty DataFrame
| Columns: []
| Index: []
DATA
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0)...