Skip to content

homologous points updated many times if using "update_homog_points" option in set_crop after linking maps with many strain steps in experiment class #141

Open

Description

@BenP123

Iterating over dic maps and cropping (with update_homog_points=True) causes the DIC map to be repeatedly cropped

i.e.

for inc, dic_map in exp.iter_over_maps('hrdic'):
    dic_map.link_ebsd_map(ebsd_map, transform_type="affine")
    dic_map.set_crop(left=100,right=100,top=100,bottom=100,update_homog_points=True)

will cause an incorrect update of the homologous points every increment, when we only want to do this once.

Something like this works for now but it would be good to catch this inside defdap

for inc, dic_map in exp.iter_over_maps('hrdic'):
    dic_map.link_ebsd_map(ebsd_map, transform_type="affine")

    if inc == 0: 
        dic_map.set_crop(left=100,right=100,top=100,bottom=100,update_homog_points=True)
    else:
        dic_map.set_crop(left=100,right=100,top=100,bottom=100)

Activity

  1. mikesmic commented on Aug 4, 2025

    @mikesmic
    Collaborator

    We have to think how we want to change the crop behaviour as homologous points are now stored with an experiment frame but crop is still defined on a map. So in a typical HRDIC experiment the homologous points are stored once and the crop many times. One solution is to move the crop definition to the frame but then we'd lose some flexibility with the maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions