NSLS-II-SST/rsoxs_scans

Bug: `do_nexafs` and `do_rsoxs` do not error when arguments do not match expected/known inputs

Opened this issue · 2 comments

When manually calling do_nexafs and do_rsoxs, there is no checking of whether items in the *args and **kwargs dictionary match expected parameters. A user can therefore invoke

do_rsoxs( ... , pol = 90)
which silently sets the polarization to 0, since the actual argument is polarizations.

It would be good to check and warn if kwargs passed to either function do not match a known parameter, though potentially problematic depending on code structure.

these commands are not ever presented as options for actually taking data, and are only provided for super users who should know what the arguments should be, or they should stick with the standard accepted spreadsheet entry. The matching of the spreadsheet entry is a general goal, but the arguments are stricter and should be well understoof before ever using these functions

@pbeaucage do_rsoxs and do_nexafs are not part of this code base, but part of rsoxs can you ask this there or change your issue to add some outside validation options to this package, rather than tying them to the spreadsheet loading?