Author Archives: Yi-Xin Liu

Tutorial on CubicHermiteSpline.jl

By: Yi-Xin Liu

Re-posted from: http://www.yxliu.group/2020/06/cubic-hermite-spline

This is a tutorial on how to use the Julia package CubicHermiteSpline.jl, which performs a cubic Hermite spline interpolation on an array of data points, $(x_i, y_i)$, given that their associated gradients, $k_i=(dy/dx)_i$, are known in advance.

New

  • v0.3.0 can now perform bivariate cubic Hermite spline interpolation for 2D data points (regular and irregular grids are both supported).
  • v0.2.2 can now compute the 1st order derivative of the interpolated function.

Continue reading

Julia in Practice: Building Scattering.jl from Scratch (7)

By: Yi-Xin Liu

Re-posted from: http://www.yxliu.group/2020/05/scattering-7

In this post we will analyze the effect of size polydispersity on the form factor of polydispersed particles. A new submodule average.jl has been developed to perform various averaging operations. Another new submodule algorithm.jl is added to host low level numerical algorithms. In particular at this stage we will add algorithms for performing 1D, 2D, and 3D quadratures.

Continue reading

Julia in Practice: Building Scattering.jl from Scratch (6)

By: Yi-Xin Liu

Re-posted from: http://www.yxliu.group/2020/04/scattering-6

In this post we will first coin the term form factor for arbitrary particles by generalizing the idea of the atomic form factor. We then derive an analytical expression for the form factor of a homogeneous sphere. The functionality is implemented in two submodules: scatterer.jl and formfactor.jl. These two modules will be gradually extended by adding more types of particles as the project goes on.

Continue reading