The TOM is configured with built-in data processing on the upload of Data Products. This processing is broken up into three components.
run_data_processor upon saving the
DATA_PROCESSOR_CLASS, which can be specified in
processes the uploaded
DataProduct based on the tag value, which can either be Photometry or Spectroscopy.
In the case of spectra, the default behavior is that
DataProduct is converted into a
either a CSV or a FITS file. The spectrum is multiplied by the flux constant of the facility it was taken at, or not
Spectrum1D is then serialized into JSON for database via the
For photometry, the default behavior is simply to read the CSV and convert it to JSON for database storage.
.. autoclass:: tom_dataproducts.processors.data_serializers.SpectrumSerializer :members:
.. autofunction:: tom_dataproducts.data_processor.run_data_processor
.. autoclass:: tom_dataproducts.data_processor.DataProcessor :members: :private-members: :member-order: bysource