DiamondLightSource / mx-bluesky

Bluesky plans, plan stubs, and utilities for MX beamlines
https://diamondlightsource.github.io/mx-bluesky/
Apache License 2.0
0 stars 2 forks source link

Remove unused arguments in `upload_parameters()` #160

Closed dperl-dls closed 1 week ago

dperl-dls commented 3 weeks ago
          Could: It looks like `upload_parameters` is only ever called with `oxford`. If we don't use any other chips a better fix here would be to not even take the chip type as an argument and just hardcode oxford and width=8? Pull into a separate issue if we're not sure

_Originally posted by @DominicOram in https://github.com/DiamondLightSource/mx_bluesky/pull/159#discussion_r1719677375_

noemifrisina commented 3 weeks ago

Just adding a comment for completeness' sake. At the moment, this may also be used for OxfordInner type chips, which are Oxford chips without the outer blocks, i.e. a smaller width. However, this makes no real difference as upload_parameters will read a file that has the PVAR values for each block and the outer ones will be set to 0. The map file for these 2 chips is apparently the same shape and if you open the edm for Oxford Inner, it's the same one. As this edm screen is not even available unless the Oxford chip is selected in the parameters, I think we can safely remove the chip type as an argument.

A possible future issue kind of related to this: we may need to check if they plan to use this functionality also for the new polymer chips from PSI - which have a bigger width. Although imo if this code is supposed to be used by multiple chip types with different shapes, it probably shoud not go into an edm screen that solely describes the Oxford chip. Update: it seems like the PSI chips are more like one block so this is a non issue for now.