Giter VIP home page Giter VIP logo

baseflow's People

Contributors

mgcooper avatar

Stargazers

 avatar  avatar

Watchers

 avatar

baseflow's Issues

Method `fitcts` fails

Describe the bug
baseflow.fitevents fails in subfunction saveFit because none of the individual event times tH computed in preparefit are members of the complete input timeseries eventTime.

To Reproduce
Steps to reproduce the behavior:

  1. Open `baseflow_demo_1.mlx
  2. Set opts.fitevents.derivmethod = 'CTS';
  3. Run the demo, specifically Step 2: [EventFits, FitsTable] = baseflow.fitevents(EventData, opts.fitevents);
  4. See error

Expected behavior
All values in the individual event time should be contained in the full event time vector eventTime.

K-S stat different on R2021b leads to different Pareto fit to \tau than other matlab releases

Describe the bug
The K-S stat calculation and resulting Pareto distribution fit is different on R2021b than other matlab versions, all else equal, using the bfra_kuparuk.mlx example.

To Reproduce
Steps to reproduce the behavior:

  1. Type dbstop in bfra.plfitb at 68 in a matlab command window or open bfra.plfitb and place the dbstop
  2. Run the example in demos/bfra_kuparuk.mlx on Matlab R2021b and any other of the following releases: R2020b, R2022b
  3. When the code enters debug mode on line 68, evaluate line 68 and plot the K-S stat (variable D)
  4. Repeat in R2020b
  5. Alternatively, step into the function bfra.deps.plfit when in debug mode on line 68 of bfra.plfitb and run the code that computes the k-s stat and plot the result.

Expected behavior
The K-S stat should be identical leading to identical Pareto distribution fits to the example data in bfra_kuparuk.mlx

Screenshots
R2021b (y-axis is K-S stat):
image

R2020b (same as R2022b):
image

Desktop (please complete the following information):

  • OS: macos
  • Version 12.6.3

Additional context
Mainly relevant for replicating the results in bfra_kuparuk.mlx (and Cooper et al. 2023) but if you are conducting analysis in R2021b, results may be affected by this.

fitvts fails due to "duration" type used for dt

Describe the bug
baseflow.getdqdt errors with derivmethod=VTS due to the use of the "duration" type in private/fitvts.m when computing dt.

To Reproduce

  1. Run 'baseflow_demo_1.mlx'
  2. See error

Expected behavior
The time vector should be a datenum, thus dt should be of class double not duration.

Desktop (please complete the following information):

  • OS: macOS

Add demo comparing dQ/dt methods `CTS`, `VTS`, and `ETS`

Is your feature request related to a problem? Please describe.
The benefit of VTS and ETS is not currently communicated in any demos. This will also ensure that these methods do not produce errors as the toolbox is developed using ets as the default method.

Describe the solution you'd like
Add a demo as described. Show how the horizontal striping in the point cloud plot can be used to guide the choice of vtsparam. For the demo data, compare 1000, 10000, and 100000. See how the fit changes at 1e5.

Describe alternatives you've considered
Add a test.

Add a demo for `baseflow.fitab`

Is your feature request related to a problem? Please describe.
Simple usage to estimate parameters a and b using baseflow.fitab is not currently demonstrated by any demos.

Describe the solution you'd like
Add a demo showing how to use baseflow.fitab to estimate these parameters from a single or just a few recession timeseries.

Describe alternatives you've considered
n/a

Additional context
n/a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.