Skip to content
Snippets Groups Projects
Commit bdb6d33d authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Fix inspect plot

parent a3331b6c
No related branches found
No related tags found
No related merge requests found
...@@ -68,10 +68,17 @@ requirements: ...@@ -68,10 +68,17 @@ requirements:
n_baselines = int((n_antennas + 1) * n_antennas * .5) n_baselines = int((n_antennas + 1) * n_antennas * .5)
n_times = flags.shape[0] // n_baselines n_times = flags.shape[0] // n_baselines
dataloss = np.array(vis == 0, dtype=np.int) dataloss = np.array(vis == 0, dtype=np.int)
urange = np.linspace(-np.max(uvw[:, 0]), np.max(uvw[:, 0]), sampling, endpoint=True)
vrange = np.linspace(-np.max(uvw[:, 1]), np.max(uvw[:, 1]), sampling, endpoint=True)
dataloss_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1], weights=np.nanmean(dataloss, axis=(1,2))) dataloss_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1], weights=np.nanmean(dataloss, axis=(1,2)))
flag_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1], weights=np.nanmean(flags, axis=(1,2))) dataloss_matrix += np.histogramdd(-uvw, bins=[urange, vrange, 1], weights=np.nanmean(dataloss, axis=(1,2)))[0]
coverage, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1])
flag_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1], weights=np.nanmean(flags, axis=(1,2)))
flag_matrix += np.histogramdd(-uvw, bins=[urange, vrange, 1], weights=np.nanmean(flags, axis=(1,2)))[0]
coverage, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1])
coverage += np.histogramdd(-uvw, bins=[urange, vrange, 1])[0]
flags = flags.reshape(n_times, n_baselines, *flags.shape[1:], order='C') flags = flags.reshape(n_times, n_baselines, *flags.shape[1:], order='C')
dataloss = dataloss.reshape(n_times, n_baselines, *flags.shape[2:], order='C') dataloss = dataloss.reshape(n_times, n_baselines, *flags.shape[2:], order='C')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment