code: def _get_line_offset(self):
          
          # Get line offset from the file
          nlines = int(self.mda['number_of_lines'])
          loff = np.float32(self.mda['loff'])
  
          # Adapt it to the current segment
          if self.is_segmented:
              # loff in the file specifies the offset of the full disk image
              # centre (1375/2750 for VIS/IR)
              segment_number = self.mda['segment_sequence_number'] - 1
              loff -= (self.mda['total_no_image_segm'] - segment_number - 1) * nlines
          elif self.area_id in (NORTH_HEMIS, SOUTH_HEMIS):
              # loff in the file specifies the start line of the half disk image
              # in the full disk image
              loff = nlines - loff
          elif self.area_id == UNKNOWN_AREA:
              logger.error('Cannot compute line offset for unknown area')
  
          return loff
docs: Get line offset for the current segment
  
          Read line offset from the file and adapt it to the current segment
          or half disk scan so that
  
              y(l) ~ l - loff
  
          because this is what get_geostationary_area_extent() expects.