ss_setjy.solar_system_fd(source_name=src, MJDs=mjds, frequencies=infreqs, observatory=observatory, casalog=self._casalog)
from __future__ import absolute_import
from casatasks.private.casa_transition import is_CASA6
from casatasks import casalog as default_casalog
from casatools import quanta, ms, table, componentlist, measures, calibrater, msmetadata
from collections import OrderedDict as odict
default_casalog = casalog
def __init__(self,imtool, vis, casalog=None):
casalog = default_casalog
def setSolarObjectJy(self,field,spw,scalebychan, timerange,observation, scan, intent, useephemdir, usescratch=False):
Set flux density of a solar system object using Bryan Butler's new
python model calculation code.
A single time stamp (first time stamp of MS after selections are applied) is
currently used per execution. For flux observation done in a long time span
may need to run multiple setjy with selections by time range (or scans).
from taskinit import gentools
(myms, mytb, mycl, myme, mycb, mymsmd) = gentools(['ms','tb','cl','me', 'cb','msmd'])
sel['timerange']=timerange
sel['observation']=str(observation)
measframes=['REST','LSRK','LSRD','BARY','GEO','TOPO','GALACTO','LGROUP','CMB']
scansummary=myms.getscansummary()
nscan=len(scansummary.keys())
selectedids=myms.msselectedindices()
fieldids=selectedids['field']
obsids=selectedids['observationid']
mytb.open(os.path.join(self.vis,'OBSERVATION'))
observatory=mytb.getcell('TELESCOPE_NAME',getrow)
mytb.open(os.path.join(self.vis,'FIELD'))
colnames = mytb.colnames()
fieldids = range(mytb.nrows())
phdir_info=mytb.getcolkeyword("PHASE_DIR","MEASINFO")