import pyaurorax
import datetime
import pprint
aurorax = pyaurorax.PyAuroraX()
# set parameters
start_date = datetime.datetime(2019, 1, 1)
end_date = datetime.date(2019, 1, 10)
program = "swarm"
platform = "swarma"
instrument_type = "footprint"
print("%-18s%s" % ("Start Date:", start_date.strftime("%Y-%m-%d")))
print("%-18s%s" % ("End Date:", end_date.strftime("%Y-%m-%d")))
print("%-18s%s" % ("Program:", program))
print("%-18s%s" % ("Platform:", platform))
print("%-18s%s" % ("Instrument Type:", instrument_type))
Start Date: 2019-01-01 End Date: 2019-01-10 Program: swarm Platform: swarma Instrument Type: footprint
# get availability
availability = aurorax.search.availability.ephemeris(start_date,
end_date,
program=program,
platform=platform,
instrument_type=instrument_type,
format=pyaurorax.search.FORMAT_BASIC_INFO)
print(availability)
[AvailabilityResult(data_source=DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A', metadata=None, owner=None, maintainers=None, ephemeris_metadata_schema=None, data_product_metadata_schema=None, stats=None, format='basic_info'), available_data_products=None, available_ephemeris={'2019-01-01': 1440, '2019-01-02': 1440, '2019-01-03': 1440, '2019-01-04': 1440, '2019-01-05': 1440, '2019-01-06': 1440, '2019-01-07': 1440, '2019-01-08': 1440, '2019-01-09': 1440, '2019-01-10': 1440})]
pprint.pprint(availability[0].__dict__)
{'available_data_products': None, 'available_ephemeris': {'2019-01-01': 1440, '2019-01-02': 1440, '2019-01-03': 1440, '2019-01-04': 1440, '2019-01-05': 1440, '2019-01-06': 1440, '2019-01-07': 1440, '2019-01-08': 1440, '2019-01-09': 1440, '2019-01-10': 1440}, 'data_source': DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A', metadata=None, owner=None, maintainers=None, ephemeris_metadata_schema=None, data_product_metadata_schema=None, stats=None, format='basic_info')}