Data cubes (ps_eor.datacube)#
Data, image, weight, and noise cubes used throughout ps_eor.
The main analysis container is CartDataCube: a complex visibility
array shaped (frequency, spatial mode), together with its frequency and UV
coordinates, image metadata, and optional CartWeightCube. Keeping
those objects together lets filtering, foreground fitting, and power-spectrum
estimation preserve the geometry and statistical weights of the data.
For calibrated, frequency-dependent FITS images, the usual entry point is
CartDataCube.load_from_fits_image_and_psf(). It Fourier-transforms the
images, converts Jy/PSF to Kelvin when requested, uses the matching PSF FITS
files for the normalization and visibility weights, and restricts the result
to the requested baseline range:
import numpy as np
from ps_eor import datacube, psutil
image_files = psutil.sort_by_fits_key(image_files, 'CRVAL3')
psf_files = psutil.sort_by_fits_key(psf_files, 'CRVAL3')
cube = datacube.CartDataCube.load_from_fits_image_and_psf(
image_files,
psf_files,
umin=50,
umax=250,
theta_fov=np.deg2rad(4),
int_time=10,
total_time=10 * 3600,
)
cube.save('visibilities.h5')
Here umin and umax are in wavelengths, theta_fov is in radians,
and observing times are in seconds. When no PSF image is available,
CartDataCube.load_from_fits_image() provides an unweighted alternative.
Saved cubes retain their weights and metadata. Frequency slicing returns a new
cube, while methods named filter_* generally modify the cube in place:
cube = datacube.CartDataCube.load('visibilities.h5')
subband = cube.get_slice(120e6, 130e6)
subband.filter_uvrange(60, 200)
Use DataCube.copy() before an in-place operation when the original cube
must be retained.
- ps_eor.datacube.get_common_idx(cube1, cube2)[source]#
Return frequency and spatial-mode masks shared by two cubes.
- ps_eor.datacube.get_common_cube(cube1, cube2, only_frequency=False)[source]#
Return two cubes restricted to their common coordinates.
- ps_eor.datacube.concatenate_datacubes(cubes)[source]#
Concatenate Cartesian cubes with a shared UV grid along frequency.
- class ps_eor.datacube.Mask(masks=None)[source]#
Bases:
objectA sum of image-domain masks evaluated from cube metadata.
- class ps_eor.datacube.MaskProd(m1, m2)[source]#
Bases:
MaskPairwise product of two mask collections.
- class ps_eor.datacube.WindowFunction(name, circular=True)[source]#
Bases:
MaskTwo-dimensional spectral window applied in the image plane.
- class ps_eor.datacube.BasePrimaryBeam(masks, freq=None)[source]#
Bases:
MaskBase class for frequency-dependent primary-beam masks.
- class ps_eor.datacube.PrimaryBeam(antenna_diameter, alpha_tapering, beam_type, freq=None)[source]#
Bases:
BasePrimaryBeamAnalytic primary beam defined by an effective aperture diameter.
- static from_name(name)[source]#
Construct a primary beam by name.
nameis either a registered telescope (e.g.'lofar_hba','nenufar') or a customant_<diameter>_<alpha>_<beam_type>string.- Returns:
the matching beam.
- Return type:
- class ps_eor.datacube.LofarHBAPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for a LOFAR HBA station.
- class ps_eor.datacube.AartfaacA12HBAPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for an AARTFAAC-12 HBA tile.
- class ps_eor.datacube.LofarLBAInnerPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for LOFAR LBA inner mode.
- class ps_eor.datacube.LofarLBAOuterPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for LOFAR LBA outer mode.
- class ps_eor.datacube.SkaLowPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for an SKA-Low station.
- class ps_eor.datacube.NenuFARPrimaryBeam[source]#
Bases:
PrimaryBeamAnalytic beam approximation for a NenuFAR mini-array.
- class ps_eor.datacube.NoPrimaryBeam[source]#
Bases:
BasePrimaryBeamUnit primary beam.
- class ps_eor.datacube.ImageMetaData(wcs, shape, **kargs)[source]#
Bases:
objectWCS, image shape, and ps_eor-specific FITS metadata.
- property res#
Angular pixel size (resolution), in radians.
- property theta_fov#
Image field of view, in radians (
shape[0] * res).
- property total_time#
Total observing time in seconds (
PETOTTIM; 1 if unset).
- property int_time#
Integration (correlator dump) time in seconds (
PEINTTIM; 1 if unset).
- property freq_width#
Frequency-axis increment (channel spacing) in Hz, from the WCS.
- property chan_width#
PECHWIDTif set, else the WCS increment (differs fromfreq_widthwhen channels were averaged).- Type:
Physical channel width in Hz
- property obs_mjd#
Observation reference time (MJD), from the WCS.
- property ra_dec_center_deg#
Phase-centre (RA, Dec) in degrees, from the WCS.
- property win_fct#
The spectral
WindowFunctionfor this image (from its metadata).
- property win_fct_power#
The window function’s power normalization (see
WindowFunction.get_power()).
- property win_fct_area#
The window function’s effective area (see
WindowFunction.get_area()).
- static from_res(res, shape, **kargs)[source]#
Build metadata from a pixel size and image shape (phase centre at the origin).
- Parameters:
res – angular pixel size, in radians.
shape – image shape
(nx, ny).**kargs – extra FITS-style metadata (
PE*/WSC*/ allowed keys).
- Returns:
the new metadata.
- Return type:
- class ps_eor.datacube.ImageCube(image_cube, freqs, meta)[source]#
Bases:
objectBase frequency-dependent image cube.
- get_slice(freq_start, freq_end)[source]#
The channels within
[freq_start, freq_end](Hz).- Returns:
the frequency-sliced cube.
- Return type:
- class ps_eor.datacube.CartImageCube(image_cube, freqs, meta)[source]#
Bases:
ImageCubeFrequency cube of Cartesian sky images.
- ft(umin, umax)[source]#
Fourier transform image cube and return a CartDataCube.
- Parameters:
- Returns:
a new visibility cube.
- Return type:
- save_to_fits(fname, overwrite=True)[source]#
Write the image cube to a FITS file (in Kelvin).
- Parameters:
fname – output file path.
overwrite (
bool) – replace an existing file.
- plot(fmhz='med', action_fct=None, theta_lines=None, ax=None, title=None, auto_scale_quantiles=None, **kargs)[source]#
Show one channel (or a frequency reduction) as a sky image.
- Parameters:
fmhz – channel to show, in MHz, or
'med'/'first'/'last'(ignored ifaction_fctis given).action_fct – a reducer
f(data, axis=0)over frequency instead of one channel.theta_lines (
list) – angular radii (deg) at which to draw guide circles.ax – matplotlib Axes (new figure if None).
auto_scale_quantiles –
(lo, hi)quantiles for the colour limits.**kargs – forwarded to imshow.
- class ps_eor.datacube.GriddedCartDataCube(g_vis, g_uu, g_vv, freqs, meta)[source]#
Bases:
objectVisibility cube stored on a regular Cartesian UV grid.
- class ps_eor.datacube.DataCubeCombiner(umin, umax, weighting_mode='uv', inhomogeneous=False, w_square=False)[source]#
Bases:
objectIncrementally combine visibility cubes using configurable weights.
- class ps_eor.datacube.DataCube(data, freqs, weights=None)[source]#
Bases:
objectBase class for frequency-dependent data and optional weights.
- new_with_data(data, weights=None, freqs=None)[source]#
Build a cube of the same type/geometry with new
data(and, optionally,weights/freqs). Subclass hook.
- get_slice_from_idx(idx_freqs)[source]#
The channels selected by
idx_freqs(a mask, index array, or slice).- Returns:
the frequency-selected cube (same type as
self).- Return type:
- get_slice(freq_start, freq_end)[source]#
The channels within
[freq_start, freq_end](Hz).- Returns:
the frequency-sliced cube.
- Return type:
- get_freq(freq)[source]#
The single channel at or just above
freq(Hz).- Returns:
a one-channel cube.
- Return type:
- make_diff_cube()[source]#
Adjacent-channel differences (times sqrt(0.5)) – a signal-free, noise-like cube used to estimate the noise level.
- Returns:
the difference cube (one fewer channel).
- Return type:
- make_diff_cube_interp()[source]#
Like
make_diff_cube()but padded back to the original number of channels (last difference repeated).- Returns:
the difference cube (same channel count).
- Return type:
- class ps_eor.datacube.CartDataCube(data, uu, vv, freqs, meta, weights=None)[source]#
Bases:
DataCubeComplex visibilities on a non-gridded Cartesian UV plane.
- get_unique_xy()[source]#
A per-mode key encoding (u, v), used to match modes between cubes.
- Returns:
one float per mode, combining rounded
uuandvv.- Return type:
ndarray
- static load_from_fits(files, umin, umax, convert_jy2k=True)[source]#
Build a visibility cube from UV-plane FITS files (already gridded uv, not images).
- Parameters:
files – UV-plane FITS files, in frequency order.
umin – baseline range kept, in wavelengths.
umax – baseline range kept, in wavelengths.
convert_jy2k (
bool) – convert from Jy to Kelvin.
- Returns:
the visibility cube.
- Return type:
- static load_from_fits_image(files, umin, umax, theta_fov, imager_scale_factor=None, convert_jy2k=True, compat_wscnormf='old_normpsf', int_time=None, total_time=None, window_function=None, data_dtype=<class 'numpy.complex128'>)[source]#
Build a visibility cube from frequency-dependent FITS images (no PSF).
Images are optionally trimmed and windowed, converted from Jy/PSF to Kelvin, Fourier-transformed, and restricted to
[umin, umax]. Useload_from_fits_image_and_psf()when a PSF is available (it also derives weights).- Parameters:
files – FITS image files, in frequency order.
umin – baseline range kept, in wavelengths.
umax – baseline range kept, in wavelengths.
theta_fov – output field of view, in radians.
imager_scale_factor – explicit PSF area (pixel units); by default taken from
WSCNORMFor a Gaussian-beam approximation.convert_jy2k (
bool) – convert Jy/PSF images to Kelvin.compat_wscnormf (
str) – interpretation of legacyWSCNORMFmetadata.int_time – integration and total observing time (s), stored in the metadata.
total_time – integration and total observing time (s), stored in the metadata.
window_function – optional image-plane
WindowFunction.
- Returns:
the visibility cube (unweighted).
- Return type:
- static load_from_fits_image_and_psf(files, files_psf, umin, umax, theta_fov, int_time=None, total_time=None, convert_jy2k=True, min_weight_ratio=0.01, trim_method='before', use_wscnormf=False, compat_wscnormf='old_normpsf', window_function=None, abs_min_weight=0.5, data_dtype=<class 'numpy.complex128'>)[source]#
Build a visibility cube from matched image + PSF FITS files.
The standard loader when a per-frequency PSF is available: it divides the imaged visibilities by the PSF (undoing the dirty-image sampling response) and derives per-mode weights from that PSF, giving a properly weighted cube.
- Parameters:
files – image FITS files, in frequency order.
files_psf – matching PSF FITS files, one per image.
umin – baseline range kept, in wavelengths.
umax – baseline range kept, in wavelengths.
theta_fov – output field of view, in radians.
int_time – integration and total observing time (s), stored in the metadata for later noise / SEFD estimation.
total_time – integration and total observing time (s), stored in the metadata for later noise / SEFD estimation.
convert_jy2k (
bool) – convert Jy/PSF images to Kelvin.min_weight_ratio (
float) – drop modes whose weight is below this fraction of the per-mode maximum (0 disables).abs_min_weight (
float) – absolute floor applied to that threshold.trim_method (
str) –'before'trims totheta_fovbefore the PSF division,'after'trims afterwards.use_wscnormf (
bool) – normalise from the imageWSCNORMFmetadata instead of the PSF (weights still come from the PSF files).window_function – optional image-plane
WindowFunction.
- Returns:
the PSF-weighted visibility cube.
- Return type:
- static load_from_hd5(h5_group)[source]#
Deprecated alias for
load_from_h5().
- static load(filename)[source]#
Load a Cartesian visibility cube (and its weights, if present) from HDF5.
- Returns:
the loaded cube.
- Return type:
- static join_cubes(cubes)[source]#
Concatenate cubes along frequency, keeping the first copy of any overlapping channels.
- Returns:
the joined cube.
- Return type:
- save_to_hd5(h5_file, group)[source]#
Deprecated alias for
save_to_h5().
- new_with_data(data, weights=None, freqs=None, interpolate_weights=True)[source]#
A new cube with new
dataon this cube’s uv geometry.- Parameters:
data (
n_freqs,n_vis) – the new visibilities.weights – weights to attach (default: this cube’s).
freqs – frequencies for
data(default: this cube’s).interpolate_weights (
bool) – interpolate the weights ontofreqswhen the frequency grids differ.
- Returns:
the new cube.
- Return type:
- make_full_cube(umin, umax, output_idx=False)[source]#
Place the data on a complete frequency + uv grid, filling gaps with zero.
- Parameters:
umin – baseline range of the target uv grid, in wavelengths.
umax – baseline range of the target uv grid, in wavelengths.
output_idx (
bool) – also return the index arrays mapping this cube into the full grid.
- Returns:
the gap-filled cube (or
(cube, idx1, idx1_uv)whenoutput_idx).- Return type:
- estimate_sefd(sefd_jansky=True)[source]#
Overall system-equivalent flux density from this cube and its weights.
- Returns:
the SEFD, in Jy (
sefd_jansky=True) or Kelvin.- Return type:
- estimate_uv_sefd(sefd_jansky=True)[source]#
SEFD per uv sample (see
estimate_sefd()for units).- Returns:
the per-mode SEFD.
- Return type:
- estimate_freqs_sefd(sefd_jansky=True, sefd_poly_fit_deg=0)[source]#
SEFD per frequency channel (see
estimate_sefd()for units).
- get_hermitian_index()[source]#
Indices pairing each mode with its Hermitian conjugate (-u, -v).
- Returns:
(idx1, idx2)– the positive-half modes and their conjugate partners.- Return type:
- regrid()[source]#
Place the visibilities on their regular 2-D uv grid.
- Returns:
the gridded cube.
- Return type:
- image()[source]#
Fourier-transform the visibilities to the image plane.
- Returns:
the image cube.
- Return type:
- reduce_fov(new_fov, low_memory=False, umin=None, umax=None)[source]#
A copy with a smaller image-plane field of view.
Regrids, images, trims to
new_fov(radians), and Fourier-transforms back. Anew_fovlarger than the current one returnsself.- Parameters:
new_fov – target field of view, in radians.
low_memory (
bool) – process one channel at a time.umin – baseline range of the output (defaults to this cube’s).
umax – baseline range of the output (defaults to this cube’s).
- Returns:
the reduced-FoV cube (weights reduced too if present).
- Return type:
- apply_window_function(win_fct, umin=None, umax=None, add_to_meta=True)[source]#
A copy with the image-plane window function
win_fctapplied.- Parameters:
win_fct – the
WindowFunctionto apply (or its name).umin – baseline range of the output (defaults to this cube’s).
umax – baseline range of the output (defaults to this cube’s).
add_to_meta (
bool) – record the window in the output metadata.
- Returns:
the windowed cube.
- Return type:
- filter_min_weight(min_weight, replace=False, verbose=True)[source]#
Discard low-weight uv data in place.
- filter_sefd_uv(max_sefd, min_sefd=0)[source]#
Keep, in place, only uv modes whose mean estimated SEFD is within
[min_sefd, max_sefd].- Returns:
boolean mask of the kept modes.
- Return type:
ndarray
- filter_uv_from_index(idx_uv)[source]#
Keep only the uv modes selected by
idx_uv(a boolean mask or index array), dropping the rest in place (data, weights, and uu/vv/ru).
- average_freqs(n_freqs)[source]#
Weight-average consecutive groups of
n_freqschannels together.- Returns:
the down-sampled cube (weights summed accordingly).
- Return type:
- average_same_uv()[source]#
Weight-average visibilities sharing the same (u, v) into one mode each.
- Returns:
the cube with unique uv coordinates.
- Return type:
- plot_uv(fmhz='med', action_fct=None, uv_lines=None, ax=None, apply_uv_scale=False, title=None, **kargs)[source]#
Scatter-plot the visibilities on the uv plane.
- Parameters:
fmhz – channel to show, in MHz, or one of
'med'/'first'/'last'(ignored ifaction_fctis given).action_fct – a reducer
f(data, axis=0)applied over frequency instead of picking one channel (e.g.np.mean).uv_lines (
list) – baseline lengths at which to draw guide circles.ax – matplotlib Axes (new figure if None).
apply_uv_scale (
bool) – plot the uv-scaled (weighted) data.**kargs – forwarded to the matplotlib scatter call.
- class ps_eor.datacube.CartDataCubeMeter(data, uu, vv, freqs, meta, weights=None)[source]#
Bases:
CartDataCubeCartesian cube whose UV coordinates are stored in metres.
- get_cube(mfreq)[source]#
Convert to a wavelength-coordinate
CartDataCubeat reference frequencymfreq(Hz), dividing the metre coordinates by that wavelength.- Returns:
the wavelength-coordinate cube.
- Return type:
- get_baseline(mfreq, baseline)[source]#
The single mode at baseline length
baseline(metres), as a wavelength-coordinate cube at reference frequencymfreq(Hz).- Returns:
a one-mode cube (
Noneif no such baseline).- Return type:
- class ps_eor.datacube.MultiNightsCube(cubes=None, nights=None, inhomogeneous=False)[source]#
Bases:
objectCollection of compatible cubes indexed by observing night.
- concat()[source]#
Stack all nights into one cube along the visibility axis (each mode’s night recorded in
cube.origin).- Returns:
the concatenated cube.
- Return type:
- property data#
All nights’ data stacked along a third axis,
(n_freqs, n_vis, n_nights).
- property uu#
Shared u coordinates (from the first night).
- property vv#
Shared v coordinates (from the first night).
- property ru#
Shared baseline lengths (from the first night).
- property freqs#
Shared frequencies (from the first night).
- property meta#
Shared image metadata (from the first night).
- class ps_eor.datacube.MultiDataInfo(filename)[source]#
Bases:
objectObservation start, end, and duration values loaded from a text table.
- class ps_eor.datacube.NoiseStdCube(data, uu, vv, freqs, meta, weights=None)[source]#
Bases:
CartDataCubeFull complex thermal-noise standard deviation on a visibility grid.
datais real and non-negative and representssqrt(E[abs(noise) ** 2]). For circular complex Gaussian noise, each of the real and imaginary components therefore has variancedata ** 2 / 2.- property variance#
Full complex noise variance
E[abs(noise) ** 2].
- make_diff_cube_interp()[source]#
Return an unchanged copy; channel differencing is not defined here.
- generate_noise_cube(hermitian=True, rng=None)[source]#
Draw a complex Gaussian noise realization at this per-mode std.
- Parameters:
hermitian (
bool) – enforceV(-u,-v) = conj(V(u,v))so the image transform is real.- Returns:
one noise realization.
- Return type:
- new_with_data(data, weights=None, freqs=None)[source]#
A new NoiseStdCube of this geometry with new
data(a real, non-negative standard deviation).- Returns:
the new cube.
- Return type:
- class ps_eor.datacube.CartWeightCube(weight_cube, uu, vv, freqs, meta, uv_scale=None, freqs_n_nights=None)[source]#
Bases:
CartDataCubeVisibility sampling weights with an optional UV-dependent scale.
- get(with_uv_scale=True)[source]#
The effective (absolute) weights.
- Parameters:
with_uv_scale (
bool) – fold inuv_scale(the per-mode noise scaling); False returns the raw PSF weights.- Returns:
the weights, shape
(n_freqs, n_vis).- Return type:
ndarray
- filter_uv_from_index(idx_uv)[source]#
Keep only the uv modes
idx_uv(asCartDataCube.filter_uv_from_index()), also slicinguv_scale.
- get_slice_from_idx(idx)[source]#
Select the channels
idx, carrying the per-channel night counts.- Returns:
the sliced weights.
- Return type:
- make_full_cube(umin, umax)[source]#
Expand onto the full
[umin, umax]uv grid (asCartDataCube.make_full_cube()), filling absentuv_scalewith 1.- Returns:
the gridded weights.
- Return type:
- reduce_fov(new_theta_fov, low_memory=False, umin=None, umax=None)[source]#
Re-grid to a smaller field of view (as
CartDataCube.reduce_fov()).- Returns:
the re-gridded weights.
- Return type:
- apply_window_function(win_fct, umin=None, umax=None, mc_n_samples=2000, add_to_meta=True)[source]#
Apply a spatial window function (as
CartDataCube.apply_window_function()).- Returns:
the windowed weights.
- Return type:
- static load_from_fits_psf(files, umin, umax, int_time=None, total_time=None, theta_fov=None, low_memory=False, output_psf_cube=False, window_function=None, data_dtype=<class 'numpy.complex128'>)[source]#
Build a weight cube from frequency-dependent PSF FITS files.
The Fourier transform of the PSF is the uv sampling, which sets the per-mode weights. Used by
CartDataCube.load_from_fits_image_and_psf().- Parameters:
files – PSF FITS files, in frequency order.
umin – baseline range kept, in wavelengths.
umax – baseline range kept, in wavelengths.
int_time – integration and total observing time (s), required if not already in the FITS metadata.
total_time – integration and total observing time (s), required if not already in the FITS metadata.
theta_fov – output field of view, in radians.
low_memory (
bool) – process one channel at a time.output_psf_cube (
bool) – also return the (unweighted) PSF cube.window_function – optional image-plane
WindowFunction.
- Returns:
the weights (or
(psf_cube, weights)whenoutput_psf_cube).- Return type:
- static load_from_hd5(h5_group)[source]#
Deprecated alias for
load_from_h5().
- save_to_hd5(h5_file, group)[source]#
Deprecated alias for
save_to_h5().
- static from_noise_cube(noise_cube, delta_u)[source]#
Build inverse-variance weights from a noise cube.
Bins the noise by baseline length (steps of
delta_uwavelengths), measures its MAD per bin, and returns weights proportional to1 / noise_scale**2(normalised to unit mean).- Returns:
the derived weights.
- Return type:
- estimate_sefd(noise_cube, sefd_jansky=True, axis=None)[source]#
SEFD estimated from a noise realization and these weights.
- Parameters:
noise_cube – a noise
CartDataCubeon the same geometry.sefd_jansky (
bool) – return Jy (else Kelvin).axis – reduce over this axis (0 -> per uv mode, 1 -> per channel, None -> a single overall value).
- Returns:
The SEFD (MAD-averaged over
axis); scalar or array peraxis.
- estimate_uv_sefd(noise_cube, sefd_jansky=True)[source]#
SEFD per uv sample (see
estimate_sefd()).- Returns:
the per-mode SEFD (single averaged channel).
- Return type:
- estimate_freqs_sefd(noise_cube, sefd_jansky=True)[source]#
SEFD per frequency channel (see
estimate_sefd()).- Returns:
the SEFD per channel, shape
(n_freqs,).- Return type:
ndarray
- scale_with_noise_cube(noise_cube, sefd_poly_fit_deg=0, sefd_filter_n_bins=0, expected_sefd=None, scale_freqs=False)[source]#
Set
uv_scale(in place) so the weights reflect the SEFD measured fromnoise_cube– down-weighting noisier uv modes.- Parameters:
noise_cube – a noise
CartDataCubeon the same geometry.sefd_poly_fit_deg (
int) – if > 0, smooth the radial scale with a log-log polynomial of this degree.sefd_filter_n_bins (
int) – if > 0, smooth the scale over this many baseline-length bins instead.expected_sefd – reference SEFD the scale normalises to (default: the median measured SEFD).
scale_freqs (
bool) – also apply a per-channel SEFD scaling.
- random_scale(max_ratio=2, hermitian=True, rng=None)[source]#
Randomly perturb
uv_scalein place (log-uniform up tomax_ratio).- Parameters:
max_ratio – largest multiplicative perturbation.
hermitian (
bool) – keep conjugate modes consistent.
- simulate_noise(sefd, time, hermitian=True, weights_uncertainity_ratio=None, sefd_jansky=True, fake_apply_win_fct=False, rng=None)[source]#
Draw a thermal-noise visibility cube for a given SEFD and integration.
Noise per mode follows the radiometer equation, scaled by these weights.
- Parameters:
sefd – system-equivalent flux density (Jy if
sefd_jansky, else K).time – total integration time, in seconds.
hermitian (
bool) – make the realization Hermitian (real image).weights_uncertainity_ratio – if set, also perturb the weights randomly by up to this ratio (see
random_scale()).sefd_jansky (
bool) – interpretsefdin Jy (else Kelvin).fake_apply_win_fct (
bool) – scale as if a spatial taper were applied.
- Returns:
the simulated noise cube.
- Return type:
- get_noise_std_cube(sefd, time, fake_apply_win_fct=False)[source]#
The expected per-mode thermal-noise standard deviation (not a realization – see
simulate_noise()for that).- Parameters:
sefd – system-equivalent flux density, in Jy.
time – total integration time, in seconds.
fake_apply_win_fct (
bool) – scale as if a spatial taper were applied.
- Returns:
the per-mode noise standard deviation.
- Return type:
- new_with_data(data, weights=None, freqs=None)[source]#
A new CartWeightCube of this geometry with new weight
data(and, optionally,freqs);uv_scaleis carried over.- Returns:
the new weight cube.
- Return type:
- class ps_eor.datacube.CartWeightsCubeMeter(weight_cube, uu, vv, freqs, meta, uv_scale=None, freqs_n_nights=None)[source]#
Bases:
CartWeightCube,CartDataCubeMeterWeight-cube counterpart of
CartDataCubeMeter.- get_cube(mfreq)[source]#
A
CartWeightCubewith uv in wavelengths at frequencymfreq(Hz), converting from the metre coordinates held here.