Exemplo n.º 1
0
 def get_instrument(self, raw_metadata):
     """Get the instrument from the attributes'"""
     instrument = raw_metadata['Instrument']
     additional_keywords = []
     if 'Satellite name' in raw_metadata:
         additional_keywords.append(raw_metadata['Satellite name'])
     return utils.get_gcmd_instrument(instrument, additional_keywords)
Exemplo n.º 2
0
 def get_instrument(self, raw_metadata):
     """Try to get the instrument from the metadata, and if not
     possible return a default value
     """
     if 'instrument_type' in raw_metadata.keys():
         return utils.get_gcmd_instrument(raw_metadata['instrument_type'])
     elif 'product_name' in raw_metadata.keys():
         if ('_ice_conc' in raw_metadata['product_name']
                 or '_ice_type' in raw_metadata['product_name']
                 or '_ice_edge' in raw_metadata['product_name']):
             return pti.get_gcmd_instrument(
                 'Imaging Spectrometers/Radiometers')
         elif 'amsr2ice_conc' in raw_metadata['product_name']:
             return pti.get_gcmd_instrument('AMSR2')
         elif '_mr_ice_drift' in raw_metadata['product_name']:
             return pti.get_gcmd_instrument('AVHRR')
     return pti.get_gcmd_instrument('Earth Remote Sensing Instruments')
Exemplo n.º 3
0
 def get_instrument(self, raw_metadata):
     return utils.get_gcmd_instrument('Computer')
Exemplo n.º 4
0
 def get_instrument(self, raw_metadata):
     return utils.get_gcmd_instrument(raw_metadata['sensor'])
Exemplo n.º 5
0
 def get_instrument(self, raw_metadata):
     return utils.get_gcmd_instrument('Altimeters')
Exemplo n.º 6
0
 def get_instrument(self, raw_metadata):
     """Only get the first instrument from the raw metadata, because
     GeoSPaaS does not support more than one instrument per dataset
     """
     return utils.get_gcmd_instrument(
         raw_metadata['umm']['Platforms'][0]['Instruments'][0]['ShortName'])
Exemplo n.º 7
0
 def get_instrument(self, raw_metadata):
     return utils.get_gcmd_instrument('AMSR2')
Exemplo n.º 8
0
 def get_instrument(self, raw_metadata):
     return utils.get_gcmd_instrument('Imaging Spectrometers/Radiometers')