ISISComputingGroup / ISISComputingGroup/IBEX

Script Generator: Control iterations via start, stop & step-size

Open
#5,007 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
6
Forks
2
Avg merge
16h 40m
Merged PRs (30d)
2

Description

As scientist using the Script Generator, I want to specify iterations as start, stop and step-size, because it is a more convenient way to define iterations with many steps.

#### Acceptance Criteria
1. The Script Generator allows me to define the start point of an iteration
1. The Script Generator allows me to define the end point of an iteration
1. The Script Generator allows me to define the step-size of an iteration.
1. The start point, end point and step size can be integers or floating point numbers (decimal or scientific notation).
1. The difference between the end and start points need not be an integral multiple of the step-size

#### Notes
1. This issue was raised in a discussion with the EMU scientists, but will apply to all scientists.
1. This way of defining an iteration is exactly analogous to using a `for` loop in most programming languages (e.g. `for (x = start; x < end; x += step-size)`).
1. The start point, end point and step size will often be variables (e.g. temperatures, magnetic fields, currents or voltages), so we need to accept more than just integers.
1. In general, the step size will be chosen for convenience. It will not necessarily cause the iteration to finish up at exactly the end-point. For example: `start = 0.3K`, `end = 4.6K`, `step-size = 0.2K`. We need to be clear to users how this will be translated into Python code. In the above example, will the iteration finish at 4.5K or 4.7K? It is merely a matter of choosing a convention and documenting it.
1. This could be implemented as a generator function in python this would allow the users to define there own loops which accept parameters they want. Would be a action which can have a sub action.
1. For a nice way of doing loops with floats look at numpy.linspace and numpy.arrange

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.