def __check_empirical_phase_function_is_physical(self): epf_checker = ArrayChecker(self.empirical_phase_function, 'empirical_phase_function') epf_checker.check_object_is_array() epf_checker.check_ndarray_is_numeric() epf_checker.check_ndarray_is_positive_finite() epf_checker.check_ndarray_is_1d()
def __check_solar_zenith_angles_are_physical(self): solar_zenith_angle_checker = ArrayChecker(self.solar_zenith_angles, 'solar_zenith_angles') solar_zenith_angle_checker.check_object_is_array() solar_zenith_angle_checker.check_ndarray_is_numeric() solar_zenith_angle_checker.check_ndarray_is_in_range(0, 180) solar_zenith_angle_checker.check_ndarray_is_1d()
def __check_emission_angles_are_physical(self): emission_angle_checker = ArrayChecker(self.emission_angles, 'emission_angles') emission_angle_checker.check_object_is_array() emission_angle_checker.check_ndarray_is_numeric() emission_angle_checker.check_ndarray_is_in_range(0, 90) emission_angle_checker.check_ndarray_is_1d()
def __check_long_wavelengths_are_physical(self): long_wav_checker = ArrayChecker(self.long_wavelengths, 'long_wavelengths') long_wav_checker.check_object_is_array() long_wav_checker.check_ndarray_is_numeric() long_wav_checker.check_ndarray_is_positive_finite() long_wav_checker.check_ndarray_is_1d()
def __check_short_wavelengths_are_physical(self): short_wav_checker = ArrayChecker(self.short_wavelengths, 'short_wavelengths') short_wav_checker.check_object_is_array() short_wav_checker.check_ndarray_is_numeric() short_wav_checker.check_ndarray_is_positive_finite() short_wav_checker.check_ndarray_is_1d()
def __check_particle_size_profile_is_physical(self): size_checker = ArrayChecker(self.particle_size_profile, 'particle_size_profile') size_checker.check_object_is_array() size_checker.check_ndarray_is_numeric() size_checker.check_ndarray_is_positive_finite() size_checker.check_ndarray_is_1d()
def long_wavelength(self, val): long_wav_checker = ArrayChecker(val, 'long_wavelength') long_wav_checker.check_object_is_array() long_wav_checker.check_ndarray_is_numeric() long_wav_checker.check_ndarray_is_positive_finite() long_wav_checker.check_ndarray_is_1d() if hasattr(self, 'short_wavelength'): self.__check_long_wavelength_has_same_shape_as_short_wavelength(val) self.__check_log_wavelength_is_longer_than_short_wavelength(val) self.__long_wavelength = val
def __check_mixing_ratio_profile_is_physical(self): mixing_ratio_checker = ArrayChecker(self.mixing_ratio_profile, 'mixing_ratio_profile') mixing_ratio_checker.check_object_is_array() mixing_ratio_checker.check_ndarray_is_numeric() mixing_ratio_checker.check_ndarray_is_non_negative() mixing_ratio_checker.check_ndarray_is_finite() mixing_ratio_checker.check_ndarray_is_1d()
def __check_angles_are_physical(self): angles_checker = ArrayChecker(self.angles, 'angles') angles_checker.check_object_is_array() angles_checker.check_ndarray_is_numeric() angles_checker.check_ndarray_is_in_range(0, np.pi) angles_checker.check_ndarray_is_1d()
def __check_grid_is_physical(grid, grid_name): if grid is not None: grid_checker = ArrayChecker(grid, grid_name) grid_checker.check_object_is_array() grid_checker.check_ndarray_is_numeric() grid_checker.check_ndarray_is_positive_finite() grid_checker.check_ndarray_is_1d() grid_checker.check_1d_array_is_monotonically_increasing()
def __check_property_is_physical(self): properties_checker = ArrayChecker(self.property_values, 'scattering_property') properties_checker.check_object_is_array() properties_checker.check_ndarray_is_numeric() properties_checker.check_ndarray_is_finite()
def __check_altitudes_are_decreasing(self): altitude_grid_checker = ArrayChecker(self.altitude_grid, 'altitude_grid') altitude_grid_checker.check_1d_array_is_monotonically_decreasing()
def __check_addition_is_numpy_array(array, name): hdu_checker = ArrayChecker(array, name) hdu_checker.check_object_is_array()
def __check_phase_angles_are_physical(self): phase_angle_checker = ArrayChecker(self.phase_angles, 'phase_angles') phase_angle_checker.check_object_is_array() phase_angle_checker.check_ndarray_is_numeric() phase_angle_checker.check_ndarray_is_in_range(0, 180) phase_angle_checker.check_ndarray_is_1d()
def __check_boundary_altitudes(self): altitude_checker = ArrayChecker(self.boundary_altitudes, 'boundary_altitudes') altitude_checker.check_object_is_array() altitude_checker.check_ndarray_is_numeric() altitude_checker.check_ndarray_is_finite() altitude_checker.check_ndarray_is_non_negative() altitude_checker.check_ndarray_is_1d() altitude_checker.check_1d_array_is_monotonically_decreasing() altitude_checker.check_1d_array_is_at_least(2)
def __check_altitude_grid_is_physical(self): altitude_checker = ArrayChecker(self.altitude_grid, 'altitude_grid') altitude_checker.check_object_is_array() altitude_checker.check_ndarray_is_numeric() altitude_checker.check_ndarray_is_non_negative() altitude_checker.check_ndarray_is_finite() altitude_checker.check_ndarray_is_1d() altitude_checker.check_1d_array_is_monotonically_decreasing()
def __check_wavelengths_are_physical(self): wavelength_checker = ArrayChecker(self.wavelengths, 'wavelengths') wavelength_checker.check_object_is_array() wavelength_checker.check_ndarray_is_numeric() wavelength_checker.check_ndarray_is_positive_finite() wavelength_checker.check_ndarray_is_1d()
def __check_atmosphere_values_are_physical(self): atmosphere_checker = ArrayChecker(self.__atmosphere, 'atmosphere') atmosphere_checker.check_object_is_array() atmosphere_checker.check_ndarray_is_numeric() atmosphere_checker.check_ndarray_is_finite() atmosphere_checker.check_ndarray_is_non_negative() atmosphere_checker.check_ndarray_is_2d()