How to use the lime.createInputPars function in lime

To help you get started, we’ve selected a few lime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lime-rt / lime / casa / task_limesolver.py View on Github external
if not ml.isConfigurationComplete():
    casalog.post("Not all results have been linked to models or functions.", priority='ERROR')
    for resultID in ml.getResultIDs():
      if not (ml.isCurrentResultModel(resultID) or ml.isCurrentResultFunction(resultID)):
        casalog.post("Result %s is provided neither by the model nor any function." % resultID, priority='ERROR')
    return

  # Done:
  ml.finalizeConfiguration()
  if not ml.isFinalizedConfiguration():
    casalog.post("Error in finalizing the model config.", priority='ERROR')
    return

  # Set input parameters for lime:
  limepars = lime.createInputPars()

  if distUnit=='pc':
    limepars.radius          = radius*PC
    limepars.minScale        = minScale*PC
  elif distUnit=='au':
    limepars.radius          = radius*AU
    limepars.minScale        = minScale*AU
  else:
    limepars.radius          = radius
    limepars.minScale        = minScale

  limepars.tcmb              = tcmb
  limepars.sinkPoints        = sinkPoints
  limepars.pIntensity        = pIntensity
  limepars.samplingAlgorithm = samplingAlgorithm
  limepars.sampling          = sampling