POSEIDON.core ============= .. py:module:: POSEIDON.core .. autoapi-nested-parse:: POSEIDON CORE ROUTINE. Copyright 2023-2025, Ryan J. MacDonald. Attributes ---------- .. autoapisummary:: POSEIDON.core.cp POSEIDON.core.comm POSEIDON.core.rank POSEIDON.core.block POSEIDON.core.thread Functions --------- .. autoapisummary:: POSEIDON.core.find_nearest POSEIDON.core.create_star POSEIDON.core.create_planet POSEIDON.core.define_model POSEIDON.core.wl_grid_constant_R POSEIDON.core.wl_grid_line_by_line POSEIDON.core.read_opacities POSEIDON.core.make_atmosphere POSEIDON.core.check_atmosphere_physical POSEIDON.core.compute_spectrum POSEIDON.core.load_data POSEIDON.core.set_priors Module Contents --------------- .. py:data:: cp .. py:data:: comm .. py:data:: rank .. py:data:: block .. py:data:: thread .. py:function:: find_nearest(array, value) .. py:function:: create_star(R_s, T_eff, log_g, Met, T_eff_error=100.0, log_g_error=0.1, stellar_grid='blackbody', stellar_contam=None, f_het=None, T_het=None, log_g_het=None, f_spot=None, f_fac=None, T_spot=None, T_fac=None, log_g_spot=None, log_g_fac=None, wl=[], interp_backend='pysynphot', user_spectrum=[], user_wl=[]) Initialise the stellar dictionary object used by POSEIDON. Stellar spectra are only required to compute transmission spectra if the star has unocculted stellar heterogeneities (spots/faculae) - since the stellar intensity cancels out in the transit depth. Hence a stellar spectrum is only added to the stellar dictionary if the user requests it. :param R_s: Stellar radius (m). :type R_s: float :param T_eff: Stellar effective temperature (K). :type T_eff: float :param log_g: Stellar log surface gravity (log10(cm/s^2) by convention). :type log_g: float :param Met: Stellar metallicity [log10(Fe/H_star / Fe/H_solar)]. :type Met: float :param T_eff_error: A priori 1-sigma error on stellar effective temperature (K). :type T_eff_error: float :param log_g_error: A priori 1-sigma error on stellar log g (log10(cm/s^2)). :type log_g_error: float :param stellar_grid: Chosen stellar model grid (Options: blackbody / cbk04 [for pysynphot] / phoenix [for pysynphot] / Goettingen-HiRes [for pymsg] / user). :type stellar_grid: string :param stellar_contam: Chosen prescription for modelling unocculted stellar contamination (Options: one_spot / one_spot_free_log_g / two_spots). :type stellar_contam: str :param f_het: For the 'one_spot' model, the fraction of stellar photosphere covered by either spots or faculae. :type f_het: float :param T_het: For the 'one_spot' model, the temperature of the heterogeneity (K). :type T_het: float :param log_g_het: For the 'one_spot' model, the log g of the heterogeneity (log10(cm/s^2)). :type log_g_het: float :param f_spot: For the 'two_spots' model, the fraction of stellar photosphere covered by spots. :type f_spot: float :param f_fac: For the 'two_spots' model, the fraction of stellar photosphere covered by faculae. :type f_fac: float :param T_spot: For the 'two_spots' model, the temperature of the spot (K). :type T_spot: float :param T_fac: For the 'two_spots' model, the temperature of the facula (K). :type T_fac: float :param log_g_spot: For the 'two_spots' model, the log g of the spot (log10(cm/s^2)). :type log_g_spot: float :param log_g_fac: For the 'two_spots' model, the log g of the facula (log10(cm/s^2)). :type log_g_fac: float :param wl: Model wavelength grid (μm). If not provided, a fiducial grid from 0.2 to 5.4 μm will be used. :type wl: np.array of float :param interp_backend: Stellar grid interpolation package for POSEIDON to use. (Options: pysynphot / pymsg). :type interp_backend: str :param user_wl: For stellar_grid is 'custom', the wavelengths of the custom stellar spectrum file (μm). :type user_wl: np.array of float :param user_spectrum: For stellar_grid is 'custom', the custom stellar spectrum. CAUTION: this is the stellar *surface flux* in SI units (W/m^2/m). :type user_spectrum: np.array of float :returns: Collection of stellar properties used by POSEIDON. :rtype: star (dict) .. py:function:: create_planet(planet_name, R_p, mass=None, gravity=None, log_g=None, T_eq=None, d=None, d_err=None, b_p=0.0, a_p=None) Initialise the planet dictionary object used by POSEIDON. The user only need provide one out of 'mass', 'gravity', or 'log_g' (depending on their unit of preference). Note that 'gravity' follows SI units (m/s^2), whilst 'log_g' follows the CGS convention (log_10 cm/s^2). :param planet_name: Identifier for planet object (e.g. HD209458b). :type planet_name: str :param R_p: Planetary radius (m). :type R_p: float :param mass: Planetary mass (kg). :type mass: float :param gravity: Planetary gravity corresponding to observed radius (m/s^2). :type gravity: float :param log_g: Instead of g, the user can provide log_10 (g / cm/s^2). :type log_g: float :param T_eq: Planetary equilibrium temperature (zero albedo) (K). :type T_eq: float :param d: Distance to system (m). :type d: float :param d_err: Measured error on system distance (m). :type d_err: float :param b_p: Impact parameter of planetary orbit (m) -- NOT in stellar radii! :type b_p: float :param a_p: Distance of planet from host star (m) -- NOT in AU :type a_p: float :returns: Collection of planetary properties used by POSEIDON. :rtype: planet (dict) .. py:function:: define_model(model_name, bulk_species, param_species, object_type='transiting', PT_profile='isotherm', X_profile='isochem', cloud_model='cloud-free', cloud_type='deck', opaque_Iceberg=False, gravity_setting='fixed', mass_setting='fixed', stellar_contam=None, nightside_contam=False, offsets_applied=None, error_inflation=None, radius_unit='R_J', mass_unit='M_J', distance_unit='pc', PT_dim=1, X_dim=1, cloud_dim=1, TwoD_type=None, TwoD_param_scheme='difference', species_EM_gradient=[], species_DN_gradient=[], species_vert_gradient=[], surface=False, sharp_DN_transition=False, sharp_EM_transition=False, reference_parameter='R_p_ref', disable_atmosphere=False, aerosol_species=[], thermal=True, thermal_scattering=False, reflection=False, log_P_slope_phot=0.5, log_P_slope_arr=[-3.0, -2.0, -1.0, 0.0, 1.0, 1.5, 2.0], number_P_knots=0, PT_penalty=False, Na_K_fixed_ratio=False, reflection_up_to_5um=False, high_res_method=None, alpha_high_res_option='log', fix_alpha_high_res=False, fix_W_conv_high_res=False, fix_beta_high_res=True, fix_Delta_phi_high_res=True, lognormal_logwidth_free=False, surface_components=[], surface_model='gray', surface_percentage_option='linear', surface_percentage_apply_to='models') Create the model dictionary defining the configuration of the user-specified forward model or retrieval. :param model_name: Identifier for model in output files and plots. :type model_name: str :param bulk_species: The chemical species (or two for H2+He) filling most of the atmosphere. :type bulk_species: list of str :param param_species: Chemical species with parametrised mixing ratios (trace species). :type param_species: list of str :param object_type: Type of planet / brown dwarf the user wishes to model (Options: transiting / directly_imaged). :type object_type: str :param PT_profile: Chosen P-T profile parametrisation (Options: isotherm / gradient / two-gradients / Madhu / Pelletier / Guillot / Line / slope / file_read). :type PT_profile: str :param X_profile: Chosen mixing ratio profile parametrisation (Options: isochem / gradient / two-gradients / lever / file_read / chem_eq). :type X_profile: str :param cloud_model: Chosen cloud parametrisation (Options: cloud-free / MacMad17 / Iceberg / Mie). :type cloud_model: str :param cloud_type: Cloud extinction type to consider (Options: deck / haze / deck_haze). :type cloud_type: str :param opaque_Iceberg: If using the Iceberg cloud model, True disables the kappa parameter. :type opaque_Iceberg: bool :param gravity_setting: Whether log_g is fixed or a free parameter. (Options: fixed / free). :type gravity_setting: str :param mass_setting: Whether the planetary mass is fixed or a free parameter. (Options: fixed / free). :type mass_setting: str :param stellar_contam: Chosen prescription for modelling unocculted stellar contamination (Options: one_spot / one_spot_free_log_g / two_spots / two_spots_free_log_g). :type stellar_contam: str :param nightside_contam: If True, include the impact of nightside thermal emission on a transmission spectrum (nightside contamination). :type nightside_contam: bool :param offsets_applied: Whether a relative offset should be applied to a dataset (Options: single_dataset / two_datasets / three_datasets). :type offsets_applied: str :param error_inflation: Whether to consider inflation of error bars in a retrieval (Options: Line15 / Piette20 / Line15+Piette20). :type error_inflation: str :param radius_unit: Planet radius unit used to report retrieval results (Options: R_J / R_E) :type radius_unit: str :param mass_unit: Planet mass unit used to report retrieval results (Options: M_J / M_E) :type mass_unit: str :param distance_unit: Distance to system unit used to report retrieval results (Options: pc) :type distance_unit: str :param PT_dim: Dimensionality of the pressure-temperature field (uniform -> 1, a day-night or evening-morning gradient -> 2, both day-night and evening-morning gradients -> 3) (Options: 1 / 2 / 3). :type PT_dim: int :param X_dim: Max dimensionality of the mixing ratio field (not all species need have gradients, this just specifies the highest dimensionality of chemical gradients -- see the species_XX_gradient arguments) (Options: 1 / 2 / 3). :type X_dim: int :param cloud_dim: Dimensionality of the cloud model prescription (only the Iceberg cloud model supports 3D clouds) (Options: 1 / 2 / 3). :type cloud_dim: int :param TwoD_type: For 2D models, specifies whether the model considers day-night gradients or evening-morning gradients (Options: D-N / E-M). :type TwoD_type: str :param TwoD_param_scheme: For 2D models, specifies which quantities should be consider as free parameters (e.g. day & night vs. terminator & day-night diff.) (Options: absolute / difference). :type TwoD_param_scheme: str :param species_EM_gradient: List of chemical species with an evening-morning mixing ratio gradient. :type species_EM_gradient: list of str :param species_DN_gradient: List of chemical species with a day-night mixing ratio gradient. :type species_DN_gradient: list of str :param species_vert_gradient: List of chemical species with a vertical mixing ratio gradient. :type species_vert_gradient: list of str :param surface: If True, model a surface via an opaque cloud deck. :type surface: bool :param sharp_DN_transition: For 2D / 3D models, sets day-night transition width (beta) to 0. :type sharp_DN_transition: bool :param sharp_EM_transition: For 2D / 3D models, sets evening-morning transition width (alpha) to 0. :type sharp_EM_transition: bool :param reference_parameter: For retrievals, whether R_p_ref, P_ref, or both will be a free parameter (Options: R_p_ref / P_ref / R_p_ref+P_ref). :type reference_parameter: str :param disable_atmosphere: If True, returns a flat planetary transmission spectrum @ (Rp/R*)^2 :type disable_atmosphere: bool :param aerosol: If cloud_model = Mie and cloud_type = specific_aerosol :type aerosol: string :param thermal: If true, uses a emission model (scattering determines if one-stream or two-stream) :type thermal: bool :param thermal_scattering: If True, uses a two-stream multiple scattering emission model. :type thermal_scattering: bool :param reflection: If True, uses a two-stream multiple scattering reflection model. :type reflection: bool :param log_P_slope_phot: Log pressure of the photosphere temperature parameter (only for the Piette & Madhusudhan 2020 P-T profile). :type log_P_slope_phot: float :param log_P_slope_arr: Log pressures where the temperature difference parameters are defined (only for the Piette & Madhusudhan 2020 P-T profile). :type log_P_slope_arr: np.array of float :param number_P_knots: Number of uniform knots in pressure space (only for the Pelletier 2021 P-T profile). :type number_P_knots: float :param PT_penalty: If True, introduces the sigma_smooth parameter for retrievals (only for the Pelletier 2021 P-T profile). :type PT_penalty: bool :param Na_K_fixed_ratio: If True, sets log_K = 0.1 * log_Na :type Na_K_fixed_ratio: bool :param reflection_up_to_5um: If True, only computes albedo up to 5 um (to speed up computations). :type reflection_up_to_5um: bool :param high_res_method: For high resolution retrievals, define which processing method will be used - only not None for high-res retrievals (Options: None, 'pca', 'sysrem'). :type high_res_method: list of str :param alpha_high_res_option: For high resolution retrievals, specify whether the retrieved model scaling parameter is in log space (default) or linear space (Options: 'log', 'linear'). :type alpha_high_res_option: str :param fix_alpha_high_res: If True, the alpha (model scaling) parameter in high resolution retrievals will be fixed to 1 and not a retrieved parameter. :type fix_alpha_high_res: bool :param fix_W_conv_high_res: If True, the W_conv (broadening) parameter in high resolution retrievals will be fixed to 0 and not a retrieved parameter. :type fix_W_conv_high_res: bool :param fix_beta_high_res: If True, the beta (error scaling) parameter in high resolution retrievals will be fixed to 1 and not a retrieved parameter. :type fix_beta_high_res: bool :param fix_Delta_phi_high_res: If True, the Delta_phi (phase shift) parameter in high resolution retrievals will be fixed to 0 and not a retrieved parameter. :type fix_Delta_phi_high_res: bool :param lognormal_logwidth_free: If True, has log_r_m_std_dev be a free parameter for aerosols. Only applicable for certain aerosols with precomputed grids. :type lognormal_logwidth_free: bool :param surface_components: List of surface components (if surface_model = 'Lab_data') :type surface_components: list of strings :param surface_model: Surface model definition (Options: gray, constant_albedo, lab_data) :type surface_model: string :param surface_percentage_option: Will make surface percentages log or linear (log is reccomended for CLR retrievals) (Options: linear, log) :type surface_percentage_option: string :param surface_percentage_apply_to: What the surface percentage is applied to. (Options: models, albedos) :type surface_percentage_apply_to: string :returns: Dictionary containing the description of the desired POSEIDON model. :rtype: model (dict) .. py:function:: wl_grid_constant_R(wl_min, wl_max, R) Create a wavelength array with constant spectral resolution (R = wl/dwl). :param wl_min: Minimum wavelength of grid (μm). :type wl_min: float :param wl_max: Maximum wavelength of grid (μm). :type wl_max: float :param R: Spectral resolution of desired wavelength grid. :type R: int or float :returns: Model wavelength grid (μm). :rtype: wl (np.array of float) .. py:function:: wl_grid_line_by_line(wl_min, wl_max, line_by_line_res=0.01) Create a wavelength array with constant spectral resolution (R = wl/dwl). :param wl_min: Minimum wavelength of grid (μm). :type wl_min: float :param wl_max: Maximum wavelength of grid (μm). :type wl_max: float :param line_by_line_res: Wavenumber resolution of pre-computer opacity database (0.01 cm^-1). :type line_by_line_res: float :returns: Model wavelength grid (μm). :rtype: wl (np.array of float) .. py:function:: read_opacities(model, wl, opacity_treatment='opacity_sampling', T_fine=None, log_P_fine=None, opacity_database='High-T', device='cpu', wl_interp='sample', testing=False, database_version='1.3') Load the various cross sections required by a given model. When using opacity sampling, the native high-resolution are pre-interpolated onto 'fine' temperature and pressure grids, then sampled onto the desired wavelength grid, and stored in memory. This removes the need to interpolate opacities during a retrieval. For line-by-line models, this function only stores Rayleigh scattering cross sections in memory (cross section interpolation is handled in other functions later). :param model: A specific description of a given POSEIDON model. :type model: dict :param wl: Model wavelength grid (μm). :type wl: np.array of float :param opacity_treatment: Choice between opacity sampling or line-by-line cross sections (Options: opacity_sampling / line_by_line). :type opacity_treatment: str :param T_fine: Fine temperature grid for opacity pre-interpolation. :type T_fine: np.array of float :param log_P_fine: Fine pressure grid for opacity pre-interpolation. :type log_P_fine: np.array of float :param opacity_database: Choice between high-temperature or low-temperature opacity databases (Options: High-T / Temperate). :type opacity_database: str :param wl_interp: When initialising cross sections, whether to use opacity sampling or linear interpolation over wavenumber (Options: sample / linear) . :type wl_interp: str :param testing: For GitHub Actions automated tests. If True, disables reading the full opacity database (since GitHub Actions can't handle downloading the full database - alas, 70+ GB is a little too large!). :type testing: bool :returns: Collection of numpy arrays storing cross sections for the molecules, atoms, and ions contained in the model. The separate arrays store standard cross sections, CIA, free-free + bound-free opacity, and Rayleigh scattering cross sections. :rtype: opac (dict) .. py:function:: make_atmosphere(planet, model, P, P_ref, R_p_ref, PT_params=[], log_X_params=[], cloud_params=[], geometry_params=[], surface_params=[], log_g=None, M_p=None, T_input=[], X_input=[], P_param_set=0.01, He_fraction=0.17, N_slice_EM=2, N_slice_DN=4, constant_gravity=False, chemistry_grid=None, mu_back=None) Generate an atmosphere from a user-specified model and parameter set. In full generality, this function generates 3D pressure-temperature and mixing ratio fields, the radial extent of atmospheric columns, geometrical properties of the atmosphere, and cloud properties. :param planet: Collection of planetary properties used POSEIDON. :type planet: dict :param model: A specific description of a given POSEIDON model. :type model: dict :param P: Model pressure grid (bar). :type P: np.array of float :param P_ref: Reference pressure (bar). :type P_ref: float :param R_p_ref: Planet radius corresponding to reference pressure (m). :type R_p_ref: float :param PT_params: Parameters defining the pressure-temperature field. :type PT_params: np.array of float :param log_X_params: Parameters defining the log-mixing ratio field. :type log_X_params: np.array of float :param cloud_params: Parameters defining atmospheric aerosols. :type cloud_params: np.array of float :param geometry_params: Terminator opening angle parameters. :type geometry_params: np.array of float :param surface_params: Surface parameters :type surface_params: np.array of float :param log_g: Gravitational field of planet - only needed for free log_g parameter. :type log_g: float :param M_p: Planet mass - only needed for free M_p parameter. :type M_p: float :param T_input: Temperature profile (only if provided directly by the user). :type T_input: np.array of float :param X_input: Mixing ratio profiles (only if provided directly by the user). :type X_input: 2D np.array of float :param P_param_set: Only used for the Madhusudhan & Seager (2009) P-T profile. Sets the pressure where the reference temperature parameter is defined (P_param_set = 1.0e-6 corresponds to that paper's choice). :type P_param_set: float :param He_fraction: Assumed H2/He ratio (0.17 default corresponds to the solar ratio). :type He_fraction: float :param N_slice_EM: Number of azimuthal slices in the evening-morning transition region. :type N_slice_EM: even int :param N_slice_DN: Number of zenith slices in the day-night transition region. :type N_slice_DN: even int :param constant_gravity: If True, disable inverse square law gravity (only for testing). :type constant_gravity: bool :param chemistry_grid: For models with a pre-computed chemistry grid only, this dictionary is produced in chemistry.py. :type chemistry_grid: dict :param mu_back: Mean molecular mass of background gas, if bulk_species = ['ghost'] (AMU). :type mu_back: float :returns: Collection of atmospheric properties required to compute the resultant spectrum of the planet. :rtype: atmosphere (dict) .. py:function:: check_atmosphere_physical(atmosphere, opac) Checks that a specific model atmosphere is physical. :param atmosphere: Collection of atmospheric properties. :type atmosphere: dict :param opac: Collection of cross sections and other opacity sources. :type opac: dict :returns: True if atmosphere physical, otherwise False. :rtype: Bool .. py:function:: compute_spectrum(planet, star, model, atmosphere, opac, wl, spectrum_type='transmission', save_spectrum=False, disable_continuum=False, suppress_print=False, Gauss_quad=2, use_photosphere_radius=True, device='cpu', y_p=np.array([0.0]), return_albedo=False, kappa_contributions=[], cloud_properties_contributions=[]) Calculate extinction coefficients, then solve the radiative transfer equation to compute the spectrum of the model atmosphere. :param planet: Collection of planetary properties used by POSEIDON. :type planet: dict :param star: Collection of stellar properties used by POSEIDON. :type star: dict :param model: A specific description of a given POSEIDON model. :type model: dict :param atmosphere: Collection of atmospheric properties. :type atmosphere: dict :param opac: Collection of cross sections and other opacity sources. :type opac: dict :param wl: Model wavelength grid (μm). :type wl: np.array of float :param spectrum_type: The type of spectrum for POSEIDON to compute (Options: transmission / emission / direct_emission / transmission_time_average). :type spectrum_type: str :param save_spectrum: If True, writes the spectrum to './POSEIDON_output/PLANET/spectra/'. :type save_spectrum: bool :param disable_continuum: If True, turns off CIA and Rayleigh scattering opacities. :type disable_continuum: bool :param suppress_print: if True, turn off opacity print statements (in line-by-line mode). :type suppress_print: bool :param Gauss_quad: Gaussian quadrature order for integration over emitting surface * Only for emission spectra * (Options: 2 / 3). :type Gauss_quad: int :param use_photosphere_radius: If True, use R_p at tau = 2/3 for emission spectra prefactor. :type use_photosphere_radius: bool :param device: Experimental: use CPU or GPU (only for emission spectra) (Options: cpu / gpu) :type device: str :param y_p: Coordinate of planet centre along orbit at the time the spectrum is computed (y_p = 0, the default, corresponds to mid-transit). For non-grazing transits of uniform stellar disks, the spectrum is identical at all times due to translational symmetry, so y_p = 0 is good for all times post second contact and pre third contact. Units are in m, not in stellar radii. :type y_p: np.array of float :param return_albedo: If True, returns spectrum and albedo :type return_albedo: bool :param kappa_contributions: Used by contributions.py functions :type kappa_contributions: array :param cloud_properties_contributions: Used by contributions.py functions :type cloud_properties_contributions: array :returns: The spectrum of the atmosphere (transmission or emission). :rtype: spectrum (np.array of float) .. py:function:: load_data(data_dir, datasets, instruments, wl_model, offset_datasets=None, wl_unit='micron', bin_width='half', spectrum_unit='(Rp/Rs)^2', skiprows=None, offset_1_datasets=None, offset_2_datasets=None, offset_3_datasets=None) Load the user provided datasets into the format expected by POSEIDON. Also generate the functions required for POSEIDON to later calculate the binned data for each instrument (e.g. the PSFs for each instrument) corresponding to model spectra. :param data_dir: Path to the directory containing the user's data files. :type data_dir: str :param datasets: List containing file names of the user's data files. :type datasets: list of str :param instruments: List containing the instrument names corresponding to each data file (e.g. WFC3_G141, JWST_NIRSpec_PRISM, JWST_NIRISS_SOSS_Ord2). :type instruments: list of str :param wl_model: Model wavelength grid (μm). :type wl_model: np.array of float :param offset_datasets: If applying a relative offset to one or more datasets, this list gives the file names of the datasets that will have free offsets applied (note: currently only supports *two* offset datasets). :type offset_datasets: list of str :param wl_unit: Unit of wavelength column (first column in file) (Options: micron (or equivalent) / nm / A / m) :type wl_unit: str :param bin_width: Whether bin width (second column) is half or full width (Options: half / full). :type bin_width: str :param spectrum_unit: Unit of spectrum (third column) and spectrum errors (fourth column) (Options: (Rp/Rs)^2 / Rp/Rs / Fp/Fs / Fp (or equivalent units)). :type spectrum_unit: str :param skiprows: The number of rows to skip (e.g. use 1 if file has a header line). :type skiprows: int :param offset_1_datasets: Specifically lumps together multiple datasets to have one offset applied (delta_rel_1) :type offset_1_datasets: list of str :param offset_2_datasets: Specifically lumps together multiple datasets to have one offset applied (delta_rel_2) :type offset_2_datasets: list of str :param offset_3_datasets: Specifically lumps together multiple datasets to have one offset applied (delta_rel_3) :type offset_3_datasets: list of str :returns: Collection of data properties required for POSEIDON's instrument simulator (i.e. to create simulated binned data during retrievals). :rtype: data (dict) .. py:function:: set_priors(planet, star, model, data, prior_types={}, prior_ranges={}) Initialise the priors for each free parameter for a POSEIDON retrieval. If the user does not provide a prior type or prior range for one or more of the parameters, this function will prescribe a default prior with a wide range. Thus the user can choose the degree to which they would like to 'micromanage' the assignment of priors. Disclaimer: while using default priors can be good for exploratory retrievals, for a publication we *strongly* suggest you explicitly specify your priors - you'll need to give your priors in a Table somewhere anyway, so it's generally a good idea to know what they are ;) :param planet: Collection of planetary properties used by POSEIDON. :type planet: dict :param star: Collection of stellar properties used by POSEIDON. :type star: dict :param model: A specific description of a given POSEIDON model. :type model: dict :param data: Collection of data properties in POSEIDON format. :type data: dict :param prior_types: User-provided dictionary containing the prior type for each free parameter in the retrieval moel (Options: uniform, gaussian, sine, CLR). :type prior_types: dict :param prior_ranges: User-provided dictionary containing numbers defining the prior range for each free parameter in the retrieval model (Options: for 'uniform' [low, high], for 'gaussian' [mean, std], for 'sine' [high] - only for 2D/3D angle parameters, for 'CLR' [low] - only for mixing ratios). :type prior_ranges: dict :returns: Collection of the prior types and ranges used by POSEIDON's retrieval module. :rtype: priors (dict)