imap_processing.mag.l1a.mag_l1a.generate_dataset#

imap_processing.mag.l1a.mag_l1a.generate_dataset(single_file_l1a: MagL1a, logical_file_id: str, attribute_manager: ImapCdfAttributes) Dataset#

Generate a Xarray dataset for L1A data to output to CDF files.

Global_attrs should contain all info about mago/magi and burst/norm distinction, as

well as any general info in the global attributes.

Assumes each MagL1a object is a single day of data, so one MagL1a object has one CDF file output.

Parameters:
  • single_file_l1a (MagL1a) – L1A data covering one day to process into a xarray dataset.

  • logical_file_id (str) – Indicates which sensor (MagO or MAGi) and mode (burst or norm) the data is from. This is used to retrieve the global attributes from attribute_manager.

  • attribute_manager (ImapCdfAttributes) – Attributes for the dataset, as created by ImapCdfAttributes.

Returns:

dataset – One xarray dataset with proper CDF attributes and shape containing MAG L1A data.

Return type:

xarray.Dataset