Created
August 8, 2019 10:30
-
-
Save jorgepiloto/0dc3e4a01aeaa33e28629256341e47a1 to your computer and use it in GitHub Desktop.
Creates atmospheric tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy.io import ascii | |
from astropy import units as u | |
from poliastro.atmosphere.models import COESA62 | |
from prettytable import PrettyTable | |
import numpy as np | |
coesa62 = COESA62() | |
t = PrettyTable() | |
t.align='l' | |
t.border=False | |
t.add_column("Z [km]", coesa62._Zb_table.to(u.km).round(0).value) | |
t.add_column("H [km]", coesa62._Hb_table.to(u.km).round(0).value) | |
t.add_column("Tm [K]", coesa62._Tb_table.to(u.K).round(2).value) | |
t.add_column("p[mbar]", coesa62._pb_table.to(u.mbar).value) | |
atmosphere_file = open('coesa62.dat', 'w') | |
atmosphere_file.write(str(t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment