comparison.observation.Observation#

class Observation(base_dir='', regridded_dir='/regridded/temp/')[source]#

Bases: object

This is an object to load individual observations. This is merely for the convenience of opening all of the observations in a consistent manner. There is an optional argument when initialising to set a base directory, which makes it easier to load multiple models in succession.

This initialises the object along with the base directory. The owned objects of base_dir and files are created. files can be modified again when loading a model, but for now it has the default filenames created with kosmatau3d.

Parameters:
  • base_dir – the base directory to use when loading observations. Default: ‘’.

  • regridded_dir – the directory to use to load regridded observations. Default: ‘/regridded/temp/’.

Methods

get_intensity

This method will return the intensity data

get_obs_extent

Return the extent of the observation with usable data (nonzero and non-NaN).

load_survey

Load a survey into memory.

reset_attributes

Reinitialise instance attributes.

get_intensity(filename=None, idx=None, integrated=False, log=False, nan=True, trimmed=False, verbose=False)[source]#

This method will return the intensity data

get_obs_extent(filename=None, idx=None, kind='extent', verbose=False)[source]#

Return the extent of the observation with usable data (nonzero and non-NaN). Can return either the dimension values (‘extent’) or the dimension indeces (‘index’), specified with kind.

Returns tuple of (lon, lat, vel)

load_survey(directory='', survey=None, lat=0)[source]#

Load a survey into memory.

reset_attributes()[source]#

Reinitialise instance attributes.