PlotProcessor#

class stixcore.io.product_processors.plots.processors.PlotProcessor(archive_path)[source]#

Bases: FitsL2Processor

A file product processor for plot images

Methods Summary

generate_filename(product, *[, version, suffix])

Generates a SOAR conform filename based on product characteristics.

generate_primary_header(filename, product, *)

Transforms the fits header into a more generic header dict that might be used in other output file formats

write_plot(product, *[, version])

Write products into a plot image file.

Methods Documentation

generate_filename(product, *, version=0, suffix='.svg')[source]#

Generates a SOAR conform filename based on product characteristics.

Parameters:
  • product (Product) – The data product the file name should be generated for

  • version (int, optional) – The file version, by default 0 = detect from codebase

  • suffix (str, optional) – file name suffix like svg, png, …, by default ‘.svg’

Returns:

Path – a Path object with full name and path

generate_primary_header(filename, product, *, version=0)[source]#

Transforms the fits header into a more generic header dict that might be used in other output file formats

Parameters:
  • filename (Path) – The envisoned file name and path for the product

  • product (Product) – The products holding the data

  • version (int, optional) – the processing version, by default 0 = detect from codebase

Returns:

dict – a dict of header keywords and values

write_plot(product, *, version=0)[source]#

Write products into a plot image file.

Parameters:
  • product (stixcore.product.level2)

  • version (int) – the version modifier for the filename default 0 = detect from codebase.

Returns:

list – of created file as pathlib.Path