lmfit2

lmfit2 is a GPLv3 licensed implementation of the First-Principles Fitting Methodology (FPFM) algorithm described in Statistically Self‐Consistent and Accurate Errors for SuperDARN Data. This algorithm was specifically developed for fitting SuperDARN “rawacf” data, but the principles used to develop the algorithm are broadly applicable to parameter extraction via fitting models to data. lmfit2 was written in two different languages, C and Python. We recommend that you use the C version. These pages will show you how to use lmfit2.

This documentation will not teach you much about how to fit data, but there are many good resources on this topic already available (try numerical recipes, specifically the chapter on modeling data). We also published a paper explaining the FPFM algorithm and implementation in detail.

lmfit2 fitted data was used in a study identifying ULF waves in SuperDARN data and it is being developed on GitHub.

https://img.shields.io/badge/GitHub-asreimer%2Flmfit2-blue.svg https://img.shields.io/badge/License-GPLv3-blue.svg

Basic Usage

For the C version, if you want to fit a rawacf file (in dmap format), you would do something like this:

make_lmfit2 -new yyyymmdd.hhmm.rawacf > yyyymmdd.hhmm.lmfit2

For the python version, with lmfit2.py in the working directory, you would do something like this:

from lmfit2 import main
main(yyyymmdd.hhmm.rawacf,yyyymmdd.hhmm.lmfit2)

How to Use This Guide

First, you need to install lmfit2. Luckily for you there’s a handy Installation guide to help you.

Next, you can try using lmfit2 as explained above in the Basic Usage section.

Perhaps some tutorials will be added to this guide in the future! If you would like this to happen, or you have bug reports, patches, feature requests, and/or other comments, please submit them to the GitHub issue tracker.

If you have a question about the use of lmfit2, please post it to the issue tracker.

License & Attribution

Copyright 2016-2020 Ashton S. Reimer.

lmfit2 is free software made available under the GPLv3 License. For details see the LICENSE.

If you make use of lmfit2 in your work, please cite our paper (Radio Science, ADS, BibTeX)

Changelog

1.0 (2018-05-12)

  • Initial full release of code since Radio Science publication
  • Included unit testing for C and python versions
  • Some bug fixes to the python version to bring it up to date with C version