ISCE_INSAR/components/isceobj/StripmapProc/Sensor.py

20 lines
551 B
Python
Raw Normal View History

2019-01-16 19:40:08 +00:00
#!/usr/bin/env python3
from isceobj.Sensor import createSensor as CS
import logging
def createSensor(commonSensor, specificSensor, name=None):
if specificSensor not in [None, '']:
if name is not None:
logging.info('{0} sensor object provided explicitly'.format(name))
return CS(specificSensor, name)
if commonSensor not in [None, '']:
if name is not None:
logging.info('{0} sensor not provided explicitly, using common sensor'.format(name))
return CS(commonSensor, name)