glasgowcompbio / vimms

A programmable and modular LC/MS simulator in Python
MIT License
19 stars 6 forks source link

Allows controllers to return an initial list of tasks to send to the mass spec #87

Closed joewandy closed 4 years ago

joewandy commented 4 years ago

Currently the FixedScansController loads a schedule of scans to send out and put them into the mass spec queue one-by-one when a scan is received.

This is not correct for testing parallelisation (issue #57), as there's a period of time the instrument could be idle from the last CanAcceptNextCustomScan event to the time a custom scan is successfully placed (allowing a new task is pushed into the mass spec queue).

Proposed fix will push all the tasks scheduled by the controller into the mass spec at once, so it can be picked up immediately when CanAcceptNextCustomScan occurs. No other processing happens inside the controller.

Other controllers can also provide this list of initial tasks by overriding get_initial_tasks https://github.com/sdrogers/vimms/blob/iss_57/vimms/Controller/base.py#L19-L24