convert_between_DN_and_photons

irispy.iris_tools.convert_between_DN_and_photons(old_data_arrays, old_unit, new_unit)[source] [edit on github]

Converts arrays from IRIS DN to photons or vice versa.

In this function, an inverse time component due to exposure time correction is ignored during calculations but preserved in final unit.

Parameters:
  • old_data_arrays (iterable of `numpy.ndarray`s) – Arrays of data to be converted.
  • old_unit (astropy.unit.Unit) – Unit of data arrays.
  • new_unit (astropy.unit.Unit) – Unit to convert data arrays to.
Returns:

  • new_data_arrays (list of `numpy.ndarray`s) – Data arrays converted to new_unit.
  • new_unit_time_accounted (astropy.unit.Unit) – Unit of new data arrays with any inverse time component preserved.