# -*- coding: utf-8 -*- """ Template for the main solution code in Part 6 of the project. The objective of the template files is to give you an idea of the most important functions that you have to implement, what input they will need and what output they should produce. To make things work in practice you will have to add more functionalities than the ones outlined, and you might have to adapt the interfaces to fit your specific approach. You are of course free (and encouraged) to structure the code in any way you want! """ import ast2000tools.constants as const import ast2000tools.utils as utils from ast2000tools.space_mission import SpaceMission import part_3 def enter_low_orbit(landing_sequence): """ Here you can implement the commanding of the spacecraft for challenge A of Part 6 of the project. """ # Insert awesome code here... def fit_spectral_line(wavelengths, fluxes, noise_sigmas, line_reference_wavelength, line_species_mass): """ Here you can implement the spectral line fitting for challenge B of Part 6 of the project. """ # Insert awesome code here... # You will probably also need these constants: # const.c # const.k_B return fitted_central_wavelength, \ fitted_central_flux, \ fitted_std_dev def compute_atmospheric_profiles(system, planet_idx, mean_molecular_mass, heights): """ Here you can implement the atmospheric model for challenge C of Part 6 of the project. """ # Insert awesome code here... # You will need the following method: # part_3.compute_blackbody_surface_temperature # You will probably also need these quantities: # const.G # const.k_B # const.m_sun # system.masses # system.radii # system.atmospheric_densities # system.semi_major_axes return densities, temperatures def evolve_surface_coordinates(system, planet_idx, initial_surface_coordinates, duration): """ Here you can implement the surface coordinate evolution function for challenge D of Part 6 of the project. """ # Insert awesome code here... # You will probably also need these quantities: # const.pi # const.day # system.rotational_periods return evolved_surface_coordinates def scout_for_landing_sites(landing_sequence): """ Here you can implement the commanding of the spacecraft for challenge D of Part 6 of the project. """ # Insert awesome code here... # Prevent the following code from executing when calling `import part_6` if __name__ == '__main__': # Print a message if a newer version of ast2000tools is available utils.check_for_newer_version() # Load the mission instance saved after completing Part 5 mission = SpaceMission.load('mission_after_part_5.pickle') # Initiate the landing sequence landing_sequence = mission.begin_landing_sequence() # Send the spacecraft into a low circular orbit enter_low_orbit(landing_sequence) # Perform spectral line fitting to estimate mean_molecular_mass here... # Determine where to land scout_for_landing_sites(landing_sequence) # Save the mission instance after scouting SpaceMission.save('mission_after_part_6.pickle', mission)