Product (‘stixpy.product’)#

Overview#

One of core classes in stixpy is a Product. A stixpy Product object is a container for STIX data. In order to make it easy to work with STIX data in stixpy, the Product object provides a number of methods for commonly performed operations.

Products are subclasses of GenericProduct and these objects are created using the Product factory Product.

Creating Product Objects#

stixpy Product objects are constructed using the special factory class Product:

>>> x = stixpy.product.Product('file.fits')

The result of a call to Product will be either a GenericProduct object, or a subclass of GenericProduct which either deals with a specific type of STIX data, e.g. QLLightCurve or Spectrogram (see Product Classes to see a list of all of them), or if no product matches, GenericProduct.

class stixpy.product.product_factory.ProductFactory(default_widget_type=None, additional_validation_functions=[], registry=None)[source]#

A factory for generating stix data products

Parameters:

*inputs – Inputs to parse for map objects. See the examples section for a detailed list of accepted inputs.

Returns:

  • stixpy.product.Product – If the input results in a singular product, then that is returned.

  • list of Product – If multiple inputs a list of Product objects will be returned.

Examples

stixpy.product Package#

All stixpy Products are derived from stixpy.product.GenericProduct, all the methods and attributes are documented in that class.

stixpy.product Package#

Variables#

Product

A factory for generating stix data products

Product Classes#

Defined in stixpy.product.sources are a set of GenericProduct subclasses which convert the specific metadata and other differences in each data type a standard GenericProduct interface. These subclasses also provide a method, which describes to the Product factory which inputs match its product.

stixpy.product.sources Package#

Classes#

CompressedPixelData(*, meta, control, data, ...)

Compressed count data from selected pixels, detectors and energies.

DetectorMasks(mask_array)

Detector Index Masks

EnergyEdgeMasks(mask_array)

Energy Edges Mask

HKMaxi(**kwargs)

HK “maxi” report with is reported in all modes of the Application SW.

HKMini(**kwargs)

HK “mini” report only generated during the Start-up SW.

HouseKeepingProduct(**kwargs)

Basic HouseKeeping

IndexMasks(mask_array)

Index mask class to store masked indices.

PPrintMixin()

Provides pretty printing for index masks.

PixelMasks(pixel_masks)

Pixel Index Masks

PixelPlotMixin()

Pixel plot mixin providing pixel plotting for pixel data.

QLBackground(**kwargs)

Quicklook Background nominal in 5 energy bins every 8s

QLFlareFlag(**kwargs)

Quicklook Flare flag and location

QLLightCurve(**kwargs)

Quicklook Lightcurves nominal in 5 energy bins every 4s

QLVariance(**kwargs)

Quicklook variance nominally in 5 energy bins every 8s

QuickLookProduct(**kwargs)

Basic science data class

RawPixelData(*, meta, control, data, energies)

Uncompressed or raw count data from selected pixels, detectors and energies.

ScienceData(*, meta, control, data, energies)

Basic science data class

Spectrogram(*, meta, control, data, ...)

Spectrogram from selected pixels, detectors and energies.

SpectrogramPlotMixin()

Spectrogram plot mixin providing spectrogram plotting for pixel data.

SummedCompressedPixelData(*, meta, control, ...)

Compressed and Summed count data from selected pixels, detectors and energies.

TimesSeriesPlotMixin()

TimesSeries plot mixin providing timeseries plotting for pixel data.

Visibility(*, header, control, data, energies)

Compressed visibilities from selected pixels, detectors and energies.

Class Inheritance Diagram#

Inheritance diagram of stixpy.product.sources.science.CompressedPixelData, stixpy.product.sources.science.DetectorMasks, stixpy.product.sources.science.EnergyEdgeMasks, stixpy.product.sources.housekeeping.HKMaxi, stixpy.product.sources.housekeeping.HKMini, stixpy.product.sources.housekeeping.HouseKeepingProduct, stixpy.product.sources.science.IndexMasks, stixpy.product.sources.science.PPrintMixin, stixpy.product.sources.science.PixelMasks, stixpy.product.sources.science.PixelPlotMixin, stixpy.product.sources.quicklook.QLBackground, stixpy.product.sources.quicklook.QLFlareFlag, stixpy.product.sources.quicklook.QLLightCurve, stixpy.product.sources.quicklook.QLVariance, stixpy.product.sources.quicklook.QuickLookProduct, stixpy.product.sources.science.RawPixelData, stixpy.product.sources.science.ScienceData, stixpy.product.sources.science.Spectrogram, stixpy.product.sources.science.SpectrogramPlotMixin, stixpy.product.sources.science.SummedCompressedPixelData, stixpy.product.sources.science.TimesSeriesPlotMixin, stixpy.product.sources.science.Visibility