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)
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')
def get_instrument(self, raw_metadata): return utils.get_gcmd_instrument('Computer')
def get_instrument(self, raw_metadata): return utils.get_gcmd_instrument(raw_metadata['sensor'])
def get_instrument(self, raw_metadata): return utils.get_gcmd_instrument('Altimeters')
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'])
def get_instrument(self, raw_metadata): return utils.get_gcmd_instrument('AMSR2')
def get_instrument(self, raw_metadata): return utils.get_gcmd_instrument('Imaging Spectrometers/Radiometers')