pyROX.collision_induced_absorption#

Submodules#

Classes#

CIA_HITRAN

Class for handling CIA data from HITRAN.

CIA_Borysow

Class for handling Collision-Induced Absorption (CIA) data from Borysow.

CIA

Base class for Collision-Induced Absorption (CIA) data handling.

Package Contents#

class pyROX.collision_induced_absorption.CIA_HITRAN(config, **kwargs)#

Bases: pyROX.collision_induced_absorption.cia.CIA

Class for handling CIA data from HITRAN.

_read_absorption_coefficients(file)#

Reads absorption coefficients from a HITRAN CIA file.

Parameters:

file (str) – Path to the HITRAN CIA file.

Returns:

Temperature grid, absorption coefficients (k), and absorption coefficients (alpha).

Return type:

tuple

Raises:

FileNotFoundError – If the specified file does not exist.

class pyROX.collision_induced_absorption.CIA_Borysow(config, **kwargs)#

Bases: pyROX.collision_induced_absorption.cia.CIA

Class for handling Collision-Induced Absorption (CIA) data from Borysow.

_read_absorption_coefficients(file)#

Reads absorption coefficients from a Borysow CIA file.

Parameters:

file (str) – Path to the Borysow CIA file.

Returns:

Temperature grid, absorption coefficients (k), and absorption coefficients (alpha).

Return type:

tuple

Raises:

FileNotFoundError – If the specified file does not exist.

class pyROX.collision_induced_absorption.CIA(config, **kwargs)#

Bases: pyROX.CrossSections

Base class for Collision-Induced Absorption (CIA) data handling.

download_data(config)#

Download CIA data from HITRAN or Borysow.

Parameters:

config (object) – Configuration object containing URLs and input data directory.

Raises:

ValueError – If any file fails to download.

calculate_temporary_outputs(overwrite=False, **kwargs)#

Calculate the CIA coefficients and save temporary outputs.

Parameters:
  • overwrite (bool) – Whether to overwrite existing temporary files.

  • **kwargs – Additional arguments for calculation.

save_combined_outputs(**kwargs)#

Save the merged CIA outputs to a file.

Parameters:

**kwargs – Additional arguments for saving.

plot_combined_outputs(return_fig_ax=False, cmap='coolwarm', xscale='log', yscale='log', xlim=None, ylim=None, **kwargs)#

Plot the merged CIA coefficients.

Parameters:
  • return_fig_ax (bool) – Whether to return the figure and axes objects.

  • cmap (str) – Colormap for the plot.

  • xscale (str) – Scale for the x-axis (‘linear’ or ‘log’).

  • yscale (str) – Scale for the y-axis (‘linear’ or ‘log’).

  • xlim (tuple, optional) – Limits for the x-axis.

  • ylim (tuple, optional) – Limits for the y-axis.

  • **kwargs – Additional arguments for plotting.

convert_to_pRT3(contributor=None, **kwargs)#

Convert the CIA data to petitRADTRANS v3.0 format.

Parameters:
  • contributor (str) – Name of the contributor for these data.

  • **kwargs – Additional arguments for conversion.

Raises:
  • ValueError – If required metadata is missing in the configuration.

  • KeyError – If required keys are missing in the metadata.