Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 3.25 KB

CONTRIBUTING.md

File metadata and controls

48 lines (37 loc) · 3.25 KB

Contributing to irfu-matlab

👍🎉 Thank you kindly for taking the time to contribute, it is much appreciated! 🎉👍

The following is a set of guidelines for contributing to irfu-matlab, which is hosted on GitHub.com

These are mostly guidelines, in other words they are not rules or laws or government regulations (myndighetsföreskrifter in Swedish). Use your best judgment, and feel free to propose changes to this document in a pull request. If you are about to make any pull requests please request a merge to our devel branch, and in time these changes will propagate to our master branch when we are ready for a new release of irfu-matlab.

If working on a special development branch (e.g. MMSdevel), make sure to merge all the code from our latest devel branch on a semi-regular basis to help avoid merge conflicts if for some reason the code is changed in both branches.

Coding style

  1. According to Matlab Style Guidelines
  2. Help follows matlab style, see irf_template.m
  3. Matlab code files checked for possible problems, using checkcode
  4. For new code written, use only two spaces as indentation.

Git

  1. Workflow according to https://nvie.com/posts/a-successful-git-branching-model/
  2. Routines in master branch should do not less and not more than written in their help!
  3. Our devel branch includes latest delivered development changes for the next release.
  4. Semantic release numbering https://semver.org/
  5. Write clear and useful git commit messages https://chris.beams.io/posts/git-commit/

Common data types

Data type Comment
DataObject The same as dataset in CAA, equal to cdf file representation in Matlab.
TSeries TSeries class object, with useful methods for time series data.
VariableStruct Structure including all variable data in original format and metadata,
usually extracted from DataObject
VariableIrf Variable as a simple structure in a default format for irfu-matlab, where:
Variable.t - TimeArray
Variable.[data] - data matrix of dimension [t x dim1 x dim2]... (typical example energy spectrograms)
Variable.[unit,label,dimunit,dimlabel,dimvec]
Variable.[vec] - data matrix of dimension [t x ndim], (for example ndim=3 for field vector)
Variable.[abs] - absolute value of vector in case exists Variable.vec
VariableMat Matrix where first column is time and the other columns are data [DEPRECATED]

Time

The following time types are to be used:

  • EpochTT (prefered). GenericTimeArray class with epoch internaly given in TT2000
  • EpochUnix
  • CDF epoch TT2000 in nanoseconds (int64)
  • UNIX epoch in seconds
  • CDF epoch in microseconds
  • CDF epoch16