Example #1
0
from pyRT_DISORT.preprocessing.controller.unsure import Unsure
from pyRT_DISORT.preprocessing.controller.control import Control
from pyRT_DISORT.preprocessing.model.boundary_conditions import BoundaryConditions
from pyRT_DISORT.preprocessing.model.rayleigh import RayleighCo2
from pyRT_DISORT.preprocessing.model.surface import HapkeHG2Roughness
from pyRT_DISORT.preprocessing.model.aerosol import ForwardScatteringProperty, ForwardScatteringProperties
from pyRT_DISORT.preprocessing.utilities.external_files import ExternalFile
from pyRT_DISORT.preprocessing.model.atmosphere import ModelGrid
from pyRT_DISORT.preprocessing.model.aerosol_column import Column
from pyRT_DISORT.preprocessing.model.vertical_profiles import Conrath
from pyRT_DISORT.preprocessing.model.new_phase_function import LegendreCoefficients, HenyeyGreenstein, TabularLegendreCoefficients

import numpy as np

# Define some files I'll need
dust_phase = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/dust_phase_functions.npy'))
dust_phase_radii = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/dust_phase_function_radii.npy'))
dust_phase_wavs = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/dust_phase_function_wavelengths.npy'))
ice_coeff = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/legendre_coeff_h2o_ice.npy'))
dustfile = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/dust.npy'))
icefile = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/ice.npy'))
atm = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/mars_atm_copy.npy'))
altitude_map = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/altitude_map.npy'))
solar_spec = ExternalFile(os.path.join(get_data_path(), 'aux/solar_spectrum.npy'))
albedo_map = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/albedo_map.npy'))

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Preprocessing steps
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Step 0.0: Read in the atmosphere file
atmFile = ExternalFile(os.path.join(get_data_path(), 'planets/mars/aux/mars_atm.npy'))
Example #2
0
from pyRT_DISORT.preprocessing.controller.size import Size
from pyRT_DISORT.preprocessing.controller.unsure import Unsure
from pyRT_DISORT.preprocessing.controller.control import Control
from pyRT_DISORT.preprocessing.model.boundary_conditions import BoundaryConditions
from pyRT_DISORT.preprocessing.model.rayleigh import RayleighCo2
from pyRT_DISORT.data.get_data import get_data_path
from pyRT_DISORT.preprocessing.model.surface import HapkeHG2Roughness
from pyRT_DISORT.preprocessing.model.phsfn import PhaseFunction
from pyRT_DISORT.preprocessing.model.phsfn1 import HenyeyGreenstein, EmpiricalPhaseFunction

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Make the model atmosphere
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Define some files I'll need

phase = os.path.join(get_data_path(),
                     'planets/mars/aux/dust_phase_functions.npy')
phase_radii = os.path.join(get_data_path(),
                           'planets/mars/aux/dust_phase_function_radii.npy')
phase_wavs = os.path.join(
    get_data_path(), 'planets/mars/aux/dust_phase_function_wavelengths.npy')
ice_coeff = os.path.join(get_data_path(),
                         'planets/mars/aux/legendre_coeff_h2o_ice.npy')
dustfile = os.path.join(get_data_path(), 'planets/mars/aux/dust.npy')
icefile = os.path.join(get_data_path(), 'planets/mars/aux/ice.npy')
#atm = os.path.join(get_data_path(), 'planets/mars/aux/mars_atm.npy')
atm = os.path.join(get_data_path(), 'planets/mars/aux/mars_atm_copy.npy')
altitude_map = os.path.join(get_data_path(),
                            'planets/mars/aux/altitude_map.npy')
solar_spec = os.path.join(get_data_path(), 'aux/solar_spectrum.npy')
albedo_map = os.path.join(get_data_path(), 'planets/mars/aux/albedo_map.npy')
Example #3
0
from pyRT_DISORT.preprocessing.controller.output import Output
from pyRT_DISORT.preprocessing.model.phase_function import TabularLegendreCoefficients
from pyRT_DISORT.preprocessing.controller.size import Size
from pyRT_DISORT.preprocessing.controller.unsure import Unsure
from pyRT_DISORT.preprocessing.controller.control import Control
from pyRT_DISORT.preprocessing.model.boundary_conditions import BoundaryConditions
from pyRT_DISORT.preprocessing.model.rayleigh import RayleighCo2
from pyRT_DISORT.preprocessing.model.surface import HapkeHG2Roughness

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Make the model atmosphere
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Define some files I'll need

dust_phase = ExternalFile(
    os.path.join(get_data_path(), 'planets/mars/aux/dust_phase_functions.npy'))
dust_phase_radii = ExternalFile(
    os.path.join(get_data_path(),
                 'planets/mars/aux/dust_phase_function_radii.npy'))
dust_phase_wavs = ExternalFile(
    os.path.join(get_data_path(),
                 'planets/mars/aux/dust_phase_function_wavelengths.npy'))
ice_coeff = ExternalFile(
    os.path.join(get_data_path(),
                 'planets/mars/aux/legendre_coeff_h2o_ice.npy'))
dustfile = ExternalFile(
    os.path.join(get_data_path(), 'planets/mars/aux/dust.npy'))
icefile = ExternalFile(
    os.path.join(get_data_path(), 'planets/mars/aux/ice.npy'))
atm = ExternalFile(
    os.path.join(get_data_path(), 'planets/mars/aux/mars_atm_copy.npy'))
Example #4
0
import os
from pyRT_DISORT.data.get_data import get_data_path
from pyRT_DISORT.preprocessing.utilities.external_files import ExternalFile
from pyRT_DISORT.preprocessing.utilities.fit_phase_function import PhaseFunction

ice_phase_function = ExternalFile(os.path.join(
    get_data_path(), 'planets/mars/aux/ice_shape001_r030_00321.dat'),
                                  header_lines=3,
                                  text1d=False)
pf = PhaseFunction(ice_phase_function.array)
created_coefficients = pf.create_legendre_coefficients(n_moments=128,
                                                       n_samples=361)
print(created_coefficients)