BLEND is a library and collection of command-line programs for localizing functions using arbitrarily shaped support on the regular Cartesian grid. Applications include filter design and the synthesis (or merging) of multidimensional models and datasets (e.g., Ajala & Persaud, 2021, 2022, and Ajala et al. 2025).
Full documentation: https://ajalalab.com/blend/
Download the source and build with CMake:
git clone https://github.com/Bioye97/blend.git
cd blend
cp cmake/ConfigUserTemplate.cmake cmake/ConfigUser.cmake
mkdir build
cd build
cmake ..
cmake --build .
cmake --build . --target installEdit cmake/ConfigUser.cmake before configuring if you want to set a custom
installation prefix or enable optional tests, examples, or documentation.
After installation, make sure the installation bin directory is in your
PATH, then check the following commands:
blend --version
blend --show-modules
blend --show-windowsMake a 1-D cosine window:
blend window1d -R0/10 -I1 -Fcosine -T0.2/0.2Query a 1-D cosine window at an arbitrary location:
printf "2.5\n" | blend window1d -R0/10 -I1 -Fcosine -T0.2/0.2Make a 2-D cosine window using a support/polygon defined in the polygon.txt file:
printf "1 1\n4 1\n4 4\n1 4\n" > polygon.txt
printf "polygon.txt cosine/cosine 0.2/0.2/0.2/0.2\n" > supports.txt
blend window2d -R0/5/0/5 -I0.5 -Bsupports.txtMake a 3-D cosine window using a support/polygon defined in the polygon.txt file:
printf "1 1\n4 1\n4 4\n1 4\n" > polygon.txt
printf "polygon.txt 1 3 cosine/cosine/cosine 0.2/0.2/0.2/0.2/0.2/0.2\n" > supports.txt
blend window3d -R0/5/0/5/0/5 -I0.5 -Bsupports.txtCheck if a support/polygon is xy-monotone and make it so if it is not:
blend monotone polygon.txt -Mb The install step also installs an uninstall helper. Run it from the installation prefix:
./share/tools/blend_uninstall.shPreview removals first with:
./share/tools/blend_uninstall.sh --dry-runBLEND is licensed under the GNU Lesser General Public License, version 3
or any later version. See LICENSE and NOTICE
for details.
If you use BLEND in your work, please cite the following references:
-
Ajala, R., & Persaud, P. (2021). Effect of merging multiscale models on seismic wavefield predictions near the southern San Andreas fault.
Journal of Geophysical Research: Solid Earth, 126, 1-23. -
Ajala, R., & Persaud, P. (2022). Ground-motion evaluation of hybrid seismic velocity models.
The Seismic Record, 2, 186-196. -
Ajala, R., Kolawole, F., Share, P. E., Sahakian, V., Delph, J. R., Hooft, E., & He, B. (2025). Toward an accessible framework for synthesizing solid earth models across multiple scales. In
Seismological Society of America Annual Meeting, Baltimore, Maryland, USA, vol. 96, p. 1364.
The BLEND package design is inspired by the Generic Mapping Tools (GMT) and was funded by CRESCENT and NSF.