Array

class ehtim.array.Array(tarr, ephem={})[source]

A VLBI array of telescopes with site locations, SEFDs, and other data.

tarr

The array of telescope data with datatype DTARR

Type

numpy.recarray

tkey

A dictionary of rows in the tarr for each site name

Type

dict

ephem

A dictionary of TLEs for each space antenna, Space antennas have x=y=z=0 in the tarr

Type

dict

add_satellite_elements(satname, perigee_mjd=60660.91922969088, period_days=1.0, eccentricity=0.0, inclination=0.0, arg_perigee=0.0, long_ascending=0.0, sefd=10000)[source]

Add an earth-orbiting satellite to the array from simple keplerian elements perfect keplerian orbit is assumed, no derivatives

Parameters
  • time given in mjd (perigee) –

  • given in days (period) –

  • arg_perigee, long_ascending given in degrees (inclination,) –

add_satellite_tle(tlelist, sefd=10000)[source]

Add an earth-orbiting satellite to the array from a TLE

Parameters
  • tlearr (str) – 3 element list with [name, tle line 1, tle line 2] as strings

  • sefd (float) – assumed sefd for the array file (assumes sefdl = sefdr)

add_site(site, coords, sefd=10000, fr_par=0, fr_elev=0, fr_off=0, dr=0j, dl=0j)[source]

Add a ground station to the array

copy()[source]

Copy the array object.

Args:

Returns

a copy of the Array object.

Return type

(Array)

listbls()[source]

List all baselines.

Args: :returns: array of baselines :rtype: numpy.array

make_subarray(sites)[source]

Make a subarray from the Array object array that only includes the sites listed.

Parameters

sites (list) – list of sites in the subarray

Returns

an Array object with specified sites and metadata

Return type

Array

obsdata(ra, dec, rf, bw, tint, tadv, tstart, tstop, mjd=51544, timetype='UTC', polrep='stokes', elevmin=10.0, elevmax=85.0, no_elevcut_space=False, tau=0.1, fix_theta_GMST=False)[source]

Generate u,v points and baseline uncertainties.

Parameters
  • ra (float) – the source right ascension in fractional hours

  • dec (float) – the source declination in fractional degrees

  • tint (float) – the scan integration time in seconds

  • tadv (float) – the uniform cadence between scans in seconds

  • tstart (float) – the start time of the observation in hours

  • tstop (float) – the end time of the observation in hours

  • mjd (int) – the mjd of the observation

  • timetype (str) – how to interpret tstart and tstop; either ‘GMST’ or ‘UTC’

  • polrep (str) – polarization representation, either ‘stokes’ or ‘circ’

  • elevmin (float) – station minimum elevation in degrees

  • elevmax (float) – station maximum elevation in degrees

  • no_elevcut_space (bool) – if True, do not apply elevation cut to orbiters

  • tau (float) – the base opacity at all sites, or a dict giving one opacity per site

  • fix_theta_GMST (bool) – if True, stops earth rotation to sample fixed u,v points

Returns

an observation object with no data

Return type

Obsdata

plot_dterms(sites='all', label=None, legend=True, clist=[0.11764705882352941, 0.5647058823529412, 1.0, 1.0, 0.38823529411764707, 0.2784313725490196, 0.5411764705882353, 0.16862745098039217, 0.8862745098039215, 0.4196078431372549, 0.5568627450980392, 0.13725490196078433, 1.0, 0.6470588235294118, 0.0, 0.5450980392156862, 0.27058823529411763, 0.07450980392156863, 0.0, 0.0, 0.803921568627451, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.39215686274509803, 0.0, 0.8235294117647058, 0.7058823529411765, 0.5490196078431373, 0.0, 0.0, 0.0], rangex=False, rangey=False, markersize=6, show=True, grid=True, export_pdf='')[source]

Make a plot of the D-terms.

Parameters
  • sites (list) – list of sites to plot

  • label (str) – title for plot

  • legend (bool) – add telescope legend or not

  • clist (list) – list of colors for different stations

  • rangex (list) – lower and upper x-axis limits

  • rangey (list) – lower and upper y-axis limits

  • markersize (float) – marker size

  • show (bool) – display the plot or not

  • grid (bool) – add a grid to the plot or not

  • export_pdf (str) – save a pdf file to this path

Returns

matplotlib.axes

remove_site(site)[source]

Remove a site from the array

save_txt(fname)[source]

Save the array data in a text file.

Parameters

fname (str) – path to output array file

ehtim.array.load_txt(fname, ephemdir='ephemeris')[source]

Read an array from a text file. Sites with x=y=z=0 are spacecraft, TLE ephemerides read from ephemdir.

Parameters
  • fname (str) – path to input array file

  • ephemdir (str) – path to directory with TLE ephemerides for spacecraft

Returns

an Array object loaded from file

Return type

Array