|
SHiP Field Service
Framework-agnostic C++20 library exposing SHiP magnetic field maps.
|
Classes | |
| struct | GridSpec |
Axis-aligned grid: n[i] samples spanning [min[i], max[i]] (mm). More... | |
Typedefs | |
| using | stored_backend_t = covfie::backend::strided< covfie::vector::size3, covfie::backend::array< covfie::vector::float3 > > |
| using | reader_field_t = covfie::field< covfie::backend::affine< covfie::backend::clamp< covfie::backend::linear< stored_backend_t > > > > |
| using | writer_field_t = covfie::field< covfie::backend::affine< covfie::backend::clamp< covfie::backend::nearest_neighbour< stored_backend_t > > > > |
Functions | |
| void | validate (GridSpec const &spec) |
Throw if spec cannot produce a well-formed grid: every axis needs at least two samples (n - 1 underflows for n == 0 and divides by zero in grid_pos/the affine scale for n == 1) and a positive extent (max > min, otherwise the affine scale is non-positive or infinite). | |
| float | grid_pos (float min, float max, std::size_t n, std::size_t i) |
Position of sample i on an axis with n samples spanning [min, max]. | |
| writer_field_t | make_writer_field (GridSpec const &spec) |
Build an empty writer-chain field over spec, ready to be filled via writer_field_t::view_t::at(x, y, z) at grid_pos sample positions. | |
| using ship::detail::reader_field_t = typedef covfie::field< covfie::backend::affine<covfie::backend::clamp<covfie::backend::linear<stored_backend_t> >> > |
| using ship::detail::stored_backend_t = typedef covfie::backend::strided<covfie::vector::size3, covfie::backend::array<covfie::vector::float3> > |
| using ship::detail::writer_field_t = typedef covfie::field<covfie::backend::affine< covfie::backend::clamp<covfie::backend::nearest_neighbour<stored_backend_t> >> > |
|
inline |
Position of sample i on an axis with n samples spanning [min, max].
Must be used by writers so fill positions land exactly on the grid indices produced by the affine transform. n >= 2 is a precondition (see validate).
|
inline |
Build an empty writer-chain field over spec, ready to be filled via writer_field_t::view_t::at(x, y, z) at grid_pos sample positions.
|
inline |
Throw if spec cannot produce a well-formed grid: every axis needs at least two samples (n - 1 underflows for n == 0 and divides by zero in grid_pos/the affine scale for n == 1) and a positive extent (max > min, otherwise the affine scale is non-positive or infinite).