DR C++/Python library
Project description
Snoopy library
Documentation and tutorials : https://bv-dr.gitlab.io/Snoopy/
Snoopy is an open source library for marine applications. Among other things, it contains the following sub-packages
Spectral : Routines for spectral analysis of sea-keeping results
Wave spectra (Jonswap, Ochihubble, spreading function…)
Manipulation of transfer function (RAOs)
Response spectrum
2nd order response spectrum
TimeDomain
Reconstruction of seakeeping results in time domain (1st and 2nd order)
Convolution for wave radiation in time domain (from added-mass).
Fatigue
Rainflow counting
Spectral fatigue
Meshing
WaveKinematics : (Linear, wheeler stretching, 2nd order…)
Example of use
>>> from Snoopy import Spectral as sp
>>> spec = sp.Jonswap( hs = 1.0 , tp = 10.0 , gamma = 1.0)
>>> spec.plot()
How to install from pre-compiled library
Pre-compiled wheel package can be installed with :
pip install snoopy_bv-1.3.0-cp39-cp39-win_amd64.whl --no-deps
or, to upgrade (as version number is not always changed) :
pip install snoopy-bv --force-reinstall --no-deps
In case conda is used, it is recommended to install dependencies using conda (hence the –no-deps in above command line):
conda install --file requirements.txt
How to build from sources
Create a build folder, for instance “build”
Run cmake
go in “build” directory and run :
cmake .. -G"CodeBlocks - MinGW Makefiles"
Compile
mingw32-make.exe -j10
How to use in develop mode
To install in “developer mode” (uses current sources, does not copy in python environment) :
pip install -e C:\path_to_snoopy_location
How to install
to install in python environment :
pip install pathToRootfolder
How to package
The folder containing the .pyd should be in the SNOOPY_PYD environement variable
python setup.py bdist_wheel
How to install on Linux (tested with Ubuntu 20.04 with bash terminal)
clone in the folder snoopy_dev (using snoopy as name may cause problems)
git clone https://mar-gitlab.bureauveritas.com/applications/dr/snoopy.git snoopy_dev
compile the code in a build directory
cd snoopy_dev/Snoopy
mkdir build
cd build
cmake ..
make -j 10
install the package
cd ../..
pip install .
To install in develop mode:
pip install -e .
Dev notes:
Commit message
[FUN] : New feature
[ENH] : Enhancement of existing code
[BUG] : Bug correction, [BBUG] for really BIG BUG (with consequences in case of use…)
[QLT] : Quality (Comments, removal of dead code…)
[FIX] : Correction of compiling issue
[DAT] : Data added or modified
[DOC] : Document added or modified
[TEST] : Test added or modified
[INI] : Initial commit.
The subpackage should be mentioned after this Flag. For instance :
[ENH] TimeDomain : Performance optimization of ReconstructionRaoLocal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for snoopy_bv-1.3.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 500a2cded837b71994654ec2541bad8b78086f4d4ee4cbffbe0bdc84f39d3822 |
|
MD5 | a3c7252f94f3f5ef954a23bca853e5ae |
|
BLAKE2b-256 | 4323c446f20d59ef00bc8a39ea9a1e13aa8414f304253e2d620d80608ac37e67 |
Hashes for snoopy_bv-1.3.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc5c668bdc44a53f838bebc5e29b203ebe473385ee712f1c398f278298dfab2 |
|
MD5 | f54a50a983812a398135b3c6028a2d1b |
|
BLAKE2b-256 | 50256ed711f4e74b32e3d9e2b60b0eb4824d7b92ea5b86f2ab7fbaa4fd92b01a |
Hashes for snoopy_bv-1.3.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb2e5c09917c144dace15817297b53f78b4295a2fb60d4801036527de4ec495 |
|
MD5 | 40620289bc5c1974ec43a1899fa6eef8 |
|
BLAKE2b-256 | 6afc095e34c5311a0c91ebfede68536720dfe699d700dcfac8510197857d5948 |
Hashes for snoopy_bv-1.3.4-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b25b86f94f23404917dcb03d8ce95e2a100fd1f530534dbd3770b826aa59d7 |
|
MD5 | 3a6d1c357a39106e95182d9e1d3c3b5c |
|
BLAKE2b-256 | e82846e6eed1722b0e676f9d98252db4a4b22c86fcadc8c2329d3016269b9c13 |