Skip to content

Instrument demos July 2020

Tom Willemsen edited this page Jul 14, 2020 · 3 revisions

Changes to highlight to all instruments

IBEX User Forum

The IBEX user forum is for IBEX users to discuss hints and tips about how to use the system. You can join it on Teams.

genie_python now uses Python 3

Ticket #5175: genie_python will now run under Python 3.8 as opposed to 2.7. There are differences between python 2 and 3 which may mean that some scripts which worked under python 2 will no longer work under python 3. See here for further details.

genie_python now has a b. module containing block names.

Ticket #5401: genie_python now has a shortcut to block names b.<blockname>. This can be used wherever you would have used the name of a block - for example in a call to g.cset. It will also autocomplete in the scripting window. See post on forum: https://teams.microsoft.com/l/message/19:7a45f6d4e99d4a31b441e46a82fb33c1@thread.skype/1592484373224?tenantId=3f66361c-a87e-4158-8f61-99e82db3cac8&groupId=b20b0859-14eb-4fa7-b221-c96ac1027927&parentMessageId=1592484373224&teamName=IBEX%20Users&channelName=Scripting&createdTime=1592484373224

Alarms on blocks are now recorded in nexus files

Ticket #4936: Alarm status of blocks is now put into the Nexus file and can be filtered by Mantid

The import mechanism for the inst module has changed

Ticket #5262: A new import mechanism for the inst module. We no longer try to do the equivalent of import * from *, instead functions need to be imported explicitly into the inst module.

This means that if you want a new function to be available in inst. you will need to update inst\__init__.py.

Instruments with very simple scripts now only have a single inst.py file instead of a module.

See here for further details.

Removal of the dummy argument from g.load_script

Ticket #5451: Remove the dummy argument from g.load_script. This will cause an error message if an old GUI runs with a new genie_python. It will break any user scripts where you have called load_script with more than one argument in a positional way.

Examples:

  • g.load_script("my_script.py", None, False, True) will be broken.
  • g.load_script("my_script.py") or g.load_script("my_script.py", check_script=False, warnings_as_error=True) will both be fine.

Removal of deprecated genie_python functions

Ticket #5457: The following functions have been removed from genie_python in favour of their change_ equivalents:

  • set_title (use change_title instead)
  • set_script_dir (use change_script_dir instead)
  • set_number_soft_periods (use change_number_soft_periods instead)
  • set_sample_par (use change_sample_par instead)
  • set_beamline_par (use change_beamline_par instead)
  • set_period (use change_period instead)

The following functions have been removed entirely:

  • check_lowlimit_against_highlimit
  • get_absolute_path
  • is_absolute
  • get_instrument_py_name.

The following functions have been moved into g.adv:

  • get_instrument (use g.adv.get_instrument instead)
  • set_messages_verbosity (use g.adv.set_messages_verbosity instead)

send_tcpip has been moved into the shared InstrumentScripts repository.

Linter performance

Improve the performance of the linter when repeatedly calling g.load_script() (https://github.com/ISISComputingGroup/IBEX/issues/5210)

Scripting window warns when opening multiple consoles

The scripting perspective now gives a confirmation dialog if you are opening multiple scripting windows. (https://github.com/ISISComputingGroup/IBEX/issues/5084)

Client performance

Clone this wiki locally