ZELLMECHANIK-DRESDEN / ShapeOut2

graphical user interface for analysis and visualization of RT-DC data sets
https://shapeout2.readthedocs.io
GNU General Public License v3.0
8 stars 5 forks source link

Add support for new emodulus LUTs #71

Open paulmueller opened 3 years ago

paulmueller commented 3 years ago

Each of these points should be a separate commit or PR in that order:

RaghavaAlajangi commented 2 days ago

Hi @paulmueller, I think I understand the first point differently. I thought I just needed to write a test function to make sure old session files load with LUT specified when we open with shapeout2 but there is already a relevant test function for that.

did you mean to implement a way that old session files get the LUT in their metadata when we open them with shapeout2 and then the LUT gets saved automatically in that session file when we close them?

paulmueller commented 2 days ago

:thinking: It could be that I already implemented that test. Which test function are you referring to? No, I would not modify any existing session files.

RaghavaAlajangi commented 1 day ago
def test_2_5_1_replace_emodulus_model():
    """In Shape-Out 2.5.1 we replace "emodulus model" with "emodulus lut"."""
    spath = pathlib.Path(__file__).parent / "data" / "version_2_1_0_basic.so2"
    pl = session.open_session(spath)
    sc = pl.slots[0].config
    assert "emodulus" in sc
    assert "emodulus model" not in sc["emodulus"]
    assert "emodulus lut" in sc["emodulus"]
    assert sc["emodulus"]["emodulus lut"] == "LE-2D-FEM-19"

This test function is not intended exclusively for the above use case. But, it is being tested!

paulmueller commented 1 day ago

Thanks, yes that is already the test I was looking for.