Metadata-Version: 2.1
Name: gxscalc
Version: 0.0.4
Summary: A Python package for speed-based calculation of F-ZERO GX.
Home-page: https://github.com/cycloawaodorin/gxscalc
Author: KAZOON
Author-email: cycloawaodorin+pypi@gmail.com
Maintainer: KAZOON
Maintainer-email: cycloawaodorin+pypi@gmail.com
License: UNKNOWN
Description: # Gxscalc
        
        This is a Python package for speed-based calculation of F-ZERO GX.
        
        ## Requirements
        
        This package requires pandas and matplotlib.
        Also, speed data files created by [my AviUtl plugin](https://github.com/cycloawaodorin/fzgx_smr_ks) are required as input.
        
        ## Installation
        
        Gxscalc is available on PyPI:
        
            $ python -m pip install gxscalc
        
        ## Usage
        
        ```python3
        from gxscalc import mtp
        
        mtp('./sample/sa70_on.txt', './sample/sa70_off.txt') #=> (1224.330134264905, -2.4656191600475066)
        ```
        
        ### `gxscalc.mtp(on, off, *, std=5, rng=10, return_dataframes=False)`
        Calculate the approximated MT point from two speed data files of deceleration.
        The accuracy compared to [Naegleria's spreadsheet](https://docs.google.com/spreadsheets/d/1kyl0kAi_-NaM9RCPIwThixogTYESL4zdpmbbH_qDlmI/edit#gid=0) is within about 3 km/h.
        
        <dl>
         <dt><code>on</code>: str</dt>
          <dd>File path of speed data for deceleration while going on the accelerator.</dd>
         <dt><code>off</code>: str</dt>
          <dd>File path of speed data for deceleration while going off the accelerator.</dd>
         <dt><code>std</code>: numeric</dt>
          <dd>Standard deviation of gaussian window for moving average.</dd>
         <dt><code>rng</code>: numeric</dt>
          <dd>Values farther than <code>std*rng</code> will not be used for moving average.</dd>
         <dt><code>return_figure</code>: boolean</dt>
          <dd>If this is true, mtp() returns figure of speed vs moving averaged acceleration graph as optional output.</dd>
         <dt>returns: (float, float, [matplotlib.figure.Figure, matplotlib.axes.Axes])</dt>
          <dd>Returns the tuple of (MT point [km/h], Acceleration at MT point [km/h/f]). If <code>return_dataframes</code> is <code>True</code>, returns (MT point, Acceleration at MT point, <code>Figure</code> of the graph, <code>Axes</code> of the graph) instead.</dd>
        </dl>
        
        ### `gxscalc.distance(file, fps=60)`
        Calculate the approximated travelled distance of given speed data file via trapezoidal rule.
        The unit of input speed is km/h and the unit of output length is m.
        
        <dl>
         <dt><code>file</code>: str</dt>
          <dd>File path of speed data to be calculated.</dd>
         <dt><code>fps</code>: numeric</dt>
          <dd>The reciprocal of time between the adjacent speed values, in seconds.</dd>
         <dt>returns: float</dt>
          <dd>Returns the travelled distance in meter.</dd>
        </dl>
        
        
        ## Notice
        
        The input speed data files are assumed to be created by [my AviUtl plugin](https://github.com/cycloawaodorin/fzgx_smr_ks).
        The files should include frame numbers and separators should be spaces (default settings of the plugin).
        './sample/sa70_on.txt' and './sample/sa70_off.txt' are sample input files, which are data of Space Angler at 70%.
        
        ## Contributing
        
        Bug reports and pull requests are welcome on GitHub at https://github.com/cycloawaodorin/gxscalc.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
