Skip to content

BUG - GLOWS L2 calibration expects incorrect structure #2932

@vmartinez-cu

Description

@vmartinez-cu

Description of the issue

The L2 calibration that is applied to flux calculations expects an incorrect structure of the input calibration dataset which breaks the process for parsing the calibration factor needed.

Expected vs Actual behavior

Expected structure:
xr.Dataset with coordinate "start_time_utc" and data variable "cps_per_r"

Actual structure:
xr.Dataset with:

Dimensions:             (epoch: 70, 
                                start_time_utc_dim_0: 121,
                                cps_per_r_dim_0: 121)
Coordinates:
  * epoch               (epoch) datetime64[s] 
Data variables:
    start_time_utc       (epoch, start_time_utc_dim_0) <U19 
    cps_per_r               (epoch, cps_per_r_dim_0) float64 
    input_file_version  (epoch) float64 

Each epoch has the same start_time_utc and cps_per_r values and epoch doesn't necessarily match start_time_utc in size or values

@maxinelasp is this the intended structure for calibration data? This is created by the GlowsAncillaryCombiner

Fix

  1. Return GlowsAncillaryCombiner.convert_file_to_dataset related to the l2-calibration file type to how it was prior to recent PR (Glows L2 - Apply calibration #2918 ) that applied calibration since there is further processing of the xarray dataset downstream that were unclear before the change.
  2. Update glows_l2_data.HistogramL2.get_calibration_data to correctly parse the calibration dataset
  3. Update related tests

Metadata

Metadata

Assignees

Labels

Ins: GLOWSRelated to the GLOWS instrumentLevel: L2Level 2 processingbugSomething isn't working

Type

No type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions