agrifoodpy.utils.scaling ======================== .. py:module:: agrifoodpy.utils.scaling .. autoapi-nested-parse:: Scaling utilities module Functions --------- .. autoapisummary:: agrifoodpy.utils.scaling.logistic_scale agrifoodpy.utils.scaling.linear_scale Module Contents --------------- .. py:function:: logistic_scale(y0, y1, y2, y3, c_init, c_end) Create an xarray DataArray with a logistic growth interval :param y0: (int) The initial year. :param y1: (int) The year when the values start to transition. :param y2: (int) The year when the transition completes. :param y3: (int) The final year. :param c_init: (float) The initial constant value. :param c_end: (float) The final constant value. Returns: xarray DataArray An xarray DataArray object with 'year' as the coordinate and values set by a logistic growth between the user defined intervals. .. py:function:: linear_scale(y0, y1, y2, y3, c_init, c_end) Create an xarray DataArray with a single coordinate called 'year'. The values from the first year 'y0' up to a given year 'y1' will be constant, then they will vary linearly between 'y1' and another given year 'y2', and from 'y2' until the end of the array 'y3', the values will continue with a constant value. :param y0: (int) Starting year. :param y1: (int) Year where the linear variation starts. :param y2: (int) Year where the linear variation ends. :param y3: (int) Last year in the array. :param c_init: (float) Value to use for initial constant scale segment. :param c_end: (float) Returns: xr.DataArray An xarray DataArray object with 'year' as the coordinate and values set by a linear growth between the user defined intervals.