Closed evgueni-ovtchinnikov closed 11 months ago
Currently, we use
exec('from sirf.' + args['--engine'] + ' import *')
to import reconstruction modules (engines) for MR (Gadgetron) and PET (STIR). This practice is not recommended, and raises Codacy complaints.
Gadgetron
STIR
This PR suggests using importlib function instead, e.g. for MR:
importlib
import importlib mr = importlib.import_module('sirf.' + args['--engine']) acq_data = mr.AcquisitionData()
The demo scripts run ok on my VM.
Please read and adhere to the contribution guidelines.
Please tick the following:
great idea.
Changes in this pull request
Currently, we use
to import reconstruction modules (engines) for MR (
Gadgetron
) and PET (STIR
). This practice is not recommended, and raises Codacy complaints.This PR suggests using
importlib
function instead, e.g. for MR:Testing performed
The demo scripts run ok on my VM.
Related issues
Checklist before requesting a review
Contribution Notes
Please read and adhere to the contribution guidelines.
Please tick the following: