Data

Generic data classes.

API

Classes:

Data([name, datafile, input_directory])

Abstract class for data in Astropy ECSV files

Discrete(x, y, values, errors)

Class for discrete data

Integrated([aperturefile, binfile])

Abstract class for integrated data

class data.Data(name=None, datafile=None, input_directory=None)

Abstract class for data in Astropy ECSV files

The data is stored in the Astropy table at self.data

Parameters:
namestring

Descriptve name of this data set

datafilestring

name of the Astropy ECSV datafile

input_directorystring, or None

location of the data file

class data.Discrete(x, y, values, errors)

Class for discrete data

# TODO: make this!

class data.Integrated(aperturefile=None, binfile=None, **kwargs)

Abstract class for integrated data

e.g. kinematic maps, population maps. TODO: deal with mask files!

Parameters:
aperturefilestring

the name of the aperture.dat file of this dataset

binfilestring

the name of the bins.dat file of this dataset

maskfilestring

the name of the maskfile of this dataset

**kwargs

other keyword arguments

Methods:

add_psf_to_datafile([sigma, weight, datafile])

Write PSF into the datafile

convert_to_plot_coords(x, y)

Convert a set of co-ordinates (x,y) into those used for plotting.

get_map_plotter()

Get a function which can plot maps of this dataset

read_aperture_and_bin_files()

read aperture and bin files

add_psf_to_datafile(sigma=[1.0], weight=[1.0], datafile='datafile.ecsv')

Write PSF into the datafile

Quantities are written as meta-data under ‘PSF’. PSF represented by a sequence of (Gaussian) sigma and weights.

Parameters:
sigmalist

Gaussian std dev of PSF components

weightlist

weights of PSF components

datafilestring

output filename

convert_to_plot_coords(x, y)

Convert a set of co-ordinates (x,y) into those used for plotting.

i.e. rotated so major-axis lies along x-axis

Parameters:
xfloat, or array like

x-coordinates

yfloat, or array like

x-coordinates

Returns:
tuple

rotated (x,y) co-ordinates which can be used on plots

get_map_plotter()

Get a function which can plot maps of this dataset

Returns:
function

a function map plotter which plots kinematic maps

read_aperture_and_bin_files()

read aperture and bin files

Read the two files and store the required data for plotting with plotbin.display_pixels to the dictionary self.dp_args’’’

Returns:
Sets the attribute self.dp_args

Inheritance Diagram

Inheritance diagram of data, kinematics, populations