Commits

Takahiro Tsutsumi authored 2ac6ada4f9c
Fix a bug related to test failures

casatasks/src/private/task_setjy.py

Modified
391 391 # for im.setjy to run with both the stanadard and fluxdensity specified.
392 392 # Until CAS-6463 is fixed, need to catch and override inconsistent parameters.
393 393 if userFluxDensity and instandard!='manual':
394 394 influxdensity=-1
395 395 #raise Exception("Use standard=\"manual\" to set the specified fluxdensity.")
396 396 casalog.post("*** fluxdensity > 0 but standard != 'manual' (possibly interaction with globals), override to set fluxdensity=-1.", 'WARN')
397 397
398 398
399 399 if spix==[]: # handle the default
400 400 spix=0.0
401 - elif abs(spix[0]) > 10.0:
402 - if spix[0] < -10.0:
401 + alpha = spix[0] if type(spix)==list else spix
402 + if abs(alpha) > 10.0:
403 + if alpha < -10.0:
403 404 msg = 'less than -10'
404 405 else:
405 406 msg = 'greater than 10'
406 407 raise Exception(f'The spectral index is {msg}! Please check the spix parameter.')
407 408
408 409 # need to modify imager to accept double array for spix
409 410 retval=myim.setjy(field=field, spw=spw, modimage=model, fluxdensity=influxdensity,
410 411 spix=spix, reffreq=reffreq, standard=instandard, scalebychan=scalebychan,
411 412 polindex=polindex, polangle=polangle, rotmeas=rotmeas,
412 413 time=timerange, observation=str(observation), scan=scan, intent=intent,

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut