Known issues

Multiprocessing

Warning

Make sure to include the if __name__ == "__main__": guard in the script being run. Omitting this can cause issues when running in parallel mode, specifically on Windows.

On some systems parallelisation using multiprocessing doesn’t work properly. To fix this, you can run in single-thread mode, by passing parallel=False to the run method. For example:

from drama import oscar

results = oscar.run(semiMajorAxis=[6500, 6550], parallel=False)

This can also help to debug errors, as the traceback becomes more readable.

Lists in default config

Some config entries are required to always be a list (such as populationCloudIds in drama.ares.get_basic_config()). These inputs currently can’t be parsed correctly, and cause an error when passed to the run and run_lazy functions. As a workaround, the config dictionary can be passed as a list:

from drama import ares

config = ares.get_basic_config()
results = ares.run([config])

This requires manually generating a list of configs to do multiple runs, when these config entries need to be included. This would look like the following:

from drama import midas

config1 = {'sourceSwitches': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]} # Condensed population only
config2 = {'sourceSwitches': [1, 1, 1, 0, 0, 0, 0, 0, 0, 0]} # Fragments/LMRO only
results = midas.run([config1, config2])

If running a parametric analysis, make sure the entries which are lists by default are not included, or have been removed when using the default config as a starting point:

from drama import ares

config = ares.get_basic_config()
# delete keys containing lists
keys = [
   "populationCloudIds",
   "populationCloudSwitches",
   "radarEquationParameters",
   "userEnteredCovariances",
   "uncertaintyScalingFactors",
   "ACPLValues",
   "revolutionVectors",
]
for key in keys:
   config.pop(key)
# add lists for parametric runs
config['semiMajorAxis'] = [sma for sma in range(6800, 7200, 100)]
results = ares.run(config)

This will use the default values, or the values set in the project file if used, instead. The following config entries are affected by this issue:

ares_keys = [
   "populationCloudIds",
   "populationCloudSwitches",
   "radarEquationParameters",
   "userEnteredCovariances",
   "uncertaintyScalingFactors",
   "ACPLValues",
   "revolutionVectors",
]
midas_keys = [
   "sourceSwitches",
   "backgroundMeteoroidPopulation",
   "cloudSwitches",
   "cloudFileIds",
   "radarEquationParameters",
]
oscar_keys = [
   "generatePlots",
]