dither – Dither file parser

Fake an empty dither (EmptyDither) or parse a dither file like the following (ParseDither)

# basename          modelbase           ditherx dithery seeing norm airmass
SIMDEX-obs-1_D1_046 SIMDEX-obs-1_D1_046   0.00   0.00    1.60  1.00  1.22
SIMDEX-obs-1_D2_046 SIMDEX-obs-1_D2_046   0.61   1.07    1.60  1.00  1.22
SIMDEX-obs-1_D3_046 SIMDEX-obs-1_D3_046   1.23   0.00    1.60  1.00  1.22
exception pyhetdex.het.dither.DitherParseError[source]

Bases: exceptions.ValueError

Custom error

class pyhetdex.het.dither._BaseDither[source]

Bases: object

Base class for the dither object. Just defines the common public variables

Attributes

basename (dictionary) basenames of the dither files; key : dither; value: basename
dx, dy (dictionaries) dither relative x and y position; key : dither; value: dx, dy
seeing (dictionary) dither image quality; key dither; value : image quality
norm (dictionary) relative flux normalisation among dithers; key dither; value : normalisation
airmass (dictionary) dither airmass; key dither; value : airmass
dithers[source]

List of dithers

absfname[source]

Absolute file name

abspath[source]

Absolute file path

filename[source]

Absolute file path

class pyhetdex.het.dither.EmptyDither[source]

Bases: pyhetdex.het.dither._BaseDither

Creates a dither object with only one entry.

The dither key is D1, basename and absfname are left emtpy, dx and dy are set to 0 and image quality, illumination and airmass are set to 1. It is provided as a stub dither object in case the real one does not exists.

_no_dither()[source]

Fake a single dither

class pyhetdex.het.dither.ParseDither(dither_file)[source]

Bases: pyhetdex.het.dither._BaseDither

Parse the dither file and store the informations in dictionaries with the string Di, with i=1,2,3, as key

Parameters:

dither_file : string

file containing the dither relative position.

Raises:

DitherParseError

if the key Di is not found in the base name

_read_dither(dither_file)[source]

Read the relative dither position

Parameters:

dither_file : string

file containing the dither relative position. If None a single dither added