Data¶
A handful of UVFITS files are supplied with the package, collected in the the uvfits folder. Currently, these include:
M87_230GHz.uvfits – A simulated ngEHT data set generated from a GRMHD simulation image located at M87, viewed at 230 GHz. Courtesy of Dom Pesece.
M87_345GHz.uvfits – A simulated ngEHT data set generated from a GRMHD simulation image located at M87, viewed at 345 GHz. Courtesy of Dom Pesece.
circ_gauss_x2_F0=3.0_FWHM=2.0_sep=5.0_angle=0_230GHz_ngeht_ref1.uvfits – A simulated ngEHT data set generated for a binary Gaussian as described in the ngEHT first analysis challenge. Courtesy of Freek Roelofs.
Beyond loading these, there are many other ways to generate and/or modify an
ehtim.obsdata.Obsdata
object. Here are some functions for doing so,
some of which are implemented in ngEHTforecast (and its dependencies), while
others depend on external libraries designed to generate simulation data sets
for ngEHT.
Processing¶
-
data.processing.
display_baselines
(obs, figsize=None, fig=None, axes=None, **kwargs)[source]¶ Plots the baseline map for a given
ehtim.obsdata.Obsdata
object.- Parameters
obs (ehtim.obsdata.Obsdata) – Observation for which to plot the visibilities.
figsize (tuple) – Figure size in inches.
fig (matplotlib.figure.Figure) – Figure object on which to generate plot.
axes (matplotlib.axes.Axes) – Axes object on which to generate plot.
**kwargs (dict) – Key word arguments understood by errorbar and plot to be applied.
- Returns
Figure and Axes object of plots.
- Return type
-
data.processing.
display_trivial_cphases
(obs, utriv=0.01, return_data=False, print_outliers=False)[source]¶ Plots trivial closure phases, defined by those on triangles with a side shorter than utriv (by default \(0.01\,{\rm G}\lambda\)), and the distribution of their normalized residuals. Optionally, will return the trivial closure phase data and/or print any outliers to the screen.
- Parameters
obs (ehtim.obsdata.Obsdata) – Observation for which to plot the visibilities.
utriv (float) – Baseline length cutoff in \({\rm G}\lambda\), below which a baseline will be considered “trivial”. Default: 0.01.
return_data (bool) – If True, will return the trivial closure phases.
print_outliers (bool) – If True, will print the most discrepant trivial closure phases, in order of decreasing discrepancy.
- Returns
If return_data=True, returns the closure phase data for the trivial triangles.
- Return type
(np.recarray)
-
data.processing.
display_visibilities
(obs, figsize=None, fig=None, axs=None, **kwargs)[source]¶ Plots the visilibility amplitudes, phases, and uncertainties as a function of baseline length for a given
ehtim.obsdata.Obsdata
object.- Parameters
obs (ehtim.obsdata.Obsdata) – Observation for which to plot the visibilities.
figsize (tuple) – Figure size in inches.
fig (matplotlib.figure.Figure) – Figure object on which to generate plots.
axs (list) – List of
matplotlib.axes.Axes
objects on which to generate plots.**kwargs (dict) – Key word arguments understood by errorbar and plot to be applied.
- Returns
Figure object and list of Axes objects as produced by
matplotlib.figure.Figure.subplots()
.- Return type
-
data.processing.
preprocess_obsdata
(obs, ff=None, p=None, snr_cut=None, sys_err=None, const_err=None, avg_time=None, verbosity=0, **kwargs)[source]¶ Applies default preprocessing and creates and returns a new
ehtim.obsdata.Obsdata
object. Flagging and averaging is performed using ehtim functinality. See the source code for the order in which operations are applied.- Parameters
obs (ehtim.obsdata.Obsdata,str) – An ehtim Obsdata object containing the desired observing profile or a uvfits file name to read.
ff (fisher.fisher_forecast.FisherForecast) – A
fisher.fisher_forecast.FisherForecast
child class describing the model for which we wish to apply the processing. Required for applying the SNR cut. Default: None.p (list) – Parameter list appropriate for ff. Requires ff to be specified. Default: None.
snr_cut (float) – SNR below which to exclude baselines. A proxy for a detectiton threshold. Rquires ff and p to be specified. Default: None.
sys_err (float) – Percent fractional systematic error to add. A proxy for non-closing errors. Default: None.
const_err (float) – A constant fractional error in mJy to add in quadrature. Default: None.
avg_time (float,str) – Coherently average data set. If a float, specifies the averaging time in seconds. If ‘scan’, will create and average on scans. Default: None.
verbosity (int) – Verbosity level. Default: 0.
- Returns
A new ehtime Obsdata object with the desired processing applied.
- Return type