scanner_preview_to_angles
Converts a box drawn on a scan preview JPEG into horizontal and vertical instrument angles for launching an area scan, with optional margin padding on every side.
Instructions
Convert a box drawn on a scan's preview JPEG into instrument angles for
scanner_launch_area_scan. Both files must already be in the download
directory (scanner_download_scanfile + scanner_download_preview of the same
scan, taken from the station the instrument is still standing on).
(x0, y0)-(x1, y1) are preview pixel corners, y down; if x1 < x0 the box
wraps across the panorama seam. margin_deg pads every side.
Returns start_ha/delta_ha/start_va/delta_va in radians (VA from zenith).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x0 | Yes | ||
| x1 | Yes | ||
| y0 | Yes | ||
| y1 | Yes | ||
| margin_deg | No | ||
| scan_filename | Yes | ||
| preview_filename | Yes |