omfit-google-sheet 2020.12.2.22.59
omfit_google_sheet
Requires Python: >=3.6

**GOOGLE_SHEET** files used as part of the OMFIT project: https://omfit.io/

Provides:
=========
* OMFITgoogleSheet
* OMFITexperimentTable

Requires:
=========
* matplotlib>=3.1,!=3.2.1,!=3.2.2
* numpy>=1.12
* scipy>=1.0
* uncertainties>=3
* xarray>=0.10.8
* omfit_mds==2020.12.2.22.59
* omfit_data==2020.12.2.22.59
* omfit_base==2020.12.2.22.59
* omfit_commonclasses==2020.12.2.22.59

Authors:
=========
https://omfit.io/contributors.html

Documentation:
==============
OMFITgoogleSheet
----------------

    Connects to Google sheets and provides some convenience features

    * Lookup columns by column header name instead of column number

    * Local caching to allow repeated read operations without too many connections to the remote sheet.

    * Throttle to avoid throwing an exception due to hitting Google's rate limiter,
      or pygsheet's heavy-handed rate limit obedience protocol.

    An example sheet that is compatible with the assumptions made by this class may be found here:
    https://docs.google.com/spreadsheets/d/1MJ8cFjFZ2pkt4OHWWIciWT3sM2hSADqzG78NDiqKgkU/edit?usp=sharing

    A sample call that should work to start up an OMFITgoogleSheet instance is:
    >>> gsheet = OMFITgoogleSheet(
    >>>     keyfile=os.sep.join([OMFITsrc, '..', 'samples', 'omfit-test-gsheet_key.json']),
    >>>     sheet_name='OmfitDataSheetTestsheet',
    >>>     subsheet_name='Sheet1',  # Default: lookup first subsheet
    >>>     column_header_row_idx=5,  # Default: try to guess
    >>>     units_row_idx=6,  # Default: None
    >>>     data_start_row_idx=7,  # Default: header row + 1 (no units row) or + 2 (if units row specified)
    >>> )
    This call should connect to the example sheet. This is more than an example; this is a functional call
    that is read out of the docstring by the regression test and testing will fail if it doesn't work properly.
    

OMFITexperimentTable
--------------------

    Extends OMFITgoogleSheet by assuming each row corresponds to a shot, allowing more features to be provided.

    This is less general (now Shot must exist), but it may be more convenient
    to look up data by shot this way. With more assumptions about the structure
    of the sheet, more methods can be implemented.

    Many methods go further to assume that there is a column named 'Device' and
    that there are two columns that can be used to determine a time range. Parts
    of the class should work on sheets without this structure, but others will
    fail.

    An example sheet that is compatible with the assumptions made by this class may be found here:
    https://docs.google.com/spreadsheets/d/1MJ8cFjFZ2pkt4OHWWIciWT3sM2hSADqzG78NDiqKgkU/edit?usp=sharing

    A sample call that should work to start up an OMFITgoogleSheet instance is:
    >>> xtable = OMFITexperimentTable(
    >>>     keyfile=os.sep.join([OMFITsrc, '..', 'samples', 'omfit-test-gsheet_key.json']),
    >>>     sheet_name='OmfitDataSheetTestsheet',
    >>>     subsheet_name='Sheet1',  # Default: lookup first subsheet
    >>>     column_header_row_idx=5,  # Default: try to guess
    >>>     units_row_idx=6,  # Default: search for units row
    >>>     data_start_row_idx=7,  # Default: find first number after the header row in the shot column
    >>> )
    This call should connect to the example sheet. These data are used in regression tests and should be updated
    If the test sheet is changed.