Skip to content

Converts SnowMicroPen pnt files into csv/png products, with methods for estimating snow microstructure properties.

License

Notifications You must be signed in to change notification settings

mjsandells/SMP_to_CSV

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMP_to_CSV

Converts SMP measurement files (*.pnt) into CSV containing all data points (Depth and Penetration Force) plus a multi-line header containing time, latitude, longitude and other site-specific information. A depth/force profile quicklook is also generated as a PNG file.

Disclaimer

The SMP class methods retrieve_header, extract_data and general function xcorr are from the excellent SnowMicroPyn tool by Sascha Grimm. SnowMicroPyn is licensed under the GNU General Public License version 3.0 (GPLv3).

The detect_peaks and associated _plot helper functions are from the Biomechanics and Motor Control repo by Marcos Duarte. BMC is licensed under the MIT Licence

Requirements and Usage

Assumes you have Python 2.7 installed with pip, numpy, scipy, pandas and matplotlib modules

Option A: Importing the SMP class definition

Make a local clone of this repo, navigate to where it is located and run the following command to add the module to your current python environment:

pip install .

You should now be able to import the SMP class in a python interpreter or script using the following:

from snowmicrotoolset import SMP

Option B: Running the tool standalone

  1. Create two folders indata and outdata in the same directory as snowmicrotoolset/__init__.py

  2. Put the SMP measurement files (*.pnt) into the indata folder

  3. Run the snowmicrotoolset.py script from the same directory where indata and outdata are located.

From Windows command line:

python __init__.py
  1. All output CSV/PNG files will be sent to the outdata folder

License

This dataset is licensed under the Open Government License of Canada and is subject to the Copyright Act of Canada. Additional information can be found at the Government of Canada's Open Government portal

About

Converts SnowMicroPen pnt files into csv/png products, with methods for estimating snow microstructure properties.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%