pysdic.SDICAnalysis.from_folder#

classmethod SDICAnalysis.from_folder(folder, *, check_integrity=True, auto_construct=True)[source]#

Load an analysis saved with to_folder().

A save written by a previous version of pysdic (before 2.1.0) is converted to the current format while loading, with a PreviousSaveWarning (the files are not modified: save the analysis again to update the save). The atoms are loaded first (mesh, images, extrinsics, distortions, intrinsics), then the cameras and the views are rebuilt with the same sharing as the saved analysis, and the analysis is created with its times and displacements. Finally, the summary (metadata.json) and the structures (compute_structure()) of the loaded analysis are compared with the saved ones.

Parameters:
  • folder (Union[str, os.PathLike]) – The folder of the save.

  • check_integrity (bool, optional (default: True)) – If True, the SHA-256 of all the files are checked with manifest.json before the loading: a missing or modified file raises an error.

  • auto_construct (bool, optional (default: True)) – Whether to construct the interpolation functions of the images.

Returns:

The loaded analysis (its mesh is locked).

Return type:

pysdic.SDICAnalysis

Raises:
  • FileNotFoundError – If the folder does not exist.

  • DeprecatedError – If the save was written by a version of pysdic whose format is deprecated.

  • ValueError – If the folder is not a SDIC save, it was written by an unsupported version of pysdic, a file is missing or modified (with check_integrity), or the loaded analysis differs from the saved summary and structures (inconsistent loading).