pomme.observation

class pomme.observation.Beam(datacube)

Bases: object

apply(image)

Apply beam kernel to image.

Parameters:

image (np.ndarray) – Image to apply the beam to.

Returns:

convolved_image – Input image convolved with the beam.

Return type:

np.ndarray

get_torch_kernel(pixsize)

Getter for the beam of the observation as a torch kernel.

Parameters:

pixsize (float) – Pixel size in the same units as the beam.

Returns:

torch_kernel – Torch kernel object.

Return type:

torch.nn.Conv2d

torch_apply(data)

Apply torch kernel. Assumes the last axis to contain the frequencies / channels.

Parameters:

data (torch.Tensor) – Data to apply the beam to.

Returns:

dat – Data convolved with the beam.

Return type:

torch.Tensor

class pomme.observation.DataCube(fits_file)

Bases: object

Data structure for a data cube of spectral line images. Helps to conveniently read and visualize spectral line images.

plot_channel_maps()

Plot channel maps for this observation.

plot_spectrum()

Plot spectrum at a pixel for this observation.

plot_xf_maps()

Plot x-axis / frequency maps for this observation.

plot_xy_maps()

Plot x / y maps for this observation. (Alias for plot_channel_maps.)

plot_yf_maps()

Plot y-axis / frequency maps for this observation.

read_fits_file(fits_file)

Reader for fits files containing spectral line images.

Parameters:

fits_file (str) – Path to the fits file containing the spectral line image.