ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

Script Definitions: don't use `arange` #8523

Open Tom-Willemsen opened 3 weeks ago

Tom-Willemsen commented 3 weeks ago

Issue Description

https://github.com/search?q=repo%3AISISComputingGroup%2FScriptDefinitions%20arange&type=code

replace usage of np.arange with another suitable function

Note that this will either need:

Acceptance Criteria

...

How to Review

Before making a PR...

If not applicable, write "Not applicable"

...

To the reviewer: Make sure to update submodules!

FreddieAkeroyd commented 3 weeks ago

We could provide the scientists with our own generator that takes both (start, stop, step) or (start, stop, num) and "does the right thing" and they then use this and not worry about linspace / arange?

Tom-Willemsen commented 3 weeks ago

For reference, diamond have logic that looks something like "if end point would be within 1% of adding step to start N times, include it, otherwise don't". We may wish to implement something similar.

Have a look in other general/numeric python packages for similar functionality before implementing this ourselves.