Skip to content

Convert specs to more science friendly forms #186

@coretl

Description

@coretl

After consultation with users we would like to do the following:

  • Modify existing specs like Spiral to take a spacing rather than a number of points
  • Remove the difficult to use Mask and all the regions
  • Add in Circleand Polygon as specs that are filled with a grid of points

The spec we drew:
Image

This leads to the following changes:

  • Linspace(axis, start, stop, step) created that is almost identical to Line (including the bounded classmethod) but uses np.linspace to generate
  • Change spiral to Spiral(x_axis, x_centre, x_diameter, x_step, y_axis, y_centre, y_diameter=None, y_step=None), where self.y_diameter = x_diameter if y_diameter is None else y_diameter and similar for y_step
  • Add Circle(x_axis, x_centre, x_diameter, x_step, y_axis, y_centre, y_diameter=None, y_step=None, snake=True), which is filled with a possibly snaking grid
  • Add Polygon(x_axis, y_axis, vertices, x_step, y_step=None, snake=True) which is filled with a possibly snaking grid. The maths from https://github.com/DiamondLightSource/scanpointgenerator/blob/master/scanpointgenerator/rois/polygonal_roi.py may be useful
  • Delete Mask, and the contents of regions.py, and all code that uses them

Feel free to break this down into smaller sub tickets

Acceptance Criteria

  • The above is done and the tests and docs updated

Metadata

Metadata

Assignees

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