Data Validation Quality Flags (dataval.quality)

Handling of TESS data quality flags.

Code author: Rasmus Handberg <>

class dataval.quality.DatavalQualityFlags(value)[source]

Bases: QualityFlagsBase

Quality flags indicating the status of data validation.

ContaminationHigh = 2048

Contamination high

FluxFFIOverTPF = 4

Star has higher measured flux in FFIs than TPFs

FluxTPFOverFFI = 8

Star has higher measured flux in TPFs than FFIs

InvalidContamination = 1024

Invalid contamination

InvalidFlux = 4096

Invalid mean flux (not finite or negative)

InvalidNoise = 8192
LargeMask = 64

Star has larger mask than general relation

LowPTP = 256

PTP lower than theoretical

LowRMS = 512

RMS lower than theoretical

MagVsFluxHigh = 1

Star has higher flux than given by magnitude relation

MagVsFluxLow = 2

Star has lower flux than given by magnitude relation

MinimalMask = 16

Star has minimum 4x4 mask

SmallMask = 32

Star has smaller mask than general relation

SmallStamp = 128

Smaller stamp than default

class dataval.quality.QualityFlagsBase(value)[source]

Bases: IntFlag

An enumeration.

classmethod filter(quality, flags=None)[source]

Filter quality flags against a specific set of flags.

  • quality (integer or ndarray) – Quality flags.

  • flags (integer bitmask) – Default=``TESSQualityFlags.DEFAULT_BITMASK``.


True if quality DOES NOT contain any of the specified flags, False otherwise.

Return type:


property binary_repr