Classes | |
class | pimager |
Functions | |
def | concatimages |
def | pcube_expt |
def | pcontmultims |
def | pcontmultims2 |
def | incrementaldecon |
def | makeconttempimages |
def | findfreqranges |
def | setupcluster |
def | pcontmultidiskms |
Variables | |
tuple | runcomm |
need to retab this | |
int | chancounter |
dictionary | retval |
just to avoid an i/o bottle neck | |
tuple | numcpu |
reset numcpu in case less than available is used | |
over | |
overone | |
loop waiting for a chunk of work | |
tuple | retvals |
done for this channel | |
tuple | timebegrem |
tuple | chans |
list | imnams |
tuple | time2 |
tuple | myim |
helpover | |
tuple | outhelper |
spw | |
num of cpu per node | |
field | |
phasecenter | |
ftmachine | |
wprojplanes | |
facets | |
imsize | |
cell | |
weight | |
robust | |
npixels | |
visinmem | |
numthreads | |
stokes | |
gain | |
pbcorr | |
c | |
workingdirs | |
hostnames | |
numextraprocs |
def parallel.pimager.concatimages | ( | self, | |
outputimage = '' , |
|||
imagelist = '' , |
|||
csys = None , |
|||
removeinfile = True |
|||
) |
Definition at line 1805 of file pimager.py.
References parallel.pimager.pcube_expt().
def parallel.pimager.findfreqranges | ( | self, | |
msnames = [] , |
|||
spw = ['*'] , |
|||
freqmin = 0.0 , |
|||
freqmax = 1.e24 |
|||
) |
Definition at line 2520 of file pimager.py.
def parallel.pimager.incrementaldecon | ( | self, | |
alg, | |||
scales, | |||
residual, | |||
model, | |||
niter, | |||
psf, | |||
mask, | |||
thr, | |||
cpuid, | |||
imholder | |||
) |
Definition at line 2465 of file pimager.py.
def parallel.pimager.makeconttempimages | ( | self, | |
imname, | |||
numim = 0 , |
|||
contclean = False |
|||
) |
Definition at line 2500 of file pimager.py.
def parallel.pimager.pcontmultidiskms | ( | self, | |
msnames = [] , |
|||
workdirs = [] , |
|||
imagename = None , |
|||
imsize = [1000 , |
|||
pixsize = ['1arcsec' , |
|||
arcsec, | |||
phasecenter = '' , |
|||
field = '' , |
|||
spw = '*' , |
|||
ftmachine = 'ft' , |
|||
wprojplanes = 128 , |
|||
facets = 1 , |
|||
hostnames = '' , |
|||
numcpuperhost = 1 , |
|||
majorcycles = 1 , |
|||
niter = 1000 , |
|||
threshold = '0.0mJy' , |
|||
alg = 'clark' , |
|||
weight = 'natural' , |
|||
contclean = False , |
|||
visinmem = False , |
|||
maskimage = 'lala.mask' , |
|||
painc = 360. , |
|||
pblimit = 0.1 , |
|||
dopbcorr = True , |
|||
applyoffsets = False , |
|||
cfcache = 'cfcache.dir' , |
|||
epjtablename = '' |
|||
) |
Definition at line 2632 of file pimager.py.
def parallel.pimager.pcontmultims | ( | self, | |
msnames = [] , |
|||
workdirs = [] , |
|||
imagename = None , |
|||
imsize = [1000 , |
|||
pixsize = ['1arcsec' , |
|||
arcsec, | |||
phasecenter = '' , |
|||
field = '' , |
|||
spw = '*' , |
|||
freqrange = ['' , |
|||
stokes = 'I' , |
|||
ftmachine = 'ft' , |
|||
wprojplanes = 128 , |
|||
facets = 1 , |
|||
hostnames = '' , |
|||
numcpuperhost = 1 , |
|||
majorcycles = 1 , |
|||
niter = 1000 , |
|||
gain = 0.1 , |
|||
threshold = '0.0mJy' , |
|||
alg = 'clark' , |
|||
scales = [] , |
|||
weight = 'natural' , |
|||
robust = 0.0 , |
|||
npixels = 0 , |
|||
pbcorr = False , |
|||
contclean = False , |
|||
visinmem = False , |
|||
maskimage = 'lala.mask' , |
|||
numthreads = 1 , |
|||
painc = 360. , |
|||
pblimit = 0.1 , |
|||
dopbcorr = True , |
|||
applyoffsets = False , |
|||
cfcache = 'cfcache.dir' , |
|||
epjtablename = '' |
|||
) |
msnames= list containing measurementset names imagename = image imsize = list of 2 numbers [nx,ny] defining image size in x and y pixsize = list of 2 quantities ['sizex', 'sizey'] defining the pixel size e.g ['1arcsec', '1arcsec'] phasecenter = an integer or a direction string integer is fieldindex or direction e.g 'J2000 19h30m00 -30d00m00' field = field selection string ...msselection style spw = spw selection string ...msselection style freqrange= continuum image frequency bound e.g ['1GHz', '1.23GHz'] . stokes= string e.g 'I' , 'IV' ftmachine= the ftmachine to use ...'ft', 'wproject' etc wprojplanes is an interger that is valid only of ftmachine is 'wproject', facets= integer do split image facet, hostnames= list of strings ..empty string mean localhost numcpuperhos = integer ...number of processes to launch on each host majorcycles= integer number of CS major cycles to do, niter= integer ...total number of clean iteration threshold=quantity ...residual peak at which to stop deconvolving alg= string possibilities are 'clark', 'hogbom', 'msclean' weight= string possibilities 'natural', 'briggs', 'radial' robust= float robust factor for briggs scales = scales to use when using alg='msclean' contclean = boolean ...if False the imagename.model is deleted if its on disk otherwise clean will continue from previous run visinmem = load visibility in memory for major cycles...make sure totalmemory available to all processes is more than the MS size maskimage an image on disk to limit clean search painc = Parallactic angle increment in degrees after which a new convolution function is computed (default=360.0deg) cfcache = The disk cache directory for convolution functions pblimit = The fraction of the peak of the PB to which the PB corrections are applied (default=0.1) dopbcorr = If true, correct for PB in the major cycles as well applyoffsets = If true, apply antenna pointing offsets from the pointing table given by epjtablename epjtablename = Table containing antenna pointing offsets
Definition at line 2097 of file pimager.py.
References nf_regression.append, and parallel.pimager.pcontmultims2().
def parallel.pimager.pcontmultims2 | ( | self, | |
msnames = [] , |
|||
workdirs = [] , |
|||
imagename = None , |
|||
imsize = [1000 , |
|||
pixsize = ['1arcsec' , |
|||
arcsec, | |||
phasecenter = '' , |
|||
field = '' , |
|||
spw = '*' , |
|||
freqrange = ['' , |
|||
stokes = 'I' , |
|||
ftmachine = 'ft' , |
|||
wprojplanes = 128 , |
|||
facets = 1 , |
|||
hostnames = '' , |
|||
numcpuperhost = 1 , |
|||
majorcycles = 1 , |
|||
niter = 1000 , |
|||
gain = 0.1 , |
|||
threshold = '0.0mJy' , |
|||
alg = 'clark' , |
|||
scales = [0] , |
|||
weight = 'natural' , |
|||
robust = 0.0 , |
|||
npixels = 0 , |
|||
contclean = False , |
|||
visinmem = False , |
|||
maskimage = 'lala.mask' , |
|||
painc = 360. , |
|||
pblimit = 0.1 , |
|||
dopbcorr = True , |
|||
applyoffsets = False , |
|||
cfcache = 'cfcache.dir' , |
|||
epjtablename = '' |
|||
) |
msnames= list containing measurementset names imagename = image imsize = list of 2 numbers [nx,ny] defining image size in x and y pixsize = list of 2 quantities ['sizex', 'sizey'] defining the pixel size e.g ['1arcsec', '1arcsec'] phasecenter = an integer or a direction string integer is fieldindex or direction e.g 'J2000 19h30m00 -30d00m00' field = field selection string ...msselection style spw = spw selection string ...msselection style freqrange= continuum image frequency bound e.g ['1GHz', '1.23GHz'] . stokes= string e.g 'I' , 'IV' ftmachine= the ftmachine to use ...'ft', 'wproject' etc wprojplanes is an interger that is valid only of ftmachine is 'wproject', facets= integer do split image facet, hostnames= list of strings ..empty string mean localhost numcpuperhos = integer ...number of processes to launch on each host majorcycles= integer number of CS major cycles to do, niter= integer ...total number of clean iteration threshold=quantity ...residual peak at which to stop deconvolving alg= string possibilities are 'clark', 'hogbom', 'msclean' weight= string possibilities 'natural', 'briggs', 'radial' robust= float robust factor for briggs scales = scales to use when using alg='msclean' contclean = boolean ...if False the imagename.model is deleted if its on disk otherwise clean will continue from previous run visinmem = load visibility in memory for major cycles...make sure totalmemory available to all processes is more than the MS size maskimage an image on disk to limit clean search painc = Parallactic angle increment in degrees after which a new convolution function is computed (default=360.0deg) cfcache = The disk cache directory for convolution functions pblimit = The fraction of the peak of the PB to which the PB corrections are applied (default=0.1) dopbcorr = If true, correct for PB in the major cycles as well applyoffsets = If true, apply antenna pointing offsets from the pointing table given by epjtablename epjtablename = Table containing antenna pointing offsets
Definition at line 2274 of file pimager.py.
Referenced by parallel.pimager.pcontmultims().
def parallel.pimager.pcube_expt | ( | self, | |
msname = None , |
|||
imagename = 'elimage' , |
|||
imsize = [1000 , |
|||
pixsize = ['1arcsec' , |
|||
arcsec, | |||
phasecenter = '' , |
|||
field = '' , |
|||
spw = '*' , |
|||
ftmachine = 'ft' , |
|||
wprojplanes = 128 , |
|||
facets = 1 , |
|||
hostnames = '' , |
|||
numcpuperhost = 1 , |
|||
majorcycles = 1 , |
|||
niter = 1000 , |
|||
gain = 0.1 , |
|||
threshold = '0.0mJy' , |
|||
alg = 'clark' , |
|||
scales = [0] , |
|||
mode = 'channel' , |
|||
start = 0 , |
|||
nchan = 1 , |
|||
step = 1 , |
|||
stokes = 'I' , |
|||
restfreq = '' , |
|||
weight = 'natural' , |
|||
robust = 0.0 , |
|||
npixels = 0 , |
|||
imagetilevol = 100000 , |
|||
contclean = False , |
|||
chanchunk = 1 , |
|||
visinmem = False , |
|||
maskimage = '' , |
|||
pbcorr = False , |
|||
numthreads = -1 , |
|||
painc = 360. , |
|||
pblimit = 0.1 , |
|||
dopbcorr = True , |
|||
applyoffsets = False , |
|||
cfcache = 'cfcache.dir' , |
|||
epjtablename = '' |
|||
) |
msname= measurementset imagename = image imsize = list of 2 numbers [nx,ny] defining image size in x and y pixsize = list of 2 quantities ['sizex', 'sizey'] defining the pixel size e.g ['1arcsec', '1arcsec'] phasecenter = an integer or a direction string integer is fieldindex or direction e.g 'J2000 19h30m00 -30d00m00' field = field selection string ...msselection style spw = spw selection string ...msselection style ftmachine= the ftmachine to use ...'ft', 'wproject' etc wprojplanes is an interger that is valid only of ftmachine is 'wproject', facets= integer do split image facet, hostnames= list of strings ..empty string mean localhost numcpuperhos = integer ...number of processes to launch on each host majorcycles= integer number of CS major cycles to do, niter= integer ...total number of clean iteration threshold=quantity string ...residual peak at which to stop deconvolving alg= string possibilities are 'clark', 'hogbom', 'multiscale' and their 'mf' scales= list of scales in pixel for multiscale clean e.g [0, 3, 10] mode= channel definition, can be 'channel', 'frequency', 'velocity' start = first channel in the definition spec of mode, can be int, freq or vel quantity step = channel width specified in the definition of mode restfreq= what 'rest frequency' to use to calculate velocity from frequency empty string '' implies use the first restfreq in SOURCE of ms weight= type of weight to apply contclean = boolean ...if False the imagename.model is deleted if its on disk otherwise clean will continue from previous run chanchunk = number of channel to process at a go per process...careful not to go above total memory available visinmem = load visibility in memory for major cycles...make sure totalmemory available to all processes is more than the MS size painc = Parallactic angle increment in degrees after which a new convolution function is computed (default=360.0deg) cfcache = The disk cache directory for convolution functions pblimit = The fraction of the peak of the PB to which the PB corrections are applied (default=0.1) dopbcorr = If true, correct for PB in the major cycles as well applyoffsets = If true, apply antenna pointing offsets from the pointing table given by epjtablename epjtablename = Table containing antenna pointing offsets
Definition at line 1848 of file pimager.py.
Referenced by parallel.pimager.concatimages().
def parallel.pimager.setupcluster | ( | self, | |
hostnames = '' , |
|||
numcpuperhost = 1 , |
|||
num_ext_procs = 0 , |
|||
workingdir = '' |
|||
) |
This sets up the cluster with numcpuperhost on each of the hostnames working dir by default is pwd or it can be a vector of 1 or nhostnames if 1 num_ext_procs get to be set on master host (i.e this host) and working dir for them is pwd num_ext_procs is basically to help the master process do stuff asynchronously
Definition at line 2560 of file pimager.py.
Definition at line 2569 of file pimager.py.
Definition at line 1902 of file pimager.py.
Definition at line 1714 of file pimager.py.
tuple parallel.pimager.chans |
Definition at line 1764 of file pimager.py.
Definition at line 1900 of file pimager.py.
Definition at line 1896 of file pimager.py.
Definition at line 1898 of file pimager.py.
Definition at line 1909 of file pimager.py.
Definition at line 2037 of file pimager.py.
Definition at line 2579 of file pimager.py.
Definition at line 1765 of file pimager.py.
Definition at line 1901 of file pimager.py.
tuple parallel.pimager.myim |
Definition at line 1792 of file pimager.py.
Definition at line 1905 of file pimager.py.
tuple parallel.pimager.numcpu |
reset numcpu in case less than available is used
grab some useful info from the preset cluster
the above will return the freqmin, freqmax in the data if freqrange is default
print 'numcpuused', chancounter, nchanchunk reset numcpu in case less than available is used
major cycle
Definition at line 1723 of file pimager.py.
Definition at line 2593 of file pimager.py.
Definition at line 1907 of file pimager.py.
Definition at line 2066 of file pimager.py.
tuple parallel.pimager.over |
Definition at line 1724 of file pimager.py.
tuple parallel.pimager.overone |
loop waiting for a chunk of work
Definition at line 1731 of file pimager.py.
Definition at line 1910 of file pimager.py.
Definition at line 1897 of file pimager.py.
dictionary parallel.pimager.retval |
just to avoid an i/o bottle neck
Definition at line 1717 of file pimager.py.
tuple parallel.pimager.retvals |
done for this channel
Definition at line 1739 of file pimager.py.
Definition at line 1904 of file pimager.py.
tuple parallel.pimager.runcomm |
need to retab this
no need to process this channel doneputchan[chancounter]=True else: to be retabbed
Definition at line 1709 of file pimager.py.
num of cpu per node
Definition at line 1895 of file pimager.py.
Definition at line 1908 of file pimager.py.
tuple parallel.pimager.time2 |
Definition at line 1789 of file pimager.py.
Definition at line 1762 of file pimager.py.
Definition at line 1906 of file pimager.py.
Definition at line 1903 of file pimager.py.
Definition at line 2577 of file pimager.py.
Definition at line 1899 of file pimager.py.