suncasa.eovsa.eovsa_diskmodel

Module Contents

Functions

ant_trange(vis)

Figure out nominal times for tracking of old EOVSA antennas, and return time

gaussian2d(x, y, amplitude, x0, y0, sigma_x, sigma_y, ...)

writediskxml(dsize, fdens, freq[, xmlfile])

readdiskxml(xmlfile)

image_adddisk(eofile, diskinfo[, edgeconvmode, caltbonly])

param eofile:

read_ms(vis)

Read a CASA ms file and return a dictionary of amplitude, phase, uvdistance,

im2cl(imname, clname[, convol, verbose])

fit_diskmodel(out, bidx, rstn_flux[, uvfitrange, ...])

Given the result returned by read_ms(), plots the amplitude vs. uvdistance

fit_vs_freq(out)

calc_diskmodel(slashdate, nbands, freq, defaultfreq)

mk_diskmodel([outname, direction, reffreq, flux, ...])

Create a blank solar disk model image (or optionally a data cube)

insertdiskmodel(vis[, sizescale, fdens, dsize, ...])

disk_slfcal(vis[, slfcaltbdir, active, clearcache, pols])

Starting with the name of a calibrated ms (vis, which must have 'UDByyyymmdd' in the name)

fd_images(vis[, cleanup, niter, spws, imgoutdir, ...])

Create standard full-disk images in "images" subdirectory of the current directory.

feature_slfcal(vis[, niter, uvrange, spws, ...])

Uses images from disk-selfcaled data as model for further self-calibration of outer antennas.

plt_eovsa_image(eofiles[, figoutdir])

pipeline_run(vis[, outputvis, workdir, slfcaltbdir, ...])

Attributes

tb

spw2band

defaultfreq

suncasa.eovsa.eovsa_diskmodel.tb[source]
suncasa.eovsa.eovsa_diskmodel.spw2band[source]
suncasa.eovsa.eovsa_diskmodel.defaultfreq[source]
suncasa.eovsa.eovsa_diskmodel.ant_trange(vis)[source]

Figure out nominal times for tracking of old EOVSA antennas, and return time range in CASA format

suncasa.eovsa.eovsa_diskmodel.gaussian2d(x, y, amplitude, x0, y0, sigma_x, sigma_y, theta)[source]
suncasa.eovsa.eovsa_diskmodel.writediskxml(dsize, fdens, freq, xmlfile='SOLDISK.xml')[source]
suncasa.eovsa.eovsa_diskmodel.readdiskxml(xmlfile)[source]
suncasa.eovsa.eovsa_diskmodel.image_adddisk(eofile, diskinfo, edgeconvmode='frommergeddisk', caltbonly=False)[source]
Parameters:
  • eofile

  • diskxmlfile

  • edgeconvmode – available mode: frommergeddisk,frombeam

Returns:

suncasa.eovsa.eovsa_diskmodel.read_ms(vis)[source]

Read a CASA ms file and return a dictionary of amplitude, phase, uvdistance, uvangle, frequency (GHz) and time (MJD). Currently only returns the XX IF channel. vis Name of the visibility (ms) folder

suncasa.eovsa.eovsa_diskmodel.im2cl(imname, clname, convol=True, verbose=False)[source]
suncasa.eovsa.eovsa_diskmodel.fit_diskmodel(out, bidx, rstn_flux, uvfitrange=[1, 150], angle_tolerance=np.pi / 2, doplot=True)[source]

Given the result returned by read_ms(), plots the amplitude vs. uvdistance separately for polar and equatorial directions rotated for P-angle, then overplots a disk model for a disk enlarged by eqfac in the equatorial direction, and polfac in the polar direction. Also requires the RSTN flux spectrum for the date of the ms, determined from (example for 2019-09-01):

import rstn frq, flux = rstn.rd_rstnflux(t=Time(‘2019-09-01’)) rstn_flux = rstn.rstn2ant(frq, flux, out[‘fghz’]*1000, t=Time(‘2019-09-01’))

suncasa.eovsa.eovsa_diskmodel.fit_vs_freq(out)[source]
suncasa.eovsa.eovsa_diskmodel.calc_diskmodel(slashdate, nbands, freq, defaultfreq)[source]
suncasa.eovsa.eovsa_diskmodel.mk_diskmodel(outname='disk', direction='J2000 10h00m00.0s 20d00m00.0s', reffreq='2.8GHz', flux=660000.0, eqradius='16.166arcmin', polradius='16.166arcmin', pangle='21.1deg', overwrite=True)[source]

Create a blank solar disk model image (or optionally a data cube) outname String to use for part of the image and fits file names (default ‘disk’) direction String specifying the position of the Sun in RA and Dec. Default

means use the standard string “J2000 10h00m00.0s 20d00m00.0s”

reffreq The reference frequency to use for the disk model (the frequency at which

the flux level applies). Default is ‘2.8GHz’.

flux The flux density, in Jy, for the entire disk. Default is 66 sfu. eqradius The equatorial radius of the disk. Default is

16 arcmin + 10” (for typical extension of the radio limb)

polradius The polar radius of the disk. Default is

16 arcmin + 10” (for typical extension of the radio limb)

pangle The solar P-angle (geographic position of the N-pole of the Sun) in

degrees E of N. This only matters if eqradius != polradius

index The spectral index to use at other frequencies. Default None means

use a constant flux density for all frequencies.

cell The cell size (assumed square) to use for the image. The image size

is determined from a standard radius of 960” for the Sun, divided by cell size, increased to nearest power of 512 pixels. The default is ‘2.0arcsec’, which results in an image size of 1024 x 1024.

Note that the frequency increment used is ‘325MHz’, which is the width of EOVSA bands

(not the width of individual science channels)

suncasa.eovsa.eovsa_diskmodel.insertdiskmodel(vis, sizescale=1.0, fdens=None, dsize=None, xmlfile='SOLDISK.xml', writediskinfoonly=False, active=False, overwrite=True)[source]
suncasa.eovsa.eovsa_diskmodel.disk_slfcal(vis, slfcaltbdir='./', active=False, clearcache=False, pols='XX')[source]

Starting with the name of a calibrated ms (vis, which must have ‘UDByyyymmdd’ in the name) add a model disk based on the solar disk size for that date and perform multiple selfcal adjustments (two phase and one amplitude), and write out a final selfcaled database with the disk subtracted. Returns the name of the final database.

suncasa.eovsa.eovsa_diskmodel.fd_images(vis, cleanup=False, niter=None, spws=['0~1', '2~5', '6~10', '11~20', '21~30', '31~43'], imgoutdir='./', bright=None, stokes='XX')[source]

Create standard full-disk images in “images” subdirectory of the current directory. If cleanup is True, delete those images after completion, leaving only the fits images.

suncasa.eovsa.eovsa_diskmodel.feature_slfcal(vis, niter=200, uvrange='>1.5Klambda', spws=['0~1', '2~5', '6~10', '11~20', '21~30', '31~49'], slfcaltbdir='./', bright=None, pols='XX')[source]

Uses images from disk-selfcaled data as model for further self-calibration of outer antennas. This is only a good idea if there are bright active regions that provide strong signal on the long baselines.

suncasa.eovsa.eovsa_diskmodel.plt_eovsa_image(eofiles, figoutdir='./')[source]
suncasa.eovsa.eovsa_diskmodel.pipeline_run(vis, outputvis='', workdir=None, slfcaltbdir=None, imgoutdir=None, figoutdir=None, clearcache=False, pols='XX')[source]