casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Static Private Attributes
__casac__.simulator.simulator Class Reference
Inheritance diagram for __casac__.simulator.simulator:
__casac__.simulator._object

List of all members.

Public Member Functions

def __init__
def open
def openfromms
def close
def done
def name
def summary
def type
def settimes
def observe
def observemany
def setlimits
def setauto
def setconfig
def setknownconfig
def setfeed
def setfield
def setmosaicfield
def setspwindow
def setdata
def predict
def setoptions
def setvp
def corrupt
def reset
def setbandpass
def setapply
def setgain
def settrop
def setpointingerror
def setleakage
def oldsetnoise
def setnoise
def setpa
def setseed

Public Attributes

 this

Static Private Attributes

dictionary __swig_setmethods__
tuple __setattr__
dictionary __swig_getmethods__
tuple __getattr__
 __repr__
 __swig_destroy__
 __del__

Detailed Description

Proxy of C++ casac::simulator class

Definition at line 70 of file simulator.py.


Constructor & Destructor Documentation

__init__(self) -> simulator

Definition at line 77 of file simulator.py.


Member Function Documentation

close(self) -> bool

Summary
Close the newsimulator tool
--------------------------------------------------------------------------------

Definition at line 114 of file simulator.py.

corrupt(self) -> bool

Summary
Corrupt the data with visibility errors
--------------------------------------------------------------------------------

Definition at line 488 of file simulator.py.

done(self) -> bool

Summary
Close the newsimulator tool
--------------------------------------------------------------------------------

Definition at line 125 of file simulator.py.

name(self) -> string

Summary
Provide the name of the attached MeasurementSet
--------------------------------------------------------------------------------

Definition at line 136 of file simulator.py.

def __casac__.simulator.simulator.observe (   self,
  args,
  kwargs 
)
observe(self, sourcename=string(""), spwname=string(""), starttime=initialize_variant("0s"), stoptime=initialize_variant("3600s"), 
    add_observation=False, state_sig=True, 
    state_ref=False, state_cal=0.0, state_load=0.0, state_sub_scan=0, state_obs_mode=string("OBSERVE_TARGET.ON_SOURCE"), 
    observer=string("CASA simulator"), 
    project=string("CASA simulation")) -> bool

Summary
Observe a given configuration

Input Parameters:
sourcename       Name of source or field (must be specified) None 
spwname          Unique user-supplied name for this spectral window None 
starttime        Start time referenced to referenceepoch 0s 
stoptime         Stop time referenced to referenceepoch 3600s 
add_observation  Add a new line to the OBSERVATION subtable for this call false 
state_sig        a new line will be added to STATE if the following don't match true 
state_ref        false 
state_cal        0.0 
state_load       0.0 
state_sub_scan   0 
state_obs_mode   OBSERVE_TARGET.ON_SOURCE 
observer         CASA simulator 
project          CASA simulation 

--------------------------------------------------------------------------------

Definition at line 186 of file simulator.py.

def __casac__.simulator.simulator.observemany (   self,
  args,
  kwargs 
)
observemany(self, sourcenames=std::vector< string >(1, ""), spwname=string(""), starttimes=std::vector< string >(1, ""), 
    stoptimes=std::vector< string >(1, ""), directions=std::vector< string >(1, ""), 
    add_observation=False, state_sig=True, state_ref=False, 
    state_cal=0.0, state_load=0.0, state_sub_scan=0, state_obs_mode=string("OBSERVE_TARGET.ON_SOURCE"), 
    observer=string("CASA simulator"), project=string("CASA simulation")) -> bool

Summary
Observe a given configuration

Input Parameters:
sourcenames      Name of sources None 
spwname          Unique user-supplied name for this spectral window None 
starttimes       Start times referenced to referenceepoch 0s 
stoptimes        Stop time referenced to referenceepoch 3600s 
directions       
add_observation  Add a new line to the OBSERVATION subtable for this call false 
state_sig        a new line will be added to STATE if the following don't match true 
state_ref        false 
state_cal        0.0 
state_load       0.0 
state_sub_scan   0 
state_obs_mode   OBSERVE_TARGET.ON_SOURCE 
observer         CASA simulator 
project          CASA simulation 

--------------------------------------------------------------------------------

Definition at line 217 of file simulator.py.

def __casac__.simulator.simulator.oldsetnoise (   self,
  args,
  kwargs 
)
oldsetnoise(self, mode=string("calculate"), table=string(""), simplenoise=initialize_variant("0.0Jy"), 
    antefficiency=0.8, correfficiency=0.85, spillefficiency=0.85, tau=0.1, 
    trx=50, tatmos=230.0, tcmb=2.7) -> bool

Summary
Set the noise level fixed sigma (mode=simplenoise) or
   Brown's equation (mode=calculate) OBSOLETE VERSION

Input Parameters:
mode             Mode of operation. String: 'simplenoise'|'calculate' calculate 'simplenoise' 'calculate' 
table            Name of noise table - not currently implemented '' 
simplenoise      Level of noise if simplenoise 0.0Jy 
antefficiency    antenna efficiency 0.8 0.8 
correfficiency   Correlation efficiency 0.85 0.85 
spillefficiency  Forward spillover efficiency 0.85 0.85 
tau              Atmospheric Opacity 0.1 0.1 
trx              Receiver temp (ie, all non-atmospheric Tsys contributions) [K] 50 50 
tatmos           (Physical, not Brightness) Temperature of atmosphere [K] 230.0 230.0 
tcmb             Temperature of cosmic microwave background [K] 2.7 2.7 

--------------------------------------------------------------------------------

Definition at line 628 of file simulator.py.

def __casac__.simulator.simulator.open (   self,
  args,
  kwargs 
)
open(self, ms=string("")) -> bool

Summary
Construct a simulator tool and creating a new MeasurementSet

Input Parameters:
ms               MeasurementSet to be created 

--------------------------------------------------------------------------------

Definition at line 84 of file simulator.py.

def __casac__.simulator.simulator.openfromms (   self,
  args,
  kwargs 
)
openfromms(self, ms=string("")) -> bool

Summary
Construct a simulator tool using an already existing  MS

Input Parameters:
ms               MeasurementSet to be processed 'MS' 

--------------------------------------------------------------------------------

Definition at line 99 of file simulator.py.

def __casac__.simulator.simulator.predict (   self,
  args,
  kwargs 
)
predict(self, imagename=std::vector< string >(1, ""), complist=string(""), incremental=False) -> bool

Summary
Predict astronomical data from an image

Input Parameters:
imagename        Name of image from which to predict visibilities 
complist         Name of component list String 
incremental      Add this model to the existing Data Visibilities? false 

--------------------------------------------------------------------------------

Definition at line 425 of file simulator.py.

reset(self) -> bool

Summary
Reset the corruption terms
--------------------------------------------------------------------------------

Definition at line 499 of file simulator.py.

def __casac__.simulator.simulator.setapply (   self,
  args,
  kwargs 
)
setapply(self, table=string(""), type=string(""), t=0.0, field=initialize_variant(""), interp=string("linear"), 
    select=string(""), calwt=False, spwmap=initialize_vector(1, (int)-1), 
    opacity=0.0) -> bool

Summary
Arrange for corruption by existing cal tables

Input Parameters:
table            Calibration table name 
type             Component type B BPOLY G GSPLINE D P T TOPAC GAINCURVE 
t                Interpolation interval (seconds) 0.0 
field            Select on field 
interp           Interpolation type (in time) aipslin nearest linear 
select           TAQL selection string. Default is no selection. 
calwt            Calibrate weights? false 
spwmap           Spectral windows to apply -1 
opacity          Array-wide zenith opacity (for type='TOPAC') 0.0 

--------------------------------------------------------------------------------

Definition at line 529 of file simulator.py.

def __casac__.simulator.simulator.setauto (   self,
  autocorrwt = 0.0 
)
setauto(self, autocorrwt=0.0) -> bool

Summary
Set autocorrelation weight

Input Parameters:
autocorrwt       Weight to assign autocorrelations (0=none) 0.0 0.0 

--------------------------------------------------------------------------------

Definition at line 265 of file simulator.py.

def __casac__.simulator.simulator.setbandpass (   self,
  args,
  kwargs 
)
setbandpass(self, mode=string("calculate"), table=string(""), interval=initialize_variant("3600s"), 
    amplitude=initialize_vector(1, (double)0.0)) -> bool

Summary
Set the bandpasses

Input Parameters:
mode             Mode of operation. String: 'calculate'|'table' calculate 'calculate' 
table            Name of table '' 
interval         Coherence interval e.g. '1h' 3600s 
amplitude        Variances errors in amplitude and phase 0.0 

--------------------------------------------------------------------------------

Definition at line 510 of file simulator.py.

def __casac__.simulator.simulator.setconfig (   self,
  args,
  kwargs 
)
setconfig(self, telescopename=string("VLA"), x=initialize_vector(1, (double)0), y=initialize_vector(1, (double)0), 
    z=initialize_vector(1, (double)0), dishdiameter=initialize_vector(1, (double)0), 
    offset=initialize_vector(1, (double)0), mount=std::vector< string >(1, ""), 
    antname=std::vector< string >(1, ""), padname=std::vector< string >(1, ""), 
    coordsystem=string("global"), referencelocation=initialize_variant("ALMA")) -> bool

Summary
Set the antenna configuration

Input Parameters:
telescopename    Name of the telescope we are simulating (determines VP) VLA 'VLA' 
x                Vector of x values of all antennas [currently m] 0 [] 
y                Vector of y values of all antennas [currently m] 0 [] 
z                Vector of z values of all antennas [currently m] 0 [] 
dishdiameter     Vector of diameters of all antennas [currently m] 0 [] 
offset           Vector of offset of all antennas [currently m] 0 [] 
mount            Vector of mount types of all antennas (recognized mounts are 'ALT-AZ', 'EQUATORIAL', 'X-Y', 'ORBITING', 'BIZARRE' ALT-AZ [] 
antname          Vector of names of all antennas A [] 
padname          Vector of names of pads or stations P [] 
coordsystem      Coordinate system of antenna positions [x,y,z], possibilities are 'global', 'local' , 'longlat' global 'global' 
referencelocation        Reference location [required for local coords] Position Measure of Coordinates of array location. E.g me.position('ITRF', '30.5deg', -20.2deg', 6000km') or me.observatory('ALMA') ALMA position measure 

--------------------------------------------------------------------------------

Definition at line 280 of file simulator.py.

def __casac__.simulator.simulator.setdata (   self,
  args,
  kwargs 
)
setdata(self, spwid=initialize_vector(1, (int)0), fieldid=initialize_vector(1, (int)0), msselect=string("")) -> bool

Summary
Set the data parameters selection for subsequent processing

Input Parameters:
spwid            Spectral Window Ids (0 relative) to select 0 
fieldid          Field Ids (0 relative) to select 0 
msselect         TQL select string applied as a logical 'and' with the other selections String 

--------------------------------------------------------------------------------

Definition at line 408 of file simulator.py.

def __casac__.simulator.simulator.setfeed (   self,
  args,
  kwargs 
)
setfeed(self, mode=string(""), x=initialize_vector(1, (double)0), y=initialize_vector(1, (double)0), 
    pol=std::vector< string >(1, "")) -> bool

Summary
Set the feed parameters

Input Parameters:
mode             Mode for specifying feed parameters (currently, perfect only) 
x                Some very secretive feed array parameter x 0 
y                Some more very secretive feed array parameter y 0 
pol              Guess its the polarization of feed arrays... your guess is as good as mine....if you know better let us know please ! R 

--------------------------------------------------------------------------------

Definition at line 325 of file simulator.py.

def __casac__.simulator.simulator.setfield (   self,
  args,
  kwargs 
)
setfield(self, sourcename=string("SOURCE"), sourcedirection=initialize_variant(""), calcode=string(""), 
    distance=initialize_variant("0m")) -> bool

Summary
Set one or more observed fields

Input Parameters:
sourcename       Name of source or field (must be specified) SOURCE 'unknown' 
sourcedirection  Direction Measure of Coordinates of source to be observed. E.g me.direction('J2000', '30.5deg','-20.2deg'). 
calcode          Calibration code 'OBJ' 
distance         Distance to the object 0m 

--------------------------------------------------------------------------------

Definition at line 344 of file simulator.py.

def __casac__.simulator.simulator.setgain (   self,
  args,
  kwargs 
)
setgain(self, mode=string("fbm"), table=string(""), interval=initialize_variant("10s"), amplitude=initialize_vector(1, (double)0.01)) -> bool

Summary
Set the gains

Input Parameters:
mode             Mode of operation. String: 'fbm' fbm 'fbm' 
table            Optional name of table to write '' 
interval         timescale for gain variations NOT USED 10s 
amplitude        amplitude scale (RMS) for gain variations [real,imag] or scalar 0.01 [] 

--------------------------------------------------------------------------------

Definition at line 554 of file simulator.py.

def __casac__.simulator.simulator.setknownconfig (   self,
  args,
  kwargs 
)
setknownconfig(self, arrayname=string("VLA")) -> bool

Summary
Set the antenna configuration to a
    known array

Input Parameters:
arrayname        Name of the telescope configurationwe are simulating VLA 'VLA' 

--------------------------------------------------------------------------------

Definition at line 309 of file simulator.py.

def __casac__.simulator.simulator.setleakage (   self,
  args,
  kwargs 
)
setleakage(self, mode=string("constant"), table=string(""), amplitude=initialize_vector(1, (double)0.01), 
    offset=initialize_vector(1, (double)0.)) -> bool

Summary
Set the polarization leakage

Input Parameters:
mode             Mode of operation. String: 'constant' constant 'constant' 
table            Optional name of table to write '' 
amplitude        Magnitude of pol leakage [real,imag] 0.01 [] 
offset           Meam of pol leakage [real,imag] 0. [] 

--------------------------------------------------------------------------------

Definition at line 609 of file simulator.py.

def __casac__.simulator.simulator.setlimits (   self,
  args,
  kwargs 
)
setlimits(self, shadowlimit=1e-6, elevationlimit=initialize_variant("10deg")) -> bool

Summary
Set limits for observing

Input Parameters:
shadowlimit      Maximum fraction of geometrically shadowed area before flagging occurs 1e-6 1e-6 
elevationlimit   Minimum elevation angle before flagging occurs 10deg 

--------------------------------------------------------------------------------

Definition at line 249 of file simulator.py.

def __casac__.simulator.simulator.setmosaicfield (   self,
  args,
  kwargs 
)
setmosaicfield(self, sourcename=string("SOURCE"), calcode=string(""), fieldcenter=initialize_variant(""), 
    xmosp=1, ymosp=1, mosspacing=initialize_variant("1arcsec"), distance=initialize_variant("0m")) -> bool

Summary
Set observed mosaic fields

Input Parameters:
sourcename       Name of source or field (must be specified). SOURCE 'unknown' 
calcode          Calibration code '' 
fieldcenter      Coordinates of mosaic field center MDirection 
xmosp            Number of mosaic pointing in horizontal direction 1 
ymosp            Number of mosaic pointing in vertical direction 1 
mosspacing       Spacing between mosaic pointings 1arcsec 
distance         Distance to the object 0m 

--------------------------------------------------------------------------------

Definition at line 363 of file simulator.py.

def __casac__.simulator.simulator.setnoise (   self,
  args,
  kwargs 
)
setnoise(self, mode=string("simplenoise"), table=string(""), simplenoise=initialize_variant("0.1Jy"), 
    pground=initialize_variant("560mbar"), relhum=20.0, altitude=initialize_variant("5000m"), 
    waterheight=initialize_variant("200m"), pwv=initialize_variant("1mm"), 
    tatmos=250.0, tau=0.1, antefficiency=0.8, spillefficiency=0.85, 
    correfficiency=0.88, trx=50, tground=270.0, tcmb=2.73, OTF=True, senscoeff=0., 
    rxtype=0) -> bool

Summary
Set the noise level fixed sigma (mode=simplenoise) or
   Brown's equation using the ATM model for frequency-dependent atmospheric
   opacity (mode=tsys-atm) or Brown's equation, manually specifying the zenith
   opacity (constant across the band) and atmospheric temperature 
   (mode=tsys-manual)

Input Parameters:
mode             Mode of operation. simplenoise 'simplenoise' 'tsys-atm' 'tsys-manual' 
table            Name of optional cal table to write '' 
simplenoise      Level of noise if not calculated 0.1Jy 
pground          Ground pressure for ATM model (if tsys-atm) 560mbar 
relhum           ground relative humidity for ATM model (if tsys-atm) 20.0 
altitude         site altitude for ATM model (if tsys-atm) 5000m 
waterheight      Height of water layer for ATM model (if tsys-atm) 200m 
pwv              Precipitable Water Vapor ATM model (if tsys-atm) 1mm 
tatmos           Temperature of atmosphere [K] (if tsys-manual) 250.0 
tau              Zenith Atmospheric Opacity (if tsys-manual) 0.1 
antefficiency    Antenna efficiency 0.8 
spillefficiency  Forward spillover efficiency 0.85 
correfficiency   Correlation efficiency 0.88 
trx              Receiver temp (ie, all non-atmospheric Tsys contributions) [K] 50 
tground          Temperature of ground/spill [K] 270.0 
tcmb             Temperature of cosmic microwave background [K] 2.73 
OTF              calculate noise on-the-fly (WARNING: only experts with high-RAM machines should use False) true 
senscoeff        sensitivity constant (1./sqrt(2) for interferometer [default]; 1. for total power) 0. 
rxtype           Receiver type; 0=2SB, 1=DSB e.g. ALMA B9 0 

--------------------------------------------------------------------------------

Definition at line 655 of file simulator.py.

def __casac__.simulator.simulator.setoptions (   self,
  args,
  kwargs 
)
setoptions(self, ftmachine=string("ft"), cache=0, tile=16, gridfunction=string("SF"), location=initialize_variant("ALMA"), 
    padding=1.3, facets=1, maxdata=2000.0, wprojplanes=1) -> bool

Summary
Set various processing options

Input Parameters:
ftmachine        Fourier transform machine. Possibilities are 'ft', 'sd' ft 'ft' 
cache            Size of gridding cache in complex pixels 0 
tile             Size of a gridding tile in pixels (in 1 dimension) 16 
gridfunction     Gridding function. String: 'SF'|'BOX'|'PB' SF 'SF' 
location         Location used in phase rotations. Position Measure of Coordinates of array location. E.g me.position('ITRF', '30.5deg', '-20.2deg', '6000km') or me.observatory('ALMA') ALMA position measure 
padding          Padding factor in image plane (>=1.0) 1.3 
facets           Number of facets 1 
maxdata          Maximum data to write to a single TSM file (MB) 2000.0 
wprojplanes      Number of projection planes when using wproject as the ft-machine 1 

--------------------------------------------------------------------------------

Definition at line 442 of file simulator.py.

def __casac__.simulator.simulator.setpa (   self,
  args,
  kwargs 
)
setpa(self, mode=string("calculate"), table=string(""), interval=initialize_variant("10s")) -> bool

Summary
Corrupt phase by the parallactic angle

Input Parameters:
mode             Mode of operation. String: 'calculate'|'table' calculate 'calculate' 
table            Name of table '' 
interval         Interval for parallactic angle application, e.g. '10s' 10s 

--------------------------------------------------------------------------------

Definition at line 697 of file simulator.py.

def __casac__.simulator.simulator.setpointingerror (   self,
  args,
  kwargs 
)
setpointingerror(self, epjtablename=string(""), applypointingoffsets=False, dopbcorrection=False) -> bool

Summary
Set the Pointing error

Input Parameters:
epjtablename     Name of a table that has E-Jones errors for Pointing 
applypointingoffsets     Apply pointing offsets false 
dopbcorrection   apply primary beam correction false 

--------------------------------------------------------------------------------

Definition at line 592 of file simulator.py.

def __casac__.simulator.simulator.setseed (   self,
  seed = 185349251 
)
setseed(self, seed=185349251) -> bool

Summary
Set the seed for the random number generator

Input Parameters:
seed             Seed 185349251 185349251 

--------------------------------------------------------------------------------

Definition at line 714 of file simulator.py.

def __casac__.simulator.simulator.setspwindow (   self,
  args,
  kwargs 
)
setspwindow(self, spwname=string("XBAND"), freq=initialize_variant("8.0e9Hz"), deltafreq=initialize_variant("50e6Hz"), 
    freqresolution=initialize_variant("50.e6Hz"), refcode=string("TOPO"), 
    nchannels=1, stokes=string("RR LL")) -> bool

Summary
Set one or more spectral windows

Input Parameters:
spwname          Unique user-supplied name for this spectral window XBAND 'XBAND' 
freq             Starting frequency 8.0e9Hz 
deltafreq        Frequency increment per channel 50e6Hz 
freqresolution   Frequency resolution per channel 50.e6Hz 
refcode          Spectral reference code e.g. LSRK, TOPO, BARY TOPO LSRK LSRD BARY GEO TOPO GALACTO LGROUP CMB 
nchannels        Number of channels 1 
stokes           Stokes types to simulate RR LL 'RR LL' 

--------------------------------------------------------------------------------

Definition at line 385 of file simulator.py.

def __casac__.simulator.simulator.settimes (   self,
  args,
  kwargs 
)
settimes(self, integrationtime=initialize_variant("10s"), usehourangle=True, referencetime=initialize_variant("50000.0d")) -> bool

Summary
Set integration time, {em etc.}

Input Parameters:
integrationtime  Integration time 10s 
usehourangle     Use starttime/stoptime as hour angles - else they are referenced to referencetime true 
referencetime    Reference time for starttime and stoptime. Epoch Measure . E.g me.epoch('UTC', '50000.0d') 50000.0d epoch measure 

--------------------------------------------------------------------------------

Definition at line 169 of file simulator.py.

def __casac__.simulator.simulator.settrop (   self,
  args,
  kwargs 
)
settrop(self, mode=string("screen"), table=string(""), pwv=3.0, deltapwv=0.15, beta=1.1, windspeed=7.) -> bool

Summary
Set tropospheric gain corruptions

Input Parameters:
mode             Mode of operation - screen or individual antennas screen 'screen' 
table            Name of cal table '' 
pwv              total precipitable water vapour in mm 3.0 
deltapwv         RMS PWV fluctuations *as a fraction of PWV parameter* 0.15 
beta             exponent of fractional brownian motion 1.1 
windspeed        wind speed for screen type corruption (m/s) 7. 

--------------------------------------------------------------------------------

Definition at line 572 of file simulator.py.

def __casac__.simulator.simulator.setvp (   self,
  args,
  kwargs 
)
setvp(self, dovp=True, usedefaultvp=True, vptable=string(""), dosquint=True, parangleinc=initialize_variant("360deg"), 
    skyposthreshold=initialize_variant("180deg"), pblimit=1.0e-2) -> bool

Summary
Set the voltage pattern model for subsequent processing

Input Parameters:
dovp             Multiply by the voltage pattern (ie, primary beam) when simulating true 
usedefaultvp     Look up the default VP for this telescope and frequency? true 
vptable          If usedefaultvp is false, provide a VP Table made with vpmanager Table 
dosquint         Activate the beam squint in the VP model true 
parangleinc      Parallactice angle increment for squint application 360deg 
skyposthreshold  Position threshold on the sky for feed arrays ?? 180deg 
pblimit          Primary beam limit to use in feed arrays ? 1.0e-2 

--------------------------------------------------------------------------------

Definition at line 466 of file simulator.py.

summary(self) -> bool

Summary
Summarize the current state
--------------------------------------------------------------------------------

Definition at line 147 of file simulator.py.

type(self) -> string

Summary
Return the type of this tool
--------------------------------------------------------------------------------

Definition at line 158 of file simulator.py.


Member Data Documentation

Definition at line 83 of file simulator.py.

Definition at line 75 of file simulator.py.

Definition at line 76 of file simulator.py.

Definition at line 73 of file simulator.py.

Definition at line 82 of file simulator.py.

Definition at line 74 of file simulator.py.

Definition at line 72 of file simulator.py.

Definition at line 81 of file simulator.py.


The documentation for this class was generated from the following file: