in sdap/processors/extracttimestampprocessor.py [0:0]
def process_nexus_tile(self, nexus_tile):
output_tile = nexusproto.DataTile_pb2.NexusTile()
output_tile.CopyFrom(nexus_tile)
file_path = output_tile.summary.granule
file_path = file_path[len('file:'):] if file_path.startswith('file:') else file_path
tile_type = nexus_tile.tile.WhichOneof("tile_type")
with Dataset(file_path) as ds:
timestamp = getattr(ds,self.timestamp_name)
seconds = to_seconds_from_epoch(timestamp, self.timestamp_pattern)
if tile_type == "grid_tile":
nexus_tile.tile.grid_tile.time = seconds
else:
raise BadTimestampExtractionException("Unsupported tile type: {}".format(tile_type))
yield nexus_tile