Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

sdynpy.fileio.sdynpy_psv.PolyFile

Signature

class sdynpy.fileio.sdynpy_psv.PolyFile(obj_or_path: 'str | PathLike[str] | Any') -> 'None'

High-level wrapper around a Polytec PSV file COM object.

Attributes

NameSummary
acquisition_modeActive acquisition mode for the file.
acquisition_propertiesAvailable acquisition-property wrappers for the active mode.
alignmentsAlignment information.
authorDocument author.
camera_settingsCamera settings.
commentsDocument comments.
contained_filesContained files if this file is a combined file.
dateFile timestamp as returned by the COM interface.
elementsGeometry elements.
file_namePath of the opened file.
hardwareHardware information.
measurement_locationsMeasurement locations.
measurement_pointsMeasurement points.
parent_fileParent combined file containing this file.
point_domainsAvailable point domains.
profilesProfiles defined in the dataset.
scan_head_devices_infoScan-head-device information.
spectrogram_infoSpectrogram information.
subjectDocument subject.
texturesTextures associated with the dataset.
titleDocument title.
versionVersion metadata reported by the COM interface.
video_bitmapVideo bitmap information.
video_mapping_infoVideo mapping information.

acquisition_mode

Active acquisition mode for the file.

acquisition_properties

Available acquisition-property wrappers for the active mode.

Returns

alignments

Alignment information.

author

Document author.

camera_settings

Camera settings.

Raises

comments

Document comments.

contained_files

Contained files if this file is a combined file.

Raises

date

File timestamp as returned by the COM interface.

elements

Geometry elements.

file_name

Path of the opened file.

hardware

Hardware information.

measurement_locations

Measurement locations.

Raises

measurement_points

Measurement points.

parent_file

Parent combined file containing this file.

Raises

point_domains

Available point domains.

profiles

Profiles defined in the dataset.

Raises

scan_head_devices_info

Scan-head-device information.

spectrogram_info

Spectrogram information.

subject

Document subject.

textures

Textures associated with the dataset.

title

Document title.

version

Version metadata reported by the COM interface.

video_bitmap

Video bitmap information.

video_mapping_info

Video mapping information.

Methods

NameSummary
__init__Open a Polytec file or wrap an existing COM file object.
compute_alignment_error_mapCompute a sampled alignment-error field over the image.
get_alignment2d_imagePlot 2D alignment points on the stored image.
get_alignment3d_imagePlot 3D alignment points on the stored image.
get_alignment3d_qualityReturns the alignment quality for each laser head.
get_alignment_error_imageOverlay a sampled alignment-error colormap on the stored image.
get_beam_intersection_at_pixelCompute the least-squares beam intersection point at an image pixel.
get_beam_rays_at_pixelReturn beam origin and unit direction for each scan head at a pixel.
get_coherenceExtract coherence functions from the active spectrum point domain.
get_focus_status_imagePlot measurement points grouped by focus status.
get_geometryBuild an sdynpy geometry object from measurement points and elements.
get_geometry_status_imagePlot measurement points grouped by geometry status.
get_imageReturn the stored test image as a PIL image.
get_measpoint_imagePlot measurement-point locations on the stored image.
get_multiple_coherenceExtract multiple-coherence functions from the active spectrum point domain.
get_power_spectral_densitiesExtract power spectral densities from the active spectrum point domain.
get_scan_status_imagePlot measurement points grouped by scan status.
get_scanner_coordinates_at_pixelReturn scanner coordinates for each 2D alignment at an image pixel.
get_time_responseExtract time histories from the active time-domain point domain.
get_transfer_functionsExtract transfer functions from the active spectrum point domain.
pixel_to_videoConvert image pixel coordinates to Polytec video coordinates.

__init__

def sdynpy.fileio.sdynpy_psv.PolyFile.__init__(self, obj_or_path: 'str | PathLike[str] | Any') -> 'None'

Open a Polytec file or wrap an existing COM file object.

Parameters

Raises

compute_alignment_error_map

def sdynpy.fileio.sdynpy_psv.PolyFile.compute_alignment_error_map(self, *, pixel_step: 'int' = 10, region_mode: 'str' = 'full', hull_buffer_pixels: 'float' = 0.0, scale_region_mode: 'str' = 'measpoint_hull', metric: 'str' = 'rms', distance0: 'float' = 0.0, distance1: 'float' = 1.0) -> 'dict[str, Any] | list[Any]'

Compute a sampled alignment-error field over the image.

Parameters

Returns

get_alignment2d_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_alignment2d_image(self, alignment_index: 'int | None' = None, *, mode: 'str' = 'matplotlib', color: 'str | None' = None, marker: 'str | None' = None, size: 'float' = 60.0, linewidth: 'float' = 2.0, show_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = '2D Alignment Points') -> 'Any'

Plot 2D alignment points on the stored image.

For combined files, returns a list of per-contained-file results.

get_alignment3d_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_alignment3d_image(self, alignment_index: 'int | None' = None, *, mode: 'str' = 'matplotlib', color: 'str | None' = None, marker: 'str | None' = None, size: 'float' = 60.0, linewidth: 'float' = 2.0, show_labels: 'bool' = True, use_point_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = '3D Alignment Points') -> 'Any'

Plot 3D alignment points on the stored image.

For combined files, returns a list of per-contained-file results.

get_alignment3d_quality

def sdynpy.fileio.sdynpy_psv.PolyFile.get_alignment3d_quality(self)

Returns the alignment quality for each laser head.

If the file contains multiple files, then one quality score will be returned for each contained file.

Returns

get_alignment_error_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_alignment_error_image(self, *, pixel_step: 'int' = 10, region_mode: 'str' = 'full', hull_buffer_pixels: 'float' = 0.0, scale_region_mode: 'str' = 'measpoint_hull', metric: 'str' = 'max', distance0: 'float' = 0.0, distance1: 'float' = 1.0, cmap: 'str' = 'viridis', alpha: 'float' = 0.6, show_measurement_points: 'bool' = False, show_hull: 'bool' = False, ax: 'Any' = None, title: 'str | None' = None) -> 'Any'

Overlay a sampled alignment-error colormap on the stored image.

Parameters

Returns

get_beam_intersection_at_pixel

def sdynpy.fileio.sdynpy_psv.PolyFile.get_beam_intersection_at_pixel(self, x_pixel: 'float', y_pixel: 'float', *, distance0: 'float' = 0.0, distance1: 'float' = 1.0) -> 'dict[str, Any] | list[Any]'

Compute the least-squares beam intersection point at an image pixel.

Parameters

Returns

Raises

get_beam_rays_at_pixel

def sdynpy.fileio.sdynpy_psv.PolyFile.get_beam_rays_at_pixel(self, x_pixel: 'float', y_pixel: 'float', *, distance0: 'float' = 0.0, distance1: 'float' = 1.0) -> 'list[dict[str, Any]] | list[Any]'

Return beam origin and unit direction for each scan head at a pixel.

Parameters

Returns

Raises

get_coherence

def sdynpy.fileio.sdynpy_psv.PolyFile.get_coherence(self, collapse_reference_signals: 'bool' = True) -> 'CoherenceArray'

Extract coherence functions from the active spectrum point domain.

Parameters

Returns

get_focus_status_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_focus_status_image(self, *, mode: 'str' = 'matplotlib', size: 'float' = 60.0, linewidth: 'float' = 2.0, show_labels: 'bool' = False, use_point_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = 'Focus Status') -> 'Any'

Plot measurement points grouped by focus status.

For combined files, returns a list of per-contained-file results.

get_geometry

def sdynpy.fileio.sdynpy_psv.PolyFile.get_geometry(self) -> 'Geometry'

Build an sdynpy geometry object from measurement points and elements.

Measurement-point coordinates are converted into nodes, and simple element connectivity is inferred from element point-label counts: 2-point elements become tracelines, 3-point elements become type 61 elements, and 4-point elements become type 64 elements.

get_geometry_status_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_geometry_status_image(self, *, mode: 'str' = 'matplotlib', size: 'float' = 60.0, linewidth: 'float' = 2.0, show_labels: 'bool' = False, use_point_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = 'Geometry Status') -> 'Any'

Plot measurement points grouped by geometry status.

For combined files, returns a list of per-contained-file results.

get_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_image(self) -> 'Image.Image | list[Any]'

Return the stored test image as a PIL image.

For combined files, returns a list of images from the contained files.

get_measpoint_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_measpoint_image(self, *, mode: 'str' = 'matplotlib', color: 'str' = 'red', marker: 'str' = 'o', size: 'float' = 40.0, linewidth: 'float' = 2.0, show_labels: 'bool' = False, use_point_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = 'Measurement Points') -> 'Any'

Plot measurement-point locations on the stored image.

For combined files, returns a list of per-contained-file results.

get_multiple_coherence

def sdynpy.fileio.sdynpy_psv.PolyFile.get_multiple_coherence(self, collapse_reference_signals: 'bool' = True) -> 'MultipleCoherenceArray'

Extract multiple-coherence functions from the active spectrum point domain.

Parameters

Returns

get_power_spectral_densities

def sdynpy.fileio.sdynpy_psv.PolyFile.get_power_spectral_densities(self, data_type: 'str' = 'acceleration', collapse_reference_signals: 'bool' = True) -> 'PowerSpectralDensityArray'

Extract power spectral densities from the active spectrum point domain.

Parameters

Returns

get_scan_status_image

def sdynpy.fileio.sdynpy_psv.PolyFile.get_scan_status_image(self, *, mode: 'str' = 'matplotlib', size: 'float' = 60.0, linewidth: 'float' = 2.0, show_labels: 'bool' = False, use_point_labels: 'bool' = True, ax: 'Any' = None, title: 'str | None' = 'Scan Status') -> 'Any'

Plot measurement points grouped by scan status.

For combined files, returns a list of per-contained-file results.

get_scanner_coordinates_at_pixel

def sdynpy.fileio.sdynpy_psv.PolyFile.get_scanner_coordinates_at_pixel(self, x_pixel: 'float', y_pixel: 'float') -> 'list[dict[str, Any]] | list[Any]'

Return scanner coordinates for each 2D alignment at an image pixel.

Parameters

Returns

get_time_response

def sdynpy.fileio.sdynpy_psv.PolyFile.get_time_response(self, collapse_reference_signals: 'bool' = True) -> 'TimeHistoryArray'

Extract time histories from the active time-domain point domain.

Parameters

Returns

get_transfer_functions

def sdynpy.fileio.sdynpy_psv.PolyFile.get_transfer_functions(self, method: 'str' = 'h1', data_type: 'str' = 'acceleration', collapse_reference_signals: 'bool' = True) -> 'TransferFunctionArray'

Extract transfer functions from the active spectrum point domain.

Parameters

Returns

pixel_to_video

def sdynpy.fileio.sdynpy_psv.PolyFile.pixel_to_video(self, x_pixel: 'float', y_pixel: 'float') -> 'tuple[float, float] | list[Any]'

Convert image pixel coordinates to Polytec video coordinates.

For combined files, returns a list of per-contained-file results.