code: def magnitude2cps(self, magnitude):
          
          # compute counts in units of ADS (as magnitude zero point is defined)
          cps = data_util.magnitude2cps(magnitude, magnitude_zero_point=self._magnitude_zero_point)
          if self._data_count_unit == 'e-':
              cps *= self.ccd_gain
          return cps
docs: converts an apparent magnitude to counts per second (in units of the data)
  
          The zero point of an instrument, by definition, is the magnitude of an object that produces one count
          (or data number, DN) per second. The magnitude of an arbitrary object producing DN counts in an observation of
          length EXPTIME is therefore:
          m = -2.5 x log10(DN / EXPTIME) + ZEROPOINT
  
          :param magnitude: magnitude of object
          :return: counts per second of object