eynuel / ctraceo Goto Github PK
View Code? Open in Web Editor NEWAn Underwater Acoustic Raytracing Model. Check our wiki for more information
Home Page: http://eynuel.github.com/cTraceo/
License: Other
An Underwater Acoustic Raytracing Model. Check our wiki for more information
Home Page: http://eynuel.github.com/cTraceo/
License: Other
################################################################ ## ## ## The cTraceo Acoustic Raytracing Model ## ## ## ################################################################ ## Website: ## ## https://github.com/EyNuel/cTraceo/wiki ## ## ## ## License: This file is part of the cTraceo Raytracing Model ## ## and is released under the Creative Commons ## ## Attribution-NonCommercial-ShareAlike 3.0 Unported ## ## License (CC BY-NC-SA 3.0) ## ## http://creativecommons.org/licenses/by-nc-sa/3.0/ ## ## ## ## NOTE: cTraceo is research code under active development.## ## The code may contain bugs and updates are possible## ## in the future. ## ## ## ## Written for project SENSOCEAN by: ## ## Emanuel Ey ## ## [email protected] ## ## Copyright (C) 2011, 2012 ## ## Signal Processing Laboratory ## ## Universidade do Algarve ## ## ## ## cTraceo is the C port of the FORTRAN 77 TRACEO code, ## ## written by: ## ## Orlando Camargo Rodriguez: ## ## Copyright (C) 2010 ## ## Orlando Camargo Rodriguez ## ## [email protected] ## ## Universidade do Algarve ## ## Physics Department ## ## Signal Processing Laboratory ## ## ## ################################################################ ################################################################ ## Contents: * Features * Software Requirements * Makefile Configuration * Compilation & Installation * Matlab Configuration & Examples * License Notes. ################################################################ ## Features: # Range dependent altimetry/bathymetry including range dependent elastic properties (Compressional and shear wave speeds, density, as well as compressional and shear attenuation); # Range dependent sound speed fields; # Support for user-defined smooth objects within waveguide (like rocks, marine mammals, submarines); # Full suppport for backscattering (from altimetry/bathymetry or objects); # Allows free positioning of acoustic source and receivers (altimetry/bathymetry as well as objects and receivers may be positioned behind the source for modelling complex waveguides); # Support for horizontal, vertical, rectangular and arbitrarily shaped receiver arrays (allows modelling unusual array shapes, multiple arrays as well as array distortions); # Output options: ray trajectories and amplitudes, eigenray search (with user-definable proximity threshhold), arrival patterns, acoustic pressure, coherent transmission loss, as well as particle velocity components (for modelling vector sensors). # Outputs are written to .mat files (does not require Matlab(R) for compilation/usage) ################################################################ ## Software Requirements # Matlab (Optional) This software generates Matlab .mat-files as output, and provides 2 methods for writing these files. 1 - Linking with Matlab(R) libraries during compilation. 2 - Using a set of internal functions. Option 2 is now the recommended method and is enabled by default. Although it is still possible to fall back to option 1 this requires some extra configuration, is only supported on Linux and requires a Matlab(R) License to be available. # Compiler Support cTraceo requires a C Compiler compatible with the ISO C99 Standard. This is mostly due to the need for complex (Imaginary) Math. * The GNU C Compiler GCC fully supports the ISO C99 standard as of version 4.5. The 4.3.x and 4.4.x versions partially implement the C99 standard and although warnings related to imaginary math may be generated, the code is compiled successfully. Successfully tested with versions 4.4.4 and 4.4.5 on Linux as well as with version 4.5.3 on Windows (using Cygwin) * Clang - LLVM C Language Frontend The Clang compiler is the compiler used for development of the cTraceo Model. Successfully tested with versions 2.8 and 2.9 on Linux. * MS Visual Studio No version of Microsoft's Visual Studio C Compiler supports the ISO C99 Standard, so compilation should not be possible. Not tested. ################################################################ ## Makefile Configuration To compile this model the user may have to adapt the included makefile to match the target system. Although the options in the Makefile are mostly self- -explanatory, a brief overview will be presented here: # The "CC" variable Defines which command to invoke for compilation. # The "OS" Variable: Defines for which operating system to compile. # The "ARCH" variable This is used to define whether to compile for 32 bit or 64 bit systems. # The "USE_MATLAB" variable When compiling cTraceo on Linux it is possible to choose between using Matlab or the internal functions to write the result files. If in doubt, leave at "0". Note that linking with matlab is only supported in linux. # The "MATLAB_DIR" variable This variable should contain the base directory of the system's Matlab(R) installation. This is needed when linking with Matlab for writing .mat files, and is only possible on Linux. # The "MATLAB_VERSION" variable As different versions of Matlab require different variable types for calling library functions, this option is required for selecting the appropriate types. ################################################################ ## Compilation and Installation # Linux After the options descibed in "Makefile Configuration" have been defined, just run: $> make This will compile the model and place a binary named "ctraceo" in the "bin/" subdirectory. # Windows To compile cTraceo on windows, several steps are required: * Download and install Cygwin from www.cygwin.com. Cygwin provides basic linux build tools (like 'make') for windows. When installing Cygwin packages, select the following packages: "devel > gcc4" "devel > make" Several other packages will be installed for dependencies. * Add "c:/cygwin/bin" to your system's PATH environment variable. * Open Cygwin. A command line will appear. This command line provides an interface similar to Linux, and allows for easy compilation of the model. In Cygwin, navigate to location which contains cTraceo's source code; this will look similar to: $> cd /cygdrive/c/Users/username/Documents/models/cTraceo * Run: $> make If all goes well, this will produce an executable called "ctraceo.exe" in the "bin/" subdirectory which can now be used like any other windows executable. ################################################################ ## Matlab Configuration & Example Cases Several example cases are contained in the "examples/" subdirectory. These examples depend on matlab functions contained in the "M-Files/" subdirectory and as such this folder should be added to the matlab path. Within the provided example files the model is invoked by calling the command "ctraceo", and thus the "bin/" folder containing the compiled cTraceo binary should be on the system's PATH. ################################################################ ## License Notes The cTraceo Raytracing Model is released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) http://creativecommons.org/licenses/by-nc-sa/3.0/ Below, a short, "human readable" version of the software license is shown. Read the attached "license.txt" file for the full text of the license. ---------------------------------------------------------------- In Short: You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution — You must attribute The cTraceo Raytracing Model to SiPLAB (with link to http://www.siplab.fct.ualg.pt/) Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. With the understanding that: Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights — In no way are any of the following rights affected by the license: # Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; # The author's moral rights; # Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to: http://creativecommons.org/licenses/by-nc-sa/3.0/
Currently cTraceo.c calls the function corresponding to the selected output option [(calcRayCoords(), calsAllRayInfo(), etc ] which in turn does the memory allocation. In the OpenCL version this allocation has been moved up a level (ie. into cTraceo.c) to remove code redundancy.
The client should read input files and send them to the server in the form of a settings struct (using sockets?).
The server:
Q: Should the server write the results to a file or send them back to the client?
A: Probably best to send back to client
Client may optionally handle a pool of servers and keep 2nd queue of tasks:
Actually, instead of putting all this functionality into the client, keep the client simple (only does dispatching and receiving of results) and write a 3rd program for load balancing called poolManager
Using stable version 1.3
The structures eigenrays.eigenray(n).refrac_r and eigenrays.eigenray(n).refrac_z do not seem to be filled-in correctly. In an example I ran where 11 eigenrays were found to the receiver, the structures were filled for ray number 1 only and were the wrong ones, corresponding to ray number 11. It seems that what happens is that the correct refraction points for the last ray are filed in only in the structure for the first ray.
when doc/ directory isn't present, te following error occurs when running make:
$ make
find: `doc': No such file or directory
find: `doc': No such file or directory
find: `doc': No such file or directory
find: `doc': No such file or directory
Building cTraceo 1.3 with standard options -run 'make help' for more information.
The is to figure out if assigning a specific interpolation function to a pointer at the beginning of the program will improve performance over the current state which is to use if-else/switch blocks in csValues.c. As this function is one of the program's most called, this may have quite an impact.
only needs to add the bin/ctraceo binary to the path.
What's the best distribution independent method for adding a a directory to the PATH?
The coherent acoustic pressure (and thus transmission loss and particle velocity which depend on it) is incorrectly calculated with high numbers of rays.
With increasing number of rays, the pressure at hydrophones near the source is incorrect. The higher the number of rays, the further away from the source hydrophones are affected.
The "Thresshold" for correct output seems to be around 500 rays.
A single precision version was developed as a first step for the OpenCL version.
Although this is already available, it corresponds to the 1.0.1 version of cTraceo.
New functionality needs to be ported to SP.
Rs == rbox1 causes segfault
As many [Bellhop] users will likely run something like Rs = 0 and use a rangebox of [0, Rmax]
I consider this to be a major usabilty bug as the user has no way of knowing what causes the segfault.
To make it easy, fast and convenient to do. This would also keep m-files describing waveguides cleaner.
This function might be called drawwaveguide() and should take the same data structure as wtraceoinfile().
As a new feature, maybe extend the model to consider multiple bottom layers rather than the single halfspace layer that it currently treats
For example:
if surface_data.type is nonelastic, allow omitting:
surface_data.ptype = '''H'''; % Homogeneous (or NonHomogeneous)
surface_data.units = '''W'''; % (Attenuation Units) dB/Wavelenght
surface_data.itype = '''FL'''; % Sea surface interpolation type
surface_data.properties = [0 0 0 0 0]; % Dummy values
Same for bottom properties
To make simple waveguides simple to describe. This way early examples become easier to understand for new users, plus a lot of unnecessary clutter gets removed from m-files.
also see issue #11
Although different people plot the same data in different ways, this would provide a fast way of previewing results.
Currently a Python script exists which performs this task although it's still somewhat buggy.
This should be completed/fixed and added to the code base.
"bracket()" successively searches an ordered vector of numbers for a value's index using a bisection method.
Bisection of a vector to find an element is almost never optimal.
the "hunt" method stores the last found element's index and resumes searching from there, thus offering large time savings when searching for values which are close to another..
Please have a look at the values of the number of top and bottom reflections as they dont comply with the rays plotted.
Best Regards
Bellhop does something similar.
Bounce computes an interface's equivalent reflection coefficient for a multilayer bottom and generates an output file which can then be included in Bellhop.
File seems to contain a complex number for each bathymetry point -I'm assuming this is simply the interfaace's reflection coeff as computed internally by both cTraceo and Bellhop.
To ensure a better "out of the box" experience, examples should work without change from the user.
By adding
addpath('../M-Files/');
addpath('../bin/');
to the M-Files located in the 'examples/' subdirectory, the examples should work for all users without requiring change.
This is part of the work for a paper on backscattering issues.
This option allows for comparing results with and without modeling backscattering.
Let's implement it as a command line switch:
--killBackstatteredRays
[see example isovelocity_cpr_lry.m]
pressure is stored as a 16x16 array when it should in fact be a 16 element vector.
running the same case with CTL instead of CPR yields the expected result.
Although the model generates it's output as .mat files, this file format can be read by many different applications.
It would be interesting to have examples for applications other than Matlab, specifically one written in Python.
Cases:
a) run an RCO case and plot the results.
b) generate a channel's impulse response.
cTraceo uses a RKF45 method to integrate the ray paths.
The rk5 output is being used. This is an error, as the rk4 should be used -rk5 is only computed to estimate the precision of the current interpolation step.
Currently, cTraceo's output file names depend on the output option specified, ie:
rco.mat
eig.mat
cpr.mat
pvl.mat
pav.mat
Often it is useful to have the ability to specify one's own output file name - the command line option --outputFile <filename>
should be implemented to allow specifying one.
currently there is a call of the type matfile = matOpen(settings->options.outputFileName, "u");
in every calculation function.
This is redundant code and sometimes results in a file being opened and closed several times.
This will require adding outputFileName
to the settings.options
structure.
The rarray
and zarray
variables were renamed to arrayR
and arrayZ
.
All M-Files should be adapted corespondingly.
This script should:
Notes:
Emanuel, I noticed that there is a small bug in seikeq.for: ray coordinates are linearly interpolated at the box limits but travel times are not. Thus, travel time information is fine but at the last ray point. I guess that the C equivalent of seikeq.for has the same problem. This is hard to spot but generates wrong results when a timefront is to be calculated.
Cheers
Orlando
Occurs when running isovelocity_ari.m with ERF output option.
Eigenrays are determined, and individual eigenray counters like eigenrays(i,j).nEigenrays
are correct,
but the total number of eigenrays is 0.
This has been done in the OpenCL version to simplify the code.
Also, the resulting merged function has been renamed into getRayPressureContribution().
--ssp will only interpolate the first sound speed profile (at r=rbox1).
This is perfectly ok for sound speed profiles, but sound speed fields should also be supported.
Either:
a) output is as square 2D mxArray, or
b) add another command line option to specify nPointsR and anPointsZ
This is due to the fact that whn computing eigenrays by RF, the last ray coordinate is exactly on the rBox limit. Thus certain gradients which are computed from the current+next ray coordinates can not be computed at the last coordinate.
Thanks to Ronan for reporting this.
Currently, the model takes the command line option '--ssp '.
This option will create a vector containing the sound speed profile as interpolated by the model, ie,
the ssp which is used internally by the model.
This array is saved as 'ssp.mat'.
let's implement a command line option --sspFileName to store this data in a differently named file.
This no longer has to be according to the siplab template.
Title should be "The cTraceo Acoustic Raytracing Model - User Manual"
@Manual{cTraceoManual,
title = "The cTraceo Acoustic Raytracing Model - User Manual",
author = "Emanuel Ey and Orlando C. Rodriguez",
organization = "Signal Processing Laboratory, Universidade do Algarve",
month = "January",
year = "2012",
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.