doocspie.util

This subpackages provides the utility modules for convenient working with doocspie.

colors

Module with convenient color palettes for plotting purposes.

This module provides convenient color palettes via class attributes for plotting purposes.

class doocspie.util.colors.Colors

ReadOnly Colors class aggregating the actual color palettes.

This class aggregates the actual color palettes.

DESY
Tango
class doocspie.util.colors.DESY

Read-only DESY class with DESY corporate design color palette.

This class provides the DESY corporate design color palette.

CYAN
ORANGE
BLACK
WHITE
RED
DARK_RED
GREEN
LIGHT_GREEN
DARK_BLUE
YELLOW
MAGENTA
VIOLET
PURPLE
OLIVE
DARK_OLIVE
LIGHT_BROWN
DARK_BROWN
TURQUOISE
PETROL
AUBERGINE
LIGHT_GRAY_1
LIGHT_GRAY_2
LIGHT_GRAY_3
GRAY_1
GRAY_2
DARK_GRAY
ANTHRACITE
class doocspie.util.colors.Tango

ReadOnly Tango class with Tango desktop project color palette.

This class provides the Tango desktop project color palette.

SCARLET_RED_1
SCARLET_RED_2
SCARLET_RED_3
SKY_BLUE_1
SKY_BLUE_2
SKY_BLUE_3
CHAMELEON_1
CHAMELEON_2
CHAMELEON_3
PLUM_1
PLUM_2
PLUM_3
CHOCOLATE_1
CHOCOLATE_2
CHOCOLATE_3
ORANGE_1
ORANGE_2
ORANGE_3
BUTTER_1
BUTTER_2
BUTTER_3
ALUMINIUM_1
ALUMINIUM_2
ALUMINIUM_3
ALUMINIUM_4
ALUMINIUM_5
ALUMINIUM_6

functions

Utility functions for convenient working with doocspie.

This module provides the utility functions for convenient working with the doocspie output.

doocspie.util.functions.get_time_axis(readout)

Get the time axis for a readout object of a given spectral DOOCS property.

Parameters:

readout (Readout) – The readout object of spectral DOOCS properties.

Returns:

The time axis of the spectral DOOCS property.

Return type:

numpy.ndarray

Raises:

TypeError – Exception for wrong ‘readout.type’ type.

doocspie.util.functions.get_image(readout, swap_bytes=False)

Get the image for a readout object of a given image-like DOOCS byte array property.

Parameters:
  • readout (Readout) – The readout object of image-like DOOCS byte arrays.

  • swap_bytes (bool, optional) – The optional state for swapping bytes.

Returns:

The image of the image-like DOOCS byte array property.

Return type:

numpy.ndarray

Raises:
  • TypeError – Exception for wrong ‘readout.type’ type.

  • ValueError – Exception for wrong ‘readout.meta.option’ option.

constants

Module with typical physical constants for calculation purposes.

This module provides typical physical constants in SI units for calculation purposes.

class doocspie.util.constants.Constants

Read-only Constants class with typical physical constants in SI units.

This class provides typical physical constants from https://pml.nist.gov/cuu/Constants/.

ELECTRON_MASS
ELEMENTARY_CHARGE
PLANCK_CONSTANT
SPEED_OF_LIGHT
VACUUM_PERMEABILITY
VACUUM_PERMITTIVITY