hitranonline / hapi2

HITRAN Application Programming Interface on Steroids
GNU General Public License v3.0
19 stars 5 forks source link

HITRAN_units and OmegaGrid not implemented in absorptionCoefficient_Voigt #15

Open eli-miller opened 5 months ago

eli-miller commented 5 months ago

Currently, there is an optional parameter for HITRAN_units in absorptionCoefficient_Voigt (and the other lineshape versions of this function), however it is never used within the function. I'm assuming that this should be handled using the volumeConcentration function from hapi to convert using molecules/cm^3. @RomanKochanov, can you comment on this?

Additionally, OmegaGrid is specified as an optional parameter, but ABSCOEF_FAST only take in WavenumberGrid. It seems like this is attempted to be handled with:

    # are deprecated and given for backward compatibility with the older versions.
    if WavenumberRange is not None:
        OmegaRange = WavenumberRange
    if WavenumberStep is not None:
        OmegaStep = WavenumberStep
    if WavenumberWing is not None:
        OmegaWing = WavenumberWing
    if WavenumberWingHW is not None:
        OmegaWingHW = WavenumberWingHW
    if WavenumberGrid is not None:
        OmegaGrid = WavenumberGrid

This is a backward implementation. If the user provides OmegaGrid, but not WavenumberGrid, the ABSCOEF_FAST function will recieve None for the wavelength axis.

eli-miller commented 4 months ago

Additionally, I'm noticing that the absorption simulations is not correctly using the molecular ID and isotopic ID specified when calling the function. I.e, if you are simulating with a table that contains multiple isotope values, and you specific Components=(1,1,0.01), it will still simulate all isotope values found in the source table. This is different than the expected behavior.