Calling `set_matric_correction()` leads to a segfault since the `wa` variable is not reallocated to handle the new size. Perhaps the constructor could be refactored into a builder pattern?