code: def get_airmass(self, times=None, solar_position=None,
                      model='kastenyoung1989'):
          
  
          if solar_position is None:
              solar_position = self.get_solarposition(times)
  
          if model in atmosphere.APPARENT_ZENITH_MODELS:
              zenith = solar_position['apparent_zenith']
          elif model in atmosphere.TRUE_ZENITH_MODELS:
              zenith = solar_position['zenith']
          else:
              raise ValueError('{} is not a valid airmass model'.format(model))
  
          airmass_relative = atmosphere.get_relative_airmass(zenith, model)
  
          pressure = atmosphere.alt2pres(self.altitude)
          airmass_absolute = atmosphere.get_absolute_airmass(airmass_relative,
                                                             pressure)
  
          airmass = pd.DataFrame(index=solar_position.index)
          airmass['airmass_relative'] = airmass_relative
          airmass['airmass_absolute'] = airmass_absolute
  
          return airmass
docs: Calculate the relative and absolute airmass.
  
          Automatically chooses zenith or apparant zenith
          depending on the selected model.
  
          Parameters
          ----------
          times : None or DatetimeIndex, default None
              Only used if solar_position is not provided.
          solar_position : None or DataFrame, default None
              DataFrame with with columns 'apparent_zenith', 'zenith'.
          model : str, default 'kastenyoung1989'
              Relative airmass model
  
          Returns
          -------
          airmass : DataFrame
              Columns are 'airmass_relative', 'airmass_absolute'